[buildd-tools-devel] Bug#635320: Bug#635320: schroot: environment variable for setup.d scripts to detect alias
Roger Leigh
rleigh at codelibre.net
Sun Nov 27 01:23:52 UTC 2011
tags 635320 + patch
thanks
On Sun, Jul 24, 2011 at 09:20:47PM -0700, Vagrant Cascadian wrote:
> Package: schroot
> Version: 1.4.23-1
> Severity: wishlist
>
> thanks for maintaining schroot!
>
> it would be useful if schroot could set a variable (CHROOT_NAME_ALIAS?) that
> contained the alias used, much like CHROOT_NAME shows which chroot is used:
>
> so in schroot.conf:
>
> [sid]
> aliases=default,unstable,experimental,some-wacky-sid-variant
> description=sid
> type=lvm-snapshot
> device=/dev/prl/schroot_base
> lvm-snapshot-options=--size 2G
> location=/sid
>
> which would allow for a setup.d script:
>
> #!/bin/sh
> if [ "${CHROOT_NAME_ALIAS}" = "experimental" ] ; then
> # some magic that configures experimental chroot here...
> elif [ "${CHROOT_NAME_ALIAS}" = "some-wacky-sid-variant" ] ; then
> # some magic that configures some-wacky-sid-variant chroot here...
> fi
>
>
> this would save the need of having to set up a separate schroot.conf entry for
> chroots that contain only minimal differences in the source chroot.
>
> this would also allow options like apt-get dist-upgrade when using schroot
> --all-source-chroots behave with fewer surprises, since it won't treat the
> other entries as having a separate source chroot.
Preliminary support is in the attached patch against git master. I'll
also test and backport for schroot 1.4. Uses CHROOT_ALIAS in setup
scripts; SCHROOT_ALIAS_NAME in user environment.
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-sbuild-chroot_facet_session-Store-alias-used-as-sele.patch
Type: text/x-diff
Size: 32073 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20111127/3c88f203/attachment-0001.patch>
More information about the Buildd-tools-devel
mailing list