[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 14:21:40 UTC 2015
Control: tag -1 patch
Hi,
On Thu, 01 Jan 2015 14:57:19 +0100 Johannes Schauer <j.schauer at email.de> wrote:
> 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.
the easiest solution is to just move the execution of the pre-build-commands
hook to a bit later.
The attached patch does exactly that.
Please make sure that this cannot break any existing script relying on the
functionality.
cheers, josch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Move-running-of-pre-build-commands-until-after-Chroo.patch
Type: text/x-diff
Size: 2250 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20150101/8023c774/attachment.patch>
More information about the Buildd-tools-devel
mailing list