The following commit has been merged in the master branch: commit 2b125e6ed96d88e0f352eba9bfc746a9640dc01a Author: Guillem Jover <guil...@debian.org> Date: Sun May 10 17:54:05 2009 +0200
Do not set the Arch substvar in dpkg-source Avoid setting the variable by default as it is expensive, and not really needed for dpkg-source anyway. Split the setting into a new member set_arch_substvars(). Regression introduced in 120ecd5161f4cf468d611b3dea05ac8a43313a75. Closes: #526132 diff --git a/debian/changelog b/debian/changelog index 7b2b707..abddbe6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -88,6 +88,8 @@ dpkg (1.15.1) UNRELEASED; urgency=low have been disabled from configure. * Move Debian specific keyrings to the Debian vendor class and change the Ubuntu vendor class to inherit from it. + * Do not set the Arch substvar in dpkg-source, avoiding generating warnings + when there's no compiler present. Closes: #526132 [ Frank Lichtenheld ] * Dpkg::Version: Remove unnecessary function next_elem which just diff --git a/scripts/Dpkg/Substvars.pm b/scripts/Dpkg/Substvars.pm index 9cf0f33..136612e 100644 --- a/scripts/Dpkg/Substvars.pm +++ b/scripts/Dpkg/Substvars.pm @@ -45,8 +45,8 @@ strings. =item my $s = Dpkg::Substvars->new($file) Create a new object that can do substitutions. By default it contains -generic substitutions like ${Newline}, ${Space}, ${Tab}, ${dpkg:Version}, -${dpkg:Upstream-Version} and ${Arch}. +generic substitutions like ${Newline}, ${Space}, ${Tab}, ${dpkg:Version} +and ${dpkg:Upstream-Version}. Additional substitutions will be read from the $file passed as parameter. @@ -60,7 +60,6 @@ sub new { "Tab" => "\t", "dpkg:Version" => $version, "dpkg:Upstream-Version" => $version, - "Arch" => get_host_arch(), }; $self->{'dpkg:Upstream-Version'} =~ s/-[^-]+$//; bless $self, $class; @@ -143,6 +142,18 @@ sub set_version_substvars { $self->{'Source-Version'} = $version; } +=item $s->set_arch_substvars() + +Defines architecture variables: ${Arch}. + +=cut + +sub set_arch_substvars { + my ($self) = @_; + + $self->{'Arch'} = get_host_arch(); +} + =item $newstring = $s->substvars($string) Substitutes variables in $string and return the result in $newstring. diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl index d407614..32b5bff 100755 --- a/scripts/dpkg-genchanges.pl +++ b/scripts/dpkg-genchanges.pl @@ -206,6 +206,7 @@ $bad_parser = 1 if ($@); my $control = Dpkg::Control->new($controlfile); my $fields = Dpkg::Fields::Object->new(); $substvars->set_version_substvars($changelog->{"Version"}); +$substvars->set_arch_substvars(); $substvars->parse($varlistfile) if -e $varlistfile; if (defined($prev_changelog) and diff --git a/scripts/dpkg-gencontrol.pl b/scripts/dpkg-gencontrol.pl index 50b1f87..da4c2d4 100755 --- a/scripts/dpkg-gencontrol.pl +++ b/scripts/dpkg-gencontrol.pl @@ -126,6 +126,7 @@ my %options = (file => $changelogfile); $options{"changelogformat"} = $changelogformat if $changelogformat; my $changelog = parse_changelog(%options); $substvars->set_version_substvars($changelog->{"Version"}); +$substvars->set_arch_substvars(); $substvars->parse($varlistfile) if -e $varlistfile; $substvars->set("binary:Version", $forceversion) if defined $forceversion; my $control = Dpkg::Control->new($controlfile); -- dpkg's main repository -- To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org