[buildd-tools-devel] Bug#774359: sbuild: SBUILD_CHROOT_DIR percentage escape has no effect in --pre-build-commands

Johannes Schauer j.schauer at email.de
Thu Jan 1 13:57:19 UTC 2015


Package: sbuild
Version: 0.65.0-1
Severity: normal

Hi,

the sbuild man page says that the %SBUILD_CHROOT_DIR percentage escape
is set for external commands that are run outside the chroot. Indeed,
the corresponding code in lib/Sbuild/Build.pm sets
"$percent{SBUILD_CHROOT_DIR} = $chroot_dir" whenever "$chroot == 0"
which is the case for "$stage eq 'pre-build-commands'".

But this remains without effect because "$self->get('Chroot Dir')" is
not set at the point when
"$self->run_external_commands("pre-build-commands"...)" is executed.

So either move the execution of the pre-build-commands hook to after
setting of the 'Chroot Dir' variable or define that variable earlier so
that it is available for the pre-build-commands hook.

I think one important purpose of the pre-build-commands hook is to
modify the build environment from the outside before anything else
happens. Without access to the location of the chroot, this cannot work.

Thanks!

cheers, josch



More information about the Buildd-tools-devel mailing list