Package: sbuild
Version: 0.77.1-2
Severity: normal
Tags: patch

Dear Maintainer,

the sbuild-createchroot --setup-only option is designed to perform setup
tasks on an existing chroot.  Thus the check for non-empty directories
introduced in
    
https://salsa.debian.org/debian/sbuild/commit/53e250cdeb0035663833fa0c8ce80adf96d31c03
needs to be disabled when that option is in use.

I've fixed this for my need with the following change:


diff -u /usr/bin/sbuild-createchroot sbuild-createchroot
--- /usr/bin/sbuild-createchroot»       2018-11-13 16:07:19.000000000
+0100 +++ sbuild-createchroot»2018-12-09 11:41:56.634681576 +0100
@@ -288,7 +288,7 @@
     # has more entries than just "." and ".." and must thus not be
empty. readdir $dh;
     readdir $dh;
-    die "$target is not empty" if (readdir $dh);
+    die "$target is not empty" if (readdir $dh and !$conf->get('SETUP_ONLY')); 
} else {
     # Create the target directory in advance so abs_path (which is
buggy) # won't fail.  Remove if abs_path is replaced by something
better.


Thanks
Lukas

Reply via email to