]> git.donarmstrong.com Git - debhelper.git/commitdiff
r495: * dh_undocumented: check for existing uncompressed man pages. Closes: #87972
authorjoey <joey>
Sat, 17 Nov 2001 21:01:33 +0000 (21:01 +0000)
committerjoey <joey>
Sat, 17 Nov 2001 21:01:33 +0000 (21:01 +0000)
   * Optimized dh_installdeb conffile finding. Closes: #119035
   * dh_installdeb: changed the #!/bin/sh -e to set -e on a new line. Whether
     this additional bloat is worth it to make it easier for people to sh -x
     a script by hand is debatable either way, I guess. Closes: #119046
   * Added a check for duplicated package stanzas in debian/control,
Closes: #118805
Debian/Debhelper/Dh_Lib.pm
debhelper.pod
debian/changelog
dh_installdeb
dh_installman
dh_movefiles
dh_undocumented

index 4beaa0dc4f90b65875a8a5384c6a71614f46e349..fd3c12ecf7e25af2bc2d23fe01bcc86e229e1c8c 100644 (file)
@@ -412,6 +412,7 @@ sub GetPackages {
        my $package="";
        my $arch="";
        my @list=();
+       my %seen;
        open (CONTROL, 'debian/control') ||
                error("cannot read debian/control: $!\n");
        while (<CONTROL>) {
@@ -419,10 +420,18 @@ sub GetPackages {
                s/\s+$//;
                if (/^Package:\s*(.*)/) {
                        $package=$1;
+                       # Detect duplicate package names in the same control file.
+                       if (! $seen{$package}) {
+                               $seen{$package}=1;
+                       }
+                       else {
+                               error("debian/control has a duplicate entry for $package");
+                       }
                }
                if (/^Architecture:\s*(.*)/) {
                        $arch=$1;
                }
+               
                if (!$_ or eof) { # end of stanza.
                        if ($package &&
                            (($type eq 'indep' && $arch eq 'all') ||
index 5dd215c3f4bb74e6bc4c066893c0119b3444d192..676ad0d0b3ca21adec5296993820b22104a28e6a 100644 (file)
@@ -91,7 +91,8 @@ Act on all architecture independent packages.
 
 =item B<->I<ppackage>, B<--package=>I<package>
 
-Act on the package named "package".
+Act on the package named "package". This option may be specified multiple
+times to make debhelper operate on a given set of packages.
 
 =item B<-s>, B<--same-arch>
 
index 93e708fe76ef9357b06ac82d7721d7db3f6f9b3c..9d0b584620404a6c4196b2b1c89918017d4d76b4 100644 (file)
@@ -1,3 +1,21 @@
+debhelper (3.0.50) unstable; urgency=low
+
+  * dh_undocumented: check for existing uncompressed man pages. Closes: #87972
+  * Optimized dh_installdeb conffile finding. Closes: #119035
+  * dh_installdeb: changed the #!/bin/sh -e to set -e on a new line. Whether
+    this additional bloat is worth it to make it easier for people to sh -x
+    a script by hand is debatable either way, I guess. Closes: #119046
+  * Added a check for duplicated package stanzas in debian/control, 
+    Closes: #118805
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 17 Nov 2001 14:00:54 -0500
+
+debhelper (3.0.49) unstable; urgency=low
+
+  * More informative error, Closes: #118767
+
+ -- Joey Hess <joeyh@debian.org>  Thu,  8 Nov 2001 18:12:11 -0500
+
 debhelper (3.0.48) unstable; urgency=low
 
   * Added .zip and .jar to list of things to compress (Closes: #115735),
index a97fc00943f88688a9e2aeb3eb4967ece23cd896..1b363a9fd72607693e73371383ba9a5d687fa175 100755 (executable)
@@ -75,7 +75,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                        # Auto-generate script header and add .debhelper
                        # content to it.
                        if (-f "debian/$ext$file.debhelper") {
-                               complex_doit("echo '#!/bin/sh -e' > $tmp/DEBIAN/$file");
+                               complex_doit("printf '#!/bin/sh\nset -e\n' > $tmp/DEBIAN/$file");
                                complex_doit("cat debian/$ext$file.debhelper >> $tmp/DEBIAN/$file");
                                doit("chown","0.0","$tmp/DEBIAN/$file");
                                doit("chmod",755,"$tmp/DEBIAN/$file");
@@ -94,7 +94,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        # Automatic conffiles registration: If it is in /etc, it is a
        # conffile.
        if (! compat(2) && -d "$tmp/etc") {
-               complex_doit("find $tmp/etc -type f |sed 's~^$tmp~~' >> $tmp/DEBIAN/conffiles");
+               complex_doit("find $tmp/etc -type f -printf '/etc/%P\n' >> $tmp/DEBIAN/conffiles");
                # Anything found?
                if (-z "$tmp/DEBIAN/conffiles") {
                        doit("rm", "-f", "$tmp/DEBIAN/conffiles");
index c5efe70c806cd6e6f2742f1981c4974c3bfdb9d2..a01f63d103cd504d7cea5007e4d112fa2adbbd5c 100755 (executable)
@@ -165,7 +165,7 @@ sub find_so_man {
        }
 
        # Test first line of file for the .so thing.
-       open (SOTEST,$_);
+       open (SOTEST,$_) || die "$_: $!";
        my $l=<SOTEST>;
        close SOTEST;
        if ($l=~m/\.so\s+(.*)/) {
index b4e1a6f6315d94a3b7fe55abc619fa5970cc8aa6..afed17cad98b6c34373268e59a8afab1352f1d47 100755 (executable)
@@ -120,7 +120,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                        my $file=$_;
                        if (! -e $file && ! -l $file) {
                                $ret=1;
-                               warning("$file not found");
+                               warning("$file not found (supposed to put it in $package)");
                        }
                        $file=~s:^\Q$sourcedir\E/+::;
                        complex_doit("(cd $sourcedir >/dev/null ; find $file ! -type d -print || true) >> debian/movelist");
index 2242ffd6dc0f294ebeca4c7b7d519478fe9921a1..da96473e0d1e68ff8cff9b6410ca37e32c9d971a 100755 (executable)
@@ -78,7 +78,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 
                # Determine what directory the file belongs in,
                # /usr/share/man, or /usr/X11R6/man, and how the link to
-               # the undocuemtned.7 man page will look.
+               # the undocumented.7 man page will look.
                my ($dir, $reldir);
                my ($section)=$file=~m/^.*\.(\d)/;
                if (!$section) {
@@ -93,9 +93,15 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                        $reldir="";
                }
 
+               # If an uncompressed version of the page exists, something
+               # is weird.
+               if (-e "$tmp/$dir/$file") {
+                       error("A man page $tmp/$dir/$file exists.");
+               }
+               
                if (! -d "$tmp/$dir") {
                        doit("install","-d","$tmp/$dir");
-               }
+               }               
                doit("ln","-sf","${reldir}undocumented.7.gz","$tmp/$dir/$file.gz");
        }
 }