[buildd-tools-devel] Bug#545215: Bug#545215: Bug#545215: [PATCH] Please support saving chroot to tarball in sbuild-createchroot

Roger Leigh rleigh at codelibre.net
Thu Sep 24 21:17:36 UTC 2009


On Sun, Sep 20, 2009 at 01:43:41PM -0400, Andres Mejia wrote:
> diff --git a/bin/sbuild-createchroot b/bin/sbuild-createchroot
> index a255149..8c0ba3f 100755
> --- a/bin/sbuild-createchroot
> +++ b/bin/sbuild-createchroot
> @@ -72,7 +72,13 @@ sub init_allowed_keys {
>  	},
>  	'SETUP_ONLY'				=> {
>  	    DEFAULT => 0
> -	}
> +	},
> +	'MAKE_TARBALL'				=> {
> +	    DEFAULT => ''
> +	},
> +	'KEEP_SBUILDCHROOT_DIR'			=> {
> +	    DEFAULT => 0
> +	},
>      );
>  
>      $self->set_allowed_keys(\%createchroot_keys);
> @@ -125,6 +131,12 @@ sub set_options {
>  	},
>  	"setup-only" => sub {
>  	    $self->set_conf('SETUP_ONLY', 1);
> +	},
> +	"make-tarball=s" => sub {
> +	    $self->set_conf('MAKE_TARBALL', $_[1]);
> +	},
> +	"keep-sbuildchroot-dir" => sub {
> +	    $self->set_conf('KEEP_SBUILDCHROOT_DIR', 1);
>  	});

I agree with the intent of this patch.  However, I do have a
concern that the "--make-tarball" option doesn't match the
option by the same name in debootstrap.

The option by the same name in debootstap, according to the
documentation, stores the downloaded packages in the tarball,
*not* the bootstrapped install.  I've just tested this and this
is in fact the case: it just contains the contents of
/var/lib/apt and /var/cache/apt/archives.

As a result, I would prefer to add support for this option to
sbuild-createchroot, but pass the option through to debootstrap
unchanged.  Additionally, the option for sbuild-createchroot to
store the bootstrapped install into a tarball must therefore be
named differently.  This shouldn't require many changes to the
patch (the existing option needs duplicating and renaming for
use by sbuild-createchroot, and the old option needs passing to
debootstrap).


Regards,
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