From fefcb935cd1181f580d9189b733673ce9abcf7e1 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Fri, 21 Mar 2025 22:02:19 +0100 Subject: [PATCH] mkosi: Hide patches on debian instead of removing them --- .../build/mkosi.conf.d/debian-ubuntu/mkosi.build.chroot | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mkosi.images/build/mkosi.conf.d/debian-ubuntu/mkosi.build.chroot b/mkosi.images/build/mkosi.conf.d/debian-ubuntu/mkosi.build.chroot index 03ff50211bf..ed3ba3b5b77 100755 --- a/mkosi.images/build/mkosi.conf.d/debian-ubuntu/mkosi.build.chroot +++ b/mkosi.images/build/mkosi.conf.d/debian-ubuntu/mkosi.build.chroot @@ -34,8 +34,11 @@ fi # We transplant the debian/ folder from the deb package sources into the upstream sources. mount --mkdir --bind "$SRCDIR/pkg/$PKG_SUBDIR/debian" "$SRCDIR"/debian -# We remove the patches so they don't get applied. -rm -rf "$SRCDIR"/debian/patches/* +# We hide the patches so they don't get applied. +if [[ -d "$SRCDIR/debian/patches" ]]; then + mkdir /tmp/patches + mount --bind /tmp/patches "$SRCDIR/debian/patches" +fi # While the build directory can be specified through DH_OPTIONS, the default one is hardcoded everywhere so # we have to use that. Because it is architecture dependent, we query it using dpkg-architecture first. -- 2.47.3