Bug#41818: dpkg-dev: Required changes to dpkg source for Policy amendment in bug#41232 [PATCH]
Package: dpkg-dev
Version: 1.4.1.4
Severity: wishlist
[Watch your To and Cc lines on replies.]
The policy amendment #41232 (Build-time dependencies on binary packages)
will probably be incorporated into a future edition of the Policy
documents. The amendment requires a change to dpkg source.
The only required changes are these:
- make dpkg-gencontrol aware of the new fields
- make dpkg-source -b propagate the new fields to the .dsc file
The following patch will do this, if I am not mistaken.
Please incorporate the following or equivalent patch to dpkg if the
policy amendment is accepted. (I will personally close this bug if it
is rejected;-)
diff -Naur dpkg-1.4.1.4/scripts/controllib.pl dpkg-1.4.1.4-ibid/scripts/controllib.pl
--- dpkg-1.4.1.4/scripts/controllib.pl Wed May 26 16:38:15 1999
+++ dpkg-1.4.1.4-ibid/scripts/controllib.pl Sat Jul 24 00:02:13 1999
@@ -1,7 +1,9 @@
$parsechangelog= 'dpkg-parsechangelog';
-grep($capit{lc $_}=$_, qw(Pre-Depends Standards-Version Installed-Size));
+grep($capit{lc $_}=$_, qw(Pre-Depends Standards-Version Installed-Size
+ Build-Depends Build-Indep-Depends
+ Build-Conflicts Build-Indep-Conflicts));
$substvar{'Format'}= 1.6;
$substvar{'Newline'}= "\n";
diff -Naur dpkg-1.4.1.4/scripts/dpkg-gencontrol.pl dpkg-1.4.1.4-ibid/scripts/dpkg-gencontrol.pl
--- dpkg-1.4.1.4/scripts/dpkg-gencontrol.pl Wed May 26 16:38:15 1999
+++ dpkg-1.4.1.4-ibid/scripts/dpkg-gencontrol.pl Sat Jul 24 00:07:08 1999
@@ -45,7 +45,8 @@
$i=100;grep($fieldimps{$_}=$i--,
qw(Package Version Section Priority Architecture Essential
Pre-Depends Depends Recommends Suggests Optional Conflicts Replaces
- Provides Installed-Size Maintainer Source Description));
+ Provides Installed-Size Maintainer Source Description Build-Depends
+ Build-Indep-Depends Build-Conflicts Build-Indep-Conflicts));
while (@ARGV) {
$_=shift(@ARGV);
@@ -115,7 +116,7 @@
if (m/^Maintainer$/) { $f{$_}=$v; }
elsif (m/^Source$/) { &setsourcepackage; }
elsif (s/^X[CS]*B[CS]*-//i) { $f{$_}= $v; }
- elsif (m/^X[CS]+-|^Standards-Version$/i) { }
+ elsif (m/^X[CS]+-|^Standards-Version$|^Build-(Indep-)?(Depends|Conflicts)$/i) { }
elsif (m/^Section$|^Priority$/) { $spdefault{$_}= $v; }
else { &unknown('general section of control info file'); }
} elsif (s/^C$myindex //) {
diff -Naur dpkg-1.4.1.4/scripts/dpkg-source.pl dpkg-1.4.1.4-ibid/scripts/dpkg-source.pl
--- dpkg-1.4.1.4/scripts/dpkg-source.pl Wed May 26 16:38:15 1999
+++ dpkg-1.4.1.4-ibid/scripts/dpkg-source.pl Sat Jul 24 00:00:59 1999
@@ -51,7 +51,8 @@
$i = 100;
grep ($fieldimps {$_} = $i--,
- qw (Source Version Binary Maintainer Architecture Standards-Version));
+ qw (Source Version Binary Maintainer Architecture Standards-Version
+ Build-Depends Build-Indep-Depends Build-Conflicts Build-Indep-Conflicts));
while (@ARGV && $ARGV[0] =~ m/^-/) {
$_=shift(@ARGV);
@@ -112,6 +113,7 @@
#print STDERR "G key >$_< value >$v<\n";
if (m/^Source$/) { &setsourcepackage; }
elsif (m/^Standards-Version$|^Maintainer$/) { $f{$_}= $v; }
+ elsif (m/^Build-(Indep-)?(Depends|Conflicts)$/i) { $f{$_}= $v; }
elsif (s/^X[BC]*S[BC]*-//i) { $f{$_}= $v; }
elsif (m/^(Section|Priority|Files)$/ || m/^X[BC]+-/i) { }
else { &unknown('general section of control info file'); }
--
%%% Antti-Juhani Kaijanaho % gaia@iki.fi % http://www.iki.fi/gaia/ %%%
"... memory leaks are quite acceptable in many applications ..."
(Bjarne Stroustrup, The Design and Evolution of C++, page 220)
Reply to: