Преглед изворни кода

scripts/controllib.pl: add comment with description of global variables
scripts/dpkg-genchanges.pl:
+ add comment with description of global variables
+ Change Format number to 1.7
+ `Maintainer' is now the actual maintainer as listed in control
+ add `Changed-By' field with maintainer as listed in changelog. Add -e
flag to override this value
scripts/dpkg-buildpackage.sh: pass -e on to dpkg-genchanges
scripts/dpkg-source.1: document new -e option, update copyright

Wichert Akkerman пре 26 година
родитељ
комит
c95d38c8d0
8 измењених фајлова са 92 додато и 32 уклоњено
  1. 17 0
      ChangeLog
  2. 2 2
      main/dpkg.8
  3. 6 6
      po/.cvsignore
  4. 13 1
      scripts/controllib.pl
  5. 4 1
      scripts/dpkg-buildpackage.sh
  6. 28 11
      scripts/dpkg-genchanges.pl
  7. 6 6
      scripts/dpkg-gencontrol.pl
  8. 16 5
      scripts/dpkg-source.1

+ 17 - 0
ChangeLog

@@ -1,3 +1,15 @@
+Wed Jan 19 16:41:04 CET 2000 Wichert Akkerman <wakkerma@debian.org>
+
+  * scripts/controllib.pl: add comment with description of global variables
+  * scripts/dpkg-genchanges.pl:
+    + add comment with description of global variables
+    + Change Format number to 1.7
+    + `Maintainer' is now the actual maintainer as listed in control
+    + add `Changed-By' field with maintainer as listed in changelog. Add -e
+      flag to override this value
+  * scripts/dpkg-buildpackage.sh: pass -e on to dpkg-genchanges
+  * scripts/dpkg-source.1: document new -e option, update copyright
+
 Mon Jan 17 21:20:35 CET 2000 Wichert Akkerman <wakkerma@debian.org>
 Mon Jan 17 21:20:35 CET 2000 Wichert Akkerman <wakkerma@debian.org>
 
 
   * dselect/Makefile.in: not all shells support == for strings comparisons
   * dselect/Makefile.in: not all shells support == for strings comparisons
@@ -7,6 +19,11 @@ Mon Jan 17 21:20:35 CET 2000 Wichert Akkerman <wakkerma@debian.org>
     + use objdump instead of ldd
     + use objdump instead of ldd
 	+ correct checks on shlibs.local
 	+ correct checks on shlibs.local
 
 
+Sun Jan 16 22:07:12 CET 2000 Wichert Akkerman <wakkerma@debian.org>
+
+  * main/dpkg.8: note that --force-overwrite is off by default
+  * po/.cvsignore: add all the .gmo files
+
 Sat Jan 15 03:48:47 CET 2000 Wichert Akkerman <wakkerma@debian.org>
 Sat Jan 15 03:48:47 CET 2000 Wichert Akkerman <wakkerma@debian.org>
 
 
   * doc/ja/dpkg-deb.5: updated with patch from Hiroshi KISE <fuyuneko@ryukyu.ne.jp>
   * doc/ja/dpkg-deb.5: updated with patch from Hiroshi KISE <fuyuneko@ryukyu.ne.jp>

+ 2 - 2
main/dpkg.8

@@ -377,10 +377,10 @@ If a conffile has been modified always choose the default action. If
 always default. If there is no default then we use the old or new
 always default. If there is no default then we use the old or new
 version, depending on the option given.
 version, depending on the option given.
 
 
-\fBoverwrite\fP(*):
+\fBoverwrite\fP:
 Overwrite one package's file with another's file.
 Overwrite one package's file with another's file.
 
 
-\fBoverwrite-dir\fP
+\fBoverwrite-dir\fP:
 Overwrite one package's directory with another's file.
 Overwrite one package's directory with another's file.
 
 
 \fBoverwrite-diverted\fP:
 \fBoverwrite-diverted\fP:

+ 6 - 6
po/.cvsignore

@@ -4,11 +4,11 @@ cat-id-tbl.c
 dpkg.pot
 dpkg.pot
 stamp-cat-id
 stamp-cat-id
 POTFILES
 POTFILES
-sv.gmo
-ru.gmo
-pl.gmo
-ja.gmo
-es.gmo
-en.gmo
 cs.gmo
 cs.gmo
+en.gmo
+es.gmo
 fr.gmo
 fr.gmo
+ja.gmo
+pl.gmo
+ru.gmo
+sv.gmo

