From: Guillem Jover Date: Tue, 12 Jun 2007 03:22:18 +0000 (+0000) Subject: Fix dpkg-scanpackages to load the override file after having filled the X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d031120a39fbbb390363b9515152362e7951790c;p=dpkg Fix dpkg-scanpackages to load the override file after having filled the packages information. Closes: #428169, #428470 --- diff --git a/ChangeLog b/ChangeLog index b52edb3a..04f93485 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-06-12 Guillem Jover + + * scripts/dpkg-scanpackages.pl: Move check for existence of $override + outside load_override. Move load_override after having filled the + %packages information. + (load_override): Assume $override is always defined. + 2007-06-06 Guillem Jover * scripts/dpkg-source.pl ($diff_ignore_default_regexp): Add '.shelf'. diff --git a/debian/changelog b/debian/changelog index 311595a5..92454885 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ dpkg (1.14.5) UNRELEASED; urgency=low * Add lpia support to ostable and triplettable. * Fix dpkg-source to not emit duplicated entries for the Architecture field in the .dsc file. + * Fix dpkg-scanpackages to load the override file after having filled the + packages information. Closes: #428169, #428470 * Add '.shelf' to the default dpkg-source -i regex. Closes: #427827 Thanks to Adeodato Simó. diff --git a/scripts/dpkg-scanpackages.pl b/scripts/dpkg-scanpackages.pl index 5be21b2a..a6d83d83 100755 --- a/scripts/dpkg-scanpackages.pl +++ b/scripts/dpkg-scanpackages.pl @@ -68,14 +68,6 @@ Options: sub load_override { my $override = shift; - - if (defined $override) { - -e $override or - die sprintf(_g("Override file %s not found"), $override)."\n"; - } else { - return; - } - my $override_fh = new IO::File $override, 'r' or die sprintf(_g("Couldn't open override file %s: %s"), $override, $!)."\n"; @@ -143,8 +135,8 @@ my ($binarydir, $override, $pathprefix) = @ARGV; -d $binarydir or die sprintf(_g("Binary dir %s not found"), $binarydir)."\n"; - -load_override($override); +defined $override and -e $override or + die sprintf(_g("Override file %s not found"), $override)."\n"; $pathprefix = '' if not defined $pathprefix; @@ -248,6 +240,8 @@ $packages print(STDERR "\n") || die $!; } +load_override($override) if defined $override; + my @missingover=(); my $records_written = 0;