[Buildd-tools-devel] Bug#520755: Bug#520755: Reports chroot is not available

Roger Leigh rleigh at codelibre.net
Sun Mar 22 17:10:58 UTC 2009


On Sun, Mar 22, 2009 at 05:42:37PM +0100, Julian Andres Klode wrote:
> On Sun, Mar 22, 2009 at 04:33:21PM +0000, Roger Leigh wrote:
> > Could you take a look at the output of 'schroot -i -c <session-id>'?
> > Look at the values of Location, Mount Location, and Path.  Are any
> > of these defined?  Are they the same, and do these directories
> > exist?
> 
> This is the output and below it is verified that the directories exist.
> The directory defined in 'Location' is part of the mounted volume,
> it's therefore not directly available at /sid [but at 'Path'].
> 
> [Some parts of the output have been deleted (user lists,etc.)]
> 
> jak at hp:~/Desktop/control-center-2.24.0.1$ LC_ALL=C schroot -i -c sid-7224a65a-24cb-4e71-a159-5a3ea1e79c1c
>   --- Session ---
>   Name                   sid-7224a65a-24cb-4e71-a159-5a3ea1e79c1c
>   Description            Debian sid
>   Type                   lvm-snapshot
>   Location               /sid
>   Mount Location         /var/lib/schroot/mount/sid-7224a65a-24cb-4e71-a159-5a3ea1e79c1c
>   Path                   /var/lib/schroot/mount/sid-7224a65a-24cb-4e71-a159-5a3ea1e79c1c/sid

This all looks OK.  This is the code while gets the path:

        if (/^\s*Location:?\s+(.*)$/ &&
            $tmp{'Location'} eq "") {
            $tmp{'Location'} = $1;
        }
        if (/^\s*Mount Location:?\s+(.*)$/ &&
            $tmp{'Location'} eq "") {
            $tmp{'Location'} = $1;
        }
        # Path takes priority over Location and Mount Location.
        if (/^\s*Path:?\s+(.*)$/) {
            $tmp{'Location'} = $1;
        }

Note: in this case while Location and Mount Location are incorrect,
they are present here for compatibility with earlier versions of
schroot which used them for different purposes.  However, if defined,
Path will be used in preference to them.

This is in Sbuild/ChrootInfoSchroot.pm.  To check what it's
returning, could you add to Sbuild/ChrootSchroot.pm to this block:

    my $info = $self->get('Chroots')->get_info($schroot_session);
        if (defined($info) &&
            defined($info->{'Location'}) && -d $info->{'Location'}) {
            $self->set('Priority', $info->{'Priority'});
            $self->set('Location', $info->{'Location'});
            $self->set('Session Purged', $info->{'Session Purged'});
    } else {
        die $self->get('Chroot ID') . " chroot does not exist\n";
    }

Just after the first line, add

print STDERR "LOCATION: $info->{'Location'}\n";
print STDERR "LOCATION EXISTS\n" if -d $info->{'Location'};

and rerun sbuild.  You should then see what value location was set to,
and if it thinks the directory exists.


Thanks,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.





More information about the Buildd-tools-devel mailing list