+ 13 - 1
scripts/controllib.pl

@@ -1,4 +1,16 @@
 
 
+# Global variables:
+# $v                - value parameter to function
+# $sourcepackage    - name of sourcepackage
+# %capit            - map to get properly capitilized version of fields
+# %fi               - map of fields values. keys are of the form "S# key"
+#                     where S is source (L is changelog, C is control)
+#                     and # is an index
+# %p2i              - map from datafile+packagename to index in controlfile
+#                     (used if multiple packages can be listed). Key is
+#                     "S key" where S is the source and key is the packagename
+# %substvar         - map with substitution variables
+
 $parsechangelog= 'dpkg-parsechangelog';
 $parsechangelog= 'dpkg-parsechangelog';
 
 
 grep($capit{lc $_}=$_, qw(Pre-Depends Standards-Version Installed-Size
 grep($capit{lc $_}=$_, qw(Pre-Depends Standards-Version Installed-Size
@@ -6,7 +18,7 @@ grep($capit{lc $_}=$_, qw(Pre-Depends Standards-Version Installed-Size
 			  Build-Conflicts Build-Conflicts-Indep));
 			  Build-Conflicts Build-Conflicts-Indep));
 
 
 
 
-$substvar{'Format'}= 1.6;
+$substvar{'Format'}= 1.7;
 $substvar{'Newline'}= "\n";
 $substvar{'Newline'}= "\n";
 $substvar{'Space'}= " ";
 $substvar{'Space'}= " ";
 $substvar{'Tab'}= "\t";
 $substvar{'Tab'}= "\t";

+ 4 - 1
scripts/dpkg-buildpackage.sh

@@ -24,7 +24,8 @@ Options: -r<gain-root-command>
          -b            binary-only, do not build source } also passed to
          -b            binary-only, do not build source } also passed to
          -B            binary-only, no arch-indep files } dpkg-genchanges
          -B            binary-only, no arch-indep files } dpkg-genchanges
          -v<version>   changes since version <version>      }
          -v<version>   changes since version <version>      }
-         -m<maint>     maintainer for release is <maint>    } only passed
+         -m<maint>     maintainer for package is <maint>    } 
+         -e<maint>     maintainer for release is <maint>    } only passed
          -C<descfile>  changes are described in <descfile>  }  to dpkg-
          -C<descfile>  changes are described in <descfile>  }  to dpkg-
          -si (default) src includes orig for rev. 0 or 1    } genchanges
          -si (default) src includes orig for rev. 0 or 1    } genchanges
          -sa           uploaded src always includes orig    }
          -sa           uploaded src always includes orig    }
@@ -82,6 +83,7 @@ do
 	-B)	binaryonly=-B; binarytarget=binary-arch ;;
 	-B)	binaryonly=-B; binarytarget=binary-arch ;;
 	-v*)	since="$value" ;;
 	-v*)	since="$value" ;;
 	-m*)	maint="$value" ;;
 	-m*)	maint="$value" ;;
+	-e*)	changedby="$value" ;;
 	-C*)	descfile="$value" ;;
 	-C*)	descfile="$value" ;;
 	*)	echo >&2 "$progname: unknown option or argument $1"
 	*)	echo >&2 "$progname: unknown option or argument $1"
 		usageversion; exit 2 ;;
 		usageversion; exit 2 ;;
