From d8ce44bf7cee58d66601b23f782af0eac8f062ac Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Fri, 31 Aug 2007 05:31:26 +0300 Subject: [PATCH] Implement support for Tag field --- ChangeLog | 9 +++++++++ TODO | 2 -- debian/changelog | 1 + dpkg-deb/build.c | 1 + man/ChangeLog | 5 +++++ man/deb-control.5 | 7 ++++++- man/dpkg-query.1 | 1 + scripts/dpkg-genchanges.pl | 1 + scripts/dpkg-gencontrol.pl | 4 ++-- scripts/dpkg-scanpackages.pl | 2 +- scripts/dpkg-source.pl | 2 +- 11 files changed, 28 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index fee3394b..ee02dd5a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-08-31 Guillem Jover + + * dpkg-deb/build.c (arbitrary_fields): Add Tag. + * scripts/dpkg-genchanges.pl: Ignore Tag field. + * scripts/dpkg-gencontrol.pl: Parse Tag from binary package stanza. + (@control_fields): Add Tag. + * scripts/dpkg-scanpackages.pl (@fieldpri): Add Tag. + * scripts/dpkg-source.pl: Ignore Tag field from binary package stanza. + 2007-08-31 Guillem Jover * scripts/dpkg-genchanges.pl: Ignore Vcs-Browser, Vcs-Arch, Vcs-Bzr, diff --git a/TODO b/TODO index df8aa1bc..5daf07db 100644 --- a/TODO +++ b/TODO @@ -18,8 +18,6 @@ lenny - Add field Package-Type and friends. - Generate proper Packages files. (#383916) - * Support Tag field. - 1.14.y ------ diff --git a/debian/changelog b/debian/changelog index a644acd3..e138304a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -45,6 +45,7 @@ dpkg (1.14.6) UNRELEASED; urgency=low * 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. + * Implement support for Tag field. [ Updated scripts translations ] * French (Frédéric Bothamy, Christian Perrier). diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c index be851efe..5ee77995 100644 --- a/dpkg-deb/build.c +++ b/dpkg-deb/build.c @@ -58,6 +58,7 @@ struct _finfo { const char *arbitrary_fields[]= { "Homepage", + "Tag", NULL }; diff --git a/man/ChangeLog b/man/ChangeLog index ad4ba13e..fc4ca432 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2007-08-31 Guillem Jover + + * deb-control.5: Document Tag field. + * dpkg-query.1: Document Tag as a recognized field. + 2007-08-25 Peter Karlsson * po/sv.po: Updated to 1285t. diff --git a/man/deb-control.5 b/man/deb-control.5 index c01c5b72..dd4ea969 100644 --- a/man/deb-control.5 +++ b/man/deb-control.5 @@ -1,6 +1,6 @@ .\" Author: Raul Miller .\" Includes text from the debian Guidelines by Ian Jackson, Ian Murdock -.TH deb\-control 5 "2007-05-15" "Debian Project" "Debian" +.TH deb\-control 5 "2007-08-31" "Debian Project" "Debian" .SH NAME deb\-control \- Debian packages' master control file format . @@ -88,6 +88,10 @@ of this are shell and Perl scripts, and documentation. .BR Homepage: " " The upstream project home page URL. .TP +.BR Tag: " " +List of tags describing the qualities of the package. The description and +list of supported tags can be found in the \fBdebtags\fP package. +.TP .BR Source: " " The name of the source package that this binary package came from, if different than the name of the package itself. @@ -216,5 +220,6 @@ Description: GNU grep, egrep and fgrep. . .SH SEE ALSO .BR deb (5), +.BR debtags (1), .BR dpkg (1), .BR dpkg-deb (1). diff --git a/man/dpkg-query.1 b/man/dpkg-query.1 index 4f5bad79..ec7e6540 100644 --- a/man/dpkg-query.1 +++ b/man/dpkg-query.1 @@ -127,6 +127,7 @@ alignment will be used. The following \fIfield\fRs are recognised: \fBSource\fP \fBStatus\fP \fBSuggests\fP + \fBTag\fP \fBVersion\fP .fi diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl index 907af80a..93e36aa3 100755 --- a/scripts/dpkg-genchanges.pl +++ b/scripts/dpkg-genchanges.pl @@ -256,6 +256,7 @@ for $_ (keys %fi) { push(@archvalues,$v) unless !$v || $archadded{$v}++; } elsif (m/^(Package|Essential|Pre-Depends|Depends|Provides)$/ || m/^(Recommends|Suggests|Enhances|Optional|Conflicts|Breaks|Replaces)$/ || + m/^Tag$/i || m/^X[BS]+-/i) { } else { &unknown(_g("package's section of control info file")); diff --git a/scripts/dpkg-gencontrol.pl b/scripts/dpkg-gencontrol.pl index 8ff8aee2..92052fc8 100755 --- a/scripts/dpkg-gencontrol.pl +++ b/scripts/dpkg-gencontrol.pl @@ -23,7 +23,7 @@ textdomain("dpkg-dev"); my @control_fields = (qw(Package Source Version Architecture Essential Origin Bugs Maintainer Installed-Size), @pkg_dep_fields, - qw(Section Priority Homepage Description)); + qw(Section Priority Homepage Description Tag)); my $controlfile = 'debian/control'; my $changelogfile = 'debian/changelog'; @@ -161,7 +161,7 @@ for $_ (keys %fi) { else { $_ = "C $_"; &unknown(_g('general section of control info file')); } } elsif (s/^C$myindex //) { #print STDERR "P key >$_< value >$v<\n"; - if (m/^(Package|Description|Homepage|Essential|Optional)$/) { + if (m/^(Package|Description|Homepage|Tag|Essential|Optional)$/) { $f{$_}= $v; } elsif (exists($pkg_dep_fields{$_})) { # Delay the parsing until later diff --git a/scripts/dpkg-scanpackages.pl b/scripts/dpkg-scanpackages.pl index e1b35b50..c7ece357 100755 --- a/scripts/dpkg-scanpackages.pl +++ b/scripts/dpkg-scanpackages.pl @@ -26,7 +26,7 @@ my %kmap= (optional => 'suggests', my @fieldpri = (qw(Package Source Version Architecture Essential Origin Bugs Maintainer Installed-Size), @pkg_dep_fields, qw(Filename - Size MD5sum Section Priority Homepage Description)); + Size MD5sum Section Priority Homepage Description Tag)); # This maps the fields into the proper case my %field_case; diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl index c0544d6d..70b4682c 100755 --- a/scripts/dpkg-source.pl +++ b/scripts/dpkg-source.pl @@ -286,7 +286,7 @@ if ($opmode eq 'build') { $f{$_}= $v; } elsif (m/^(Package|Essential|Pre-Depends|Depends|Provides)$/i || m/^(Recommends|Suggests|Optional|Conflicts|Replaces)$/i || - m/^(Breaks|Enhances|Description|Section|Priority)$/i || + m/^(Breaks|Enhances|Description|Tag|Section|Priority)$/i || m/^X[BC]+-/i) { } else { &unknown(_g("package's section of control info file")); -- 2.39.5