From: Frank Lichtenheld Date: Wed, 18 Jan 2006 12:46:01 +0000 (+0000) Subject: Let dpkg-source -b check the build relation fields before X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f06935ba92c3bb1a4e5e05c7fbfeeb75c0ff217;p=dpkg Let dpkg-source -b check the build relation fields before putting them into the .dsc. As a side effect they also get normalized. Closes: #254449 --- diff --git a/ChangeLog b/ChangeLog index 8d38748c..3b200de1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-10-04 Frank Lichtenheld + + * scripts/dpkg-source.pl: Check build relation + fields for correctness before putting them into + the .dsc when building. This also normalizes the + fields. + 2005-10-03 Frank Lichtenheld * scripts/dpkg-source.pl: Try to chown files extracted from diff --git a/debian/changelog b/debian/changelog index 0606807d..c0ef7725 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,9 @@ dpkg (1.13.12~) unstable; urgency=low 0700, too. Together this should make it safer to run dpkg-source -x as root. Based on suggestions by Marcus Brinkmann and Colin Watson. Closes: #144571, #238460 + * Let dpkg-source -b check the build relation fields before + putting them into the .dsc. As a side effect they also + get normalized. Closes: #254449 -- diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl index 6798b215..6256b3b2 100755 --- a/scripts/dpkg-source.pl +++ b/scripts/dpkg-source.pl @@ -170,7 +170,11 @@ if ($opmode eq 'build') { if (s/^C //) { if (m/^Source$/i) { &setsourcepackage; } elsif (m/^(Standards-Version|Origin|Maintainer|Uploaders)$/i) { $f{$_}= $v; } - elsif (m/^Build-(Depends|Conflicts)(-Indep)?$/i) { $f{$_}= $v; } + elsif (m/^Build-(Depends|Conflicts)(-Indep)?$/i) { + my $dep = parsedep(substvars($v),1); + &error("error occoured while parsing $_") unless defined $dep; + $f{$_}= showdep($dep, 1); + } elsif (s/^X[BC]*S[BC]*-//i) { $f{$_}= $v; } elsif (m/^(Section|Priority|Files|Bugs)$/i || m/^X[BC]+-/i) { } else { &unknown('general section of control info file'); }