The branch, master has been updated
       via  db992d8325dd60f99e6df8f9621496f36e33caec (commit)
      from  06cd68c9e7769e331b019e23e334912ff67017c3 (commit)


- Log -----------------------------------------------------------------
commit db992d8325dd60f99e6df8f9621496f36e33caec
Author: Guillem Jover <[EMAIL PROTECTED]>
Date:   Mon Aug 20 00:10:08 2007 +0300

    Implement support for Homepage field.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                    |   14 ++++++++++++++
 debian/changelog             |    1 +
 dpkg-deb/build.c             |   18 ++++++++++++++++++
 man/ChangeLog                |    5 +++++
 man/deb-control.5            |    3 +++
 man/dpkg-query.1             |    1 +
 scripts/dpkg-genchanges.pl   |    2 +-
 scripts/dpkg-gencontrol.pl   |    4 ++--
 scripts/dpkg-scanpackages.pl |    2 +-
 scripts/dpkg-source.pl       |    6 ++++--
 10 files changed, 50 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 929cf30..dee1fda 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2007-08-20  Guillem Jover  <[EMAIL PROTECTED]>
+
+       * dpkg-deb/build.c (arbitrary_fields): New variable.
+       (known_arbitrary_field): New function.
+       (do_build): Call known_arbitrary_field to not warn on known arbitrary
+       fields.
+       * scripts/dpkg-genchanges.pl: Ignore Homepage field.
+       * scripts/dpkg-gencontrol.pl: Parse Homepage from source package
+       stanza.
+       (@control_fields): Add Homepage.
+       * scripts/dpkg-scanpackages.pl (@fieldpri): Add Homepage.
+       * scripts/dpkg-source.pl: Parse Homepage from source package stanza.
+       (@dsc_fields): Add Homepage.
+
 2007-08-18  Guillem Jover  <[EMAIL PROTECTED]>
 
        * scripts/dpkg-divert.pl (infol): Check if parameters are defined
diff --git a/debian/changelog b/debian/changelog
index 2a6c25c..89c2833 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -37,6 +37,7 @@ dpkg (1.14.6) UNRELEASED; urgency=low
     Thanks to Ian Jackson.
   * Fix perl warnings:
     - When removing a non diverted file with dpkg-divert. Closes: #438416
+  * Implement support for Homepage field. Closes: #142324
 
   [ Updated scripts translations ]
   * French (Frédéric Bothamy, Christian Perrier).
diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
index 0177a74..be851ef 100644
--- a/dpkg-deb/build.c
+++ b/dpkg-deb/build.c
@@ -56,6 +56,21 @@ struct _finfo {
   struct _finfo* next;
 };
 
+const char *arbitrary_fields[]= {
+  "Homepage",
+  NULL
+};
+
+static int known_arbitrary_field(const struct arbitraryfield *field) {
+  const char **known;
+
+  for (known= arbitrary_fields; *known; known++)
+    if (strcasecmp(field->name, *known) == 0)
+      return 1;
+
+  return 0;
+}
+
 /* Do a quick check if vstring is a valid versionnumber. Valid in this case
  * means it contains at least one digit. If an error is found increment
  * *errs.
@@ -223,6 +238,9 @@ void do_build(const char *const *argv) {
       warns++;
     }
     for (field= checkedinfo->available.arbs; field; field= field->next) {
+      if (known_arbitrary_field(field))
+        continue;
+
       fprintf(stderr, _("warning, `%s' contains user-defined field `%s'\n"),
               controlfile, field->name);
       warns++;
diff --git a/man/ChangeLog b/man/ChangeLog
index 8a3ca54..46b078e 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,8 @@
+2007-08-20  Guillem Jover  <[EMAIL PROTECTED]>
+
+       * deb-control.5: Document Homepage field.
+       * dpkg-query.1: Document Homepage as a recognized field.
+
 2007-08-18  Guillem Jover  <[EMAIL PROTECTED]>
 
        * po/dpkg-man.pot: Regenerated.
diff --git a/man/deb-control.5 b/man/deb-control.5
index 3cde45c..c01c5b7 100644
--- a/man/deb-control.5
+++ b/man/deb-control.5
@@ -85,6 +85,9 @@ etc. Note that the
 option is meant for packages that are architecture independent. Some examples
 of this are shell and Perl scripts, and documentation.
 .TP
+.BR Homepage: " <url>"
+The upstream project home page URL.
+.TP
 .BR Source: " <source name>"
 The name of the source package that this binary package came from, if
 different than the name of the package itself.
diff --git a/man/dpkg-query.1 b/man/dpkg-query.1
index 9f03411..4f5bad7 100644
--- a/man/dpkg-query.1
+++ b/man/dpkg-query.1
@@ -109,6 +109,7 @@ alignment will be used. The following \fIfield\fRs are 
recognised:
     \fBEnhances\fP
     \fBEssential\fP
     \fBFilename\fP
+    \fBHomepage\fP
     \fBInstalled\-Size\fP
     \fBMD5sum\fP
     \fBMSDOS\-Filename\fP
diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl
index 967eede..ba50119 100755
--- a/scripts/dpkg-genchanges.pl
+++ b/scripts/dpkg-genchanges.pl
@@ -208,7 +208,7 @@ for $_ (keys %fi) {
        elsif (m/^Section$|^Priority$/i) { $sourcedefault{$_}= $v; }
        elsif (m/^Maintainer$/i) { $f{$_}= $v; }
        elsif (s/^X[BS]*C[BS]*-//i) { $f{$_}= $v; }
-       elsif (m/|^X[BS]+-|^Standards-Version$/i) { }
+       elsif (m/|^X[BS]+-|^Standards-Version$|^Homepage$/i) { }
        else { &unknown(_g('general section of control info file')); }
     } elsif (s/^C(\d+) //) {
        my $i = $1;
diff --git a/scripts/dpkg-gencontrol.pl b/scripts/dpkg-gencontrol.pl
index bdaaa00..98fb7c4 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 Description));
+                      qw(Section Priority Homepage Description));
 
 my $controlfile = 'debian/control';
 my $changelogfile = 'debian/changelog';
@@ -146,7 +146,7 @@ for $_ (keys %fi) {
 
     if (s/^C //) {
 #print STDERR "G key >$_< value >$v<\n";
-       if (m/^(Origin|Bugs|Maintainer)$/) {
+       if (m/^(Origin|Bugs|Maintainer|Homepage)$/) {
            $f{$_} = $v;
        } elsif (m/^Source$/) {
            setsourcepackage($v);
diff --git a/scripts/dpkg-scanpackages.pl b/scripts/dpkg-scanpackages.pl
index fd4c1ce..e1b35b5 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 Description));
+                   Size MD5sum Section Priority Homepage Description));
 
 # This maps the fields into the proper case
 my %field_case;
diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl
index 9706f23..e2229fa 100755
--- a/scripts/dpkg-source.pl
+++ b/scripts/dpkg-source.pl
@@ -76,7 +76,8 @@ our @src_dep_fields;
 textdomain("dpkg-dev");
 
 my @dsc_fields = (qw(Format Source Binary Architecture Version Origin
-                     Maintainer Uploaders Standards-Version), @src_dep_fields);
+                     Maintainer Uploaders Homepage Standards-Version),
+                  @src_dep_fields);
 
 
 # Make sure patch doesn't get any funny ideas
@@ -238,8 +239,9 @@ if ($opmode eq 'build') {
         if (s/^C //) {
            if (m/^Source$/i) {
                setsourcepackage($v);
+           } elsif (m/^(Standards-Version|Origin|Maintainer|Homepage)$/i) {
+               $f{$_}= $v;
            }
-            elsif (m/^(Standards-Version|Origin|Maintainer)$/i) { $f{$_}= $v; }
            elsif (m/^Uploaders$/i) { ($f{$_}= $v) =~ s/[\r\n]//g; }
            elsif (m/^Build-(Depends|Conflicts)(-Indep)?$/i) {
                my $dep = parsedep(substvars($v),1);

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to