From d9fa5a8a2bedbccd5c3d976a27ba550b2bcfa20d Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Fri, 31 Aug 2007 05:01:00 +0300 Subject: [PATCH] Support Vcs-* fields in control file source package stanza The supported fields are Vcs-Browser, Vcs-Arch, Vcs-Bzr, Vcs-Cvs, Vcs-Darcs, Vcs-Git, Vcs-Hg, Vcs-Mtn and Vcs-Svn. --- ChangeLog | 9 +++++++++ debian/changelog | 3 +++ scripts/dpkg-genchanges.pl | 3 ++- scripts/dpkg-gencontrol.pl | 6 +++++- scripts/dpkg-source.pl | 7 +++++-- 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5e3bf9fc..fee3394b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-08-31 Guillem Jover + + * scripts/dpkg-genchanges.pl: Ignore Vcs-Browser, Vcs-Arch, Vcs-Bzr, + Vcs-Cvs, Vcs-Darcs, Vcs-Git, Vcs-Hg, Vcs-Mtn and Vcs-Svn fields + from control file source stanza. + * scripts/dpkg-gencontrol.pl: Likewise. + * scripts/dpkg-source.pl: Parse them instead. + (@dsc_fields): Add them here. + 2007-08-31 Guillem Jover * scripts/dpkg-genchanges.pl: Do not leave unknown fields unwarned diff --git a/debian/changelog b/debian/changelog index 956dcb76..a644acd3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -42,6 +42,9 @@ dpkg (1.14.6) UNRELEASED; urgency=low stanzas in dpkg-genchanges. * Explicitely ignore all known fields from the control file source package stanza in dpkg-genchanges, instead of leaving unknown fields unwarned. + * Implement support for Vcs-Browser, Vcs-Arch, Vcs-Bzr, Vcs-Cvs, Vcs-Darcs, + Vcs-Git, Vcs-Hg, Vcs-Mtn and Vcs-Svn fields in control file source + package stanza. [ Updated scripts translations ] * French (Frédéric Bothamy, Christian Perrier). diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl index 616ee8d1..907af80a 100755 --- a/scripts/dpkg-genchanges.pl +++ b/scripts/dpkg-genchanges.pl @@ -210,7 +210,8 @@ for $_ (keys %fi) { elsif (s/^X[BS]*C[BS]*-//i) { $f{$_}= $v; } elsif (m/^X[BS]+-/i || m/^Build-(Depends|Conflicts)(-Indep)?$/i || - m/^(Standards-Version|Uploaders|Homepage|Origin|Bugs)$/i) { + m/^(Standards-Version|Uploaders|Homepage|Origin|Bugs)$/i || + m/^Vcs-(Browser|Arch|Bzr|Cvs|Darcs|Git|Hg|Mtn|Svn)$/i) { } else { &unknown(_g('general section of control info file')); } } elsif (s/^C(\d+) //) { diff --git a/scripts/dpkg-gencontrol.pl b/scripts/dpkg-gencontrol.pl index 868d6401..8ff8aee2 100755 --- a/scripts/dpkg-gencontrol.pl +++ b/scripts/dpkg-gencontrol.pl @@ -152,7 +152,11 @@ for $_ (keys %fi) { setsourcepackage($v); } elsif (s/^X[CS]*B[CS]*-//i) { $f{$_}= $v; } - elsif (m/^X[CS]+-|^(Standards-Version|Uploaders)$|^Build-(Depends|Conflicts)(-Indep)?$/i) { } + elsif (m/^X[CS]+-/i || + m/^Build-(Depends|Conflicts)(-Indep)?$/i || + m/^(Standards-Version|Uploaders)$/i || + m/^Vcs-(Browser|Arch|Bzr|Cvs|Darcs|Git|Hg|Mtn|Svn)$/i) { + } elsif (m/^Section$|^Priority$/) { $spdefault{$_}= $v; } else { $_ = "C $_"; &unknown(_g('general section of control info file')); } } elsif (s/^C$myindex //) { diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl index e2229fa7..c0544d6d 100755 --- a/scripts/dpkg-source.pl +++ b/scripts/dpkg-source.pl @@ -76,7 +76,9 @@ our @src_dep_fields; textdomain("dpkg-dev"); my @dsc_fields = (qw(Format Source Binary Architecture Version Origin - Maintainer Uploaders Homepage Standards-Version), + Maintainer Uploaders Homepage Standards-Version + Vcs-Browser Vcs-Arch Vcs-Bzr Vcs-Cvs Vcs-Darcs + Vcs-Git Vcs-Hg Vcs-Mtn Vcs-Svn), @src_dep_fields); @@ -239,7 +241,8 @@ if ($opmode eq 'build') { if (s/^C //) { if (m/^Source$/i) { setsourcepackage($v); - } elsif (m/^(Standards-Version|Origin|Maintainer|Homepage)$/i) { + } elsif (m/^(Standards-Version|Origin|Maintainer|Homepage)$/i || + m/^Vcs-(Browser|Arch|Bzr|Cvs|Darcs|Git|Hg|Mtn|Svn)$/i) { $f{$_}= $v; } elsif (m/^Uploaders$/i) { ($f{$_}= $v) =~ s/[\r\n]//g; } -- 2.39.5