Source: dpkg Version: 1.18.3 Severity: normal Tags: patch Hi!
scripts/t/mk.t will shell out to dpkg-architecture.pl and dpkg-buildpackage.pl. Both scripts are called from the current development tree. But they will use Perl modules to compute some of their values. As PERL5LIB is not set, system modules are going to be used instead of the one from the development tree. This makes it impossible to have the tests pass when there is a change in the default dpkg-buildflags values in a new version. The attached patch sets the PERL5LIB environment variable which fixes the problem. -- Lunar .''`. lu...@debian.org : :Ⓐ : # apt-get install anarchism `. `'` `-
From 9efa6274a82bd1c65ff317356c8a6b8593e16760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Bobbio?= <lu...@debian.org> Date: Thu, 8 Oct 2015 16:14:10 +0000 Subject: [PATCH] Get reference values from current modules in scripts/t/mk.t scripts/t/mk.t will compute its reference values by shelling out to scripts/dpkg-architecture.pl and scripts/dpkg-buildflags.pl. These scripts will read some information from Perl modules. So we set PERL5LIB to the directory where the current source code lies. Otherwise, it means we use the currently installed module to retrieve the reference values, which would make the tests fail as soon as a new version changes the default values. --- scripts/t/mk.t | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/t/mk.t b/scripts/t/mk.t index 04f88a7..afe3efe 100644 --- a/scripts/t/mk.t +++ b/scripts/t/mk.t @@ -29,6 +29,8 @@ my $datadir = "$srcdir/t/mk"; # Turn these into absolute names so that we can safely switch to the test # directory with «make -C». $ENV{$_} = rel2abs($ENV{$_}) foreach qw(srcdir DPKG_DATADIR DPKG_ORIGINS_DIR); +# We want the script that we will call to use the in-development modules +$ENV{PERL5LIB} = rel2abs($srcdir); # Delete variables that can affect the tests. delete $ENV{$_} foreach grep { m/^DEB_/ } keys %ENV; -- 2.6.1
signature.asc
Description: Digital signature