Просмотр исходного кода

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

Frank Lichtenheld лет назад: 20
Родитель
Сommit
3f06935ba9
3 измененных файлов с 15 добавлено и 1 удалено
  1. 7 0
      ChangeLog
  2. 3 0
      debian/changelog
  3. 5 1
      scripts/dpkg-source.pl

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+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>
 2005-10-03  Frank Lichtenheld  <djpig@debian.org>
 
 
 	* scripts/dpkg-source.pl: Try to chown files extracted from
 	* scripts/dpkg-source.pl: Try to chown files extracted from

+ 3 - 0
debian/changelog

@@ -8,6 +8,9 @@ dpkg (1.13.12~) unstable; urgency=low
     0700, too. Together this should make it safer to run
     0700, too. Together this should make it safer to run
     dpkg-source -x as root. Based on suggestions by Marcus
     dpkg-source -x as root. Based on suggestions by Marcus
     Brinkmann and Colin Watson. Closes: #144571, #238460
     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
 
 
  --
  --
 
 

+ 5 - 1
scripts/dpkg-source.pl

@@ -170,7 +170,11 @@ if ($opmode eq 'build') {
         if (s/^C //) {
         if (s/^C //) {
             if (m/^Source$/i) { &setsourcepackage; }
             if (m/^Source$/i) { &setsourcepackage; }
             elsif (m/^(Standards-Version|Origin|Maintainer|Uploaders)$/i) { $f{$_}= $v; }
             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 (s/^X[BC]*S[BC]*-//i) { $f{$_}= $v; }
             elsif (m/^(Section|Priority|Files|Bugs)$/i || m/^X[BC]+-/i) { }
             elsif (m/^(Section|Priority|Files|Bugs)$/i || m/^X[BC]+-/i) { }
             else { &unknown('general section of control info file'); }
             else { &unknown('general section of control info file'); }