@@ -151,6 +153,7 @@ withecho () {
 
 
 set -- $binaryonly $sourcestyle
 set -- $binaryonly $sourcestyle
 if [ -n "$maint"	]; then set -- "$@" "-m$maint"		; fi
 if [ -n "$maint"	]; then set -- "$@" "-m$maint"		; fi
+if [ -n "$changedby"	]; then set -- "$@" "-e$changedby"	; fi
 if [ -n "$since"	]; then set -- "$@" "-v$since"		; fi
 if [ -n "$since"	]; then set -- "$@" "-v$since"		; fi
 if [ -n "$desc"		]; then set -- "$@" "-C$desc"		; fi
 if [ -n "$desc"		]; then set -- "$@" "-C$desc"		; fi
 
 

+ 28 - 11
scripts/dpkg-genchanges.pl

@@ -11,6 +11,17 @@ $uploadfilesdir= '..';
 $sourcestyle= 'i';
 $sourcestyle= 'i';
 $quiet= 0;
 $quiet= 0;
 
 
+# Other global variables used:
+# %f2p             - file to package map
+# %p2f             - package to file map
+#                    has entries for both "packagename" and "packagename architecture"
+# %p2ver           - package to version map
+# %f2sec           - file to section map
+# %f2pri           - file to priority map
+# %sourcedefault   - default values as taken from source (used for Section,
+#                    Priority and Maintainer)
+# $changedby       - person who created this package (as listed in changelog)
+
 use POSIX;
 use POSIX;
 use POSIX qw(:errno_h :signal_h);
 use POSIX qw(:errno_h :signal_h);
 
 
@@ -19,9 +30,11 @@ require 'controllib.pl';
 
 
 sub usageversion {
 sub usageversion {
     print STDERR
     print STDERR
-"Debian GNU/Linux dpkg-genchanges $version.  Copyright (C) 1996
-Ian Jackson.  This is free software; see the GNU General Public Licence
-version 2 or later for copying conditions.  There is NO warranty.
+"Debian GNU/Linux dpkg-genchanges $version. 
+Copyright (C) 1996 Ian Jackson.
+Copyright (C) 2000 Wichert Akkerman.
+This is free software; see the GNU General Public Licence version 2 or later
+for copying conditions.  There is NO warranty.
 
 
 Usage: dpkg-genchanges [options ...]
 Usage: dpkg-genchanges [options ...]
 
 
@@ -32,7 +45,8 @@ Options:  -b                     binary-only build - no source files
           -f<fileslistfile>      get .deb files list from this file
           -f<fileslistfile>      get .deb files list from this file
           -v<sinceversion>       include all changes later than version
           -v<sinceversion>       include all changes later than version
           -C<changesdescription> use change description from this file
           -C<changesdescription> use change description from this file
-          -m<maintainer>         override changelog's maintainer value
+          -m<maintainer>         override control's maintainer value
+          -e<maintainer>         override changelog's maintainer value
           -u<uploadfilesdir>     directory with files (default is \`..')
           -u<uploadfilesdir>     directory with files (default is \`..')
           -si (default)          src includes orig for debian-revision 0 or 1
           -si (default)          src includes orig for debian-revision 0 or 1
           -sa                    source includes orig src
           -sa                    source includes orig src
@@ -78,6 +92,8 @@ while (@ARGV) {
         $varlistfile= $';
         $varlistfile= $';
     } elsif (m/^-m/) {
     } elsif (m/^-m/) {
         $forcemaint= $';
         $forcemaint= $';
+    } elsif (m/^-e/) {
+        $forcechangedby= $';
     } elsif (m/^-F([0-9a-z]+)$/) {
     } elsif (m/^-F([0-9a-z]+)$/) {
         $changelogformat=$1;
         $changelogformat=$1;
     } elsif (m/^-D([^\=:]+)[=:]/) {
     } elsif (m/^-D([^\=:]+)[=:]/) {
@@ -129,14 +145,13 @@ close(FL);
 for $_ (keys %fi) {
 for $_ (keys %fi) {
     $v= $fi{$_};
     $v= $fi{$_};
     if (s/^C //) {
     if (s/^C //) {
-#print STDERR "G key >$_< value >$v<\n";
 	if (m/^Source$/) { &setsourcepackage; }
 	if (m/^Source$/) { &setsourcepackage; }
-	elsif (m/^Section$|^Priority$/) { $sourcedefault{$_}= $v; }
+	elsif (m/^Section$|^Priority$/i) { $sourcedefault{$_}= $v; }
+	elsif (m/^Maintainer$/i) { $f{$_}= $v; }
 	elsif (s/^X[BS]*C[BS]*-//i) { $f{$_}= $v; }
 	elsif (s/^X[BS]*C[BS]*-//i) { $f{$_}= $v; }
-	elsif (m/|^X[BS]+-|^Standards-Version$|^Maintainer$/i) { }
+	elsif (m/|^X[BS]+-|^Standards-Version$/i) { }
 	else { &unknown('general section of control info file'); }
 	else { &unknown('general section of control info file'); }
     } elsif (s/^C(\d+) //) {
     } elsif (s/^C(\d+) //) {
-#print STDERR "P key >$_< value >$v<\n";
 	$i=$1; $p=$fi{"C$i Package"}; $a=$fi{"C$i Architecture"};
 	$i=$1; $p=$fi{"C$i Package"}; $a=$fi{"C$i Architecture"};
 	if (!defined($p2f{$p})) {
 	if (!defined($p2f{$p})) {
 	    if ($a eq 'any' || ($a eq 'all' && !$archspecific) ||
 	    if ($a eq 'any' || ($a eq 'all' && !$archspecific) ||
@@ -170,10 +185,11 @@ for $_ (keys %fi) {
 	    }
 	    }
 	}
 	}
     } elsif (s/^L //) {
     } elsif (s/^L //) {
-#print STDERR "L key >$_< value >$v<\n";
-        if (m/^Source$/) {
+        if (m/^Source$/i) {
             &setsourcepackage;
             &setsourcepackage;
-        } elsif (m/^(Version|Maintainer|Changes|Urgency|Distribution|Date|Closes)$/) {
+        } elsif (m/^Maintainer$/i) {
+	    $f{"Changed-By"}=$v;
+        } elsif (m/^(Version|Changes|Urgency|Distribution|Date|Closes)$/i) {
             $f{$_}= $v;
             $f{$_}= $v;
         } elsif (s/^X[BS]*C[BS]*-//i) {
         } elsif (s/^X[BS]*C[BS]*-//i) {
             $f{$_}= $v;
             $f{$_}= $v;
@@ -288,6 +304,7 @@ for $f (@sourcefiles,@fileslistfiles) {
 $f{'Source'}= $sourcepackage;
 $f{'Source'}= $sourcepackage;
 
 
 $f{'Maintainer'}= $forcemaint if length($forcemaint);
 $f{'Maintainer'}= $forcemaint if length($forcemaint);
+$f{'Changed-By'}= $forcechangedby if length($forcechangedby);
 
 
 for $f (qw(Version Distribution Maintainer Changes)) {
 for $f (qw(Version Distribution Maintainer Changes)) {
     defined($f{$f}) || &error("missing information for critical output field $f");
     defined($f{$f}) || &error("missing information for critical output field $f");

+ 6 - 6
scripts/dpkg-gencontrol.pl

@@ -43,7 +43,7 @@ Options:  -p<package>            print control file for package
 }
 }
 
 
 $i=100;grep($fieldimps{$_}=$i--,
 $i=100;grep($fieldimps{$_}=$i--,
-          qw(Package Version Section Priority Architecture Essential
+          qw(Package Source-Version Section Priority Architecture Essential
              Pre-Depends Depends Recommends Suggests Enhances Optional 
              Pre-Depends Depends Recommends Suggests Enhances Optional 
 	     Conflicts Replaces Provides Installed-Size Maintainer Source
 	     Conflicts Replaces Provides Installed-Size Maintainer Source
 	     Description Build-Depends Build-Depends-Indep Build-Conflicts
 	     Description Build-Depends Build-Depends-Indep Build-Conflicts
@@ -147,7 +147,7 @@ for $_ (keys %fi) {
             &setsourcepackage;
             &setsourcepackage;
         } elsif (m/^Version$/) {
         } elsif (m/^Version$/) {
             $sourceversion= $v;
             $sourceversion= $v;
-            $f{$_}= $v unless length($forceversion);
+            $f{"Source-Version"}= $v unless length($forceversion);
         } elsif (m/^(Maintainer|Changes|Urgency|Distribution|Date|Closes)$/) {
         } elsif (m/^(Maintainer|Changes|Urgency|Distribution|Date|Closes)$/) {
         } elsif (s/^X[CS]*B[CS]*-//i) {
         } elsif (s/^X[CS]*B[CS]*-//i) {
             $f{$_}= $v;
             $f{$_}= $v;
@@ -159,14 +159,14 @@ for $_ (keys %fi) {
     }
     }
 }
 }
 
 
-$f{'Version'}= $forceversion if length($forceversion);
+$f{'Source-Version'}= $forceversion if length($forceversion);
 
 
 for $f (qw(Section Priority)) {
 for $f (qw(Section Priority)) {
     $spvalue{$f}= $spdefault{$f} unless length($spvalue{$f});
     $spvalue{$f}= $spdefault{$f} unless length($spvalue{$f});
     $f{$f}= $spvalue{$f} if $spinclude{$f} && length($spvalue{$f});
     $f{$f}= $spvalue{$f} if $spinclude{$f} && length($spvalue{$f});
 }
 }
 
 
-for $f (qw(Package Version)) {
+for $f (qw(Package Source-Version)) {
     defined($f{$f}) || &error("missing information for output field $f");
     defined($f{$f}) || &error("missing information for output field $f");
 }
 }
 for $f (qw(Maintainer Description Architecture)) {
 for $f (qw(Maintainer Description Architecture)) {
@@ -174,7 +174,7 @@ for $f (qw(Maintainer Description Architecture)) {
 }
 }
 $oppackage= $f{'Package'};
 $oppackage= $f{'Package'};
 
 
-$verdiff= $f{'Version'} ne $sourceversion;
+$verdiff= $f{'Source-Version'} ne $sourceversion;
 if ($oppackage ne $sourcepackage || $verdiff) {
 if ($oppackage ne $sourcepackage || $verdiff) {
     $f{'Source'}= $sourcepackage;
     $f{'Source'}= $sourcepackage;
     $f{'Source'}.= " ($sourceversion)" if $verdiff;
     $f{'Source'}.= " ($sourceversion)" if $verdiff;
@@ -212,7 +212,7 @@ if (open(X,"< $fileslistfile")) {
 } elsif ($! != ENOENT) {
 } elsif ($! != ENOENT) {
     &syserr("read old files list file");
     &syserr("read old files list file");
 }
 }
-$sversion=$f{'Version'};
+$sversion=$f{'Source-Version'};
 $sversion =~ s/^\d+://;
 $sversion =~ s/^\d+://;
 print(Y &substvars(sprintf("%s_%s_%s.deb %s %s\n",
 print(Y &substvars(sprintf("%s_%s_%s.deb %s %s\n",
                            $oppackage,$sversion,$f{'Architecture'},
                            $oppackage,$sversion,$f{'Architecture'},

+ 16 - 5
scripts/dpkg-source.1

@@ -1,6 +1,6 @@
 .\" Hey, Emacs!  This is an -*- nroff -*- source file.
 .\" Hey, Emacs!  This is an -*- nroff -*- source file.
 .\" Authors: Ian Jackson
 .\" Authors: Ian Jackson
-.TH DPKG\-SOURCE 1 "7th August" "Debian Project" "Debian GNU/Linux manual"
+.TH DPKG\-SOURCE 1 "Januari 2000" "Debian Project" "Debian GNU/Linux manual"
 .SH NAME 
 .SH NAME 
 dpkg\-source, dpkg\-gencontrol, dpkg\-shlibdeps, dpkg\-genchanges,
 dpkg\-source, dpkg\-gencontrol, dpkg\-shlibdeps, dpkg\-genchanges,
 dpkg\-buildpackage, dpkg\-distaddfile, dpkg\-parsechangelog
 dpkg\-buildpackage, dpkg\-distaddfile, dpkg\-parsechangelog
@@ -119,6 +119,14 @@ file.  This is understood by
 .BI -m maintaineraddress
 .BI -m maintaineraddress
 Use
 Use
 .I maintaineraddress
 .I maintaineraddress
+as the name and email address of the maintainer for this package,
+rather than using the information from the source tree's control.
+This is understood by
+.BR dpkg-buildpackage " and " dpkg-genchanges .
+.TP
+.BI -e maintaineraddress
+Use
+.I maintaineraddress
 as the name and email address of the maintainer for this upload,
 as the name and email address of the maintainer for this upload,
 rather than using the information from the source tree's changelog.
 rather than using the information from the source tree's changelog.
 This is understood by
 This is understood by
@@ -488,7 +496,7 @@ output, rather than being added to the substitution variables file
 .RB ( debian/substvars
 .RB ( debian/substvars
 by default).
 by default).
 .SH DPKG-GENCHANGES OPTIONS
 .SH DPKG-GENCHANGES OPTIONS
-.B dpkg-gencontrol
+.B dpkg-genchanges
 does not take any non-option arguments.
 does not take any non-option arguments.
 .TP
 .TP
 .BI -u uploadfilesdir
 .BI -u uploadfilesdir
@@ -753,9 +761,12 @@ and initial arguments for
 .BR gpg (1),
 .BR gpg (1),
 .BR pgp (1).
 .BR pgp (1).
 .SH AUTHOR
 .SH AUTHOR
-The utilities and this manpage were written by Ian Jackson.  They are
-Copyright (C)1995-1996 by him and released under the GNU General
-Public Licence; there is NO WARRANTY.  See
+The utilities and this manpage were written by Ian Jackson.
+.SH COPYRIGHT
+Copyright (C) 1995-1996 Ian Jackson
+Copyright (C) 2000 Wichert Akkerman
+This is free software; see the GNU General Public Licence version 2 or later
+for copying conditions. There is NO WARRANTY.  See
 .B /usr/share/doc/dpkg/copyright
 .B /usr/share/doc/dpkg/copyright
 and
 and
 .B /usr/share/common-licenses/GPL
 .B /usr/share/common-licenses/GPL