tags 372806 + confirmed patch fixed-upstream pending
thanks

Roger Leigh <[EMAIL PROTECTED]> writes:

> If the cwd doesn't exist inside the chroot, schroot will abort with
> an error.  When not using schroot, the cwd contains the chroot.  So
> when using schroot, it should chdir to / before running schroot.

The attached patch fixes this problem.  I've committed this into SVN.

Clint, I'll upload in the next day or so, but you can apply the patch
until then if you like--it's only a one liner to each of updatechroot,
upgradechroot and chrapt.


Regards,
Roger

-- 
Roger Leigh
                Printing on GNU/Linux?  http://gutenprint.sourceforge.net/
                Debian GNU/Linux        http://www.debian.org/
                GPG Public Key: 0x25BFB848.  Please sign and encrypt your mail.
Index: debian/changelog
===================================================================
--- debian/changelog	(revision 707)
+++ debian/changelog	(working copy)
@@ -2,6 +2,9 @@
 
   * bin/checkchroot: Correct uninitialised value warnings due to using an
     undefined variable (Closes: #369709).
+  * bin/chrapt, bin/updatechroot, bin/upgradechroot: When chroot_mode is
+    "schroot", chdir to / to ensure the CWD exists inside the chroot.
+    Thanks for Clint Adams for finding this (Closes: #372806).
   * sbuild:
     - fetch_source_files: When running apt-cache, check if we got valid
       output, and warn appropriately if the output is invalid
Index: bin/chrapt
===================================================================
--- bin/chrapt	(revision 706)
+++ bin/chrapt	(working copy)
@@ -39,6 +39,8 @@
 	exit 1;
 }
 
+$Sbuild::Conf::cwd = "/" if $Sbuild::Conf::chroot_mode eq "schroot";
+
 !setup($ARGV[0]) or die "Chroot setup failed";
 
 shift @ARGV;
Index: bin/updatechroot
===================================================================
--- bin/updatechroot	(revision 706)
+++ bin/updatechroot	(working copy)
@@ -29,6 +29,8 @@
 
 usage() if (@ARGV < 1);
 
+$Sbuild::Conf::cwd = "/" if $Sbuild::Conf::chroot_mode eq "schroot";
+
 foreach (@ARGV) {
 
 	my $chroot = Sbuild::Utility::get_dist($_);
Index: bin/upgradechroot
===================================================================
--- bin/upgradechroot	(revision 706)
+++ bin/upgradechroot	(working copy)
@@ -29,6 +29,8 @@
 
 usage() if (@ARGV < 1);
 
+$Sbuild::Conf::cwd = "/" if $Sbuild::Conf::chroot_mode eq "schroot";
+
 foreach (@ARGV) {
 
 	my $chroot = Sbuild::Utility::get_dist($_);

Attachment: pgpbJ95CShRI1.pgp
Description: PGP signature

Reply via email to