+2005-10-04 Frank Lichtenheld <djpig@debian.org>
+
+ * 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 <djpig@debian.org>
* scripts/dpkg-source.pl: Try to chown files extracted from
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
--
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'); }