From 2d76f9e8cf76146e7b24ac4232918f584cfb8a16 Mon Sep 17 00:00:00 2001 From: joey Date: Sat, 17 Nov 2001 21:01:33 +0000 Subject: r495: * 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 --- Debian/Debhelper/Dh_Lib.pm | 9 +++++++++ debhelper.pod | 3 ++- debian/changelog | 18 ++++++++++++++++++ dh_installdeb | 4 ++-- dh_installman | 2 +- dh_movefiles | 2 +- dh_undocumented | 10 ++++++++-- 7 files changed, 41 insertions(+), 7 deletions(-) diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm index 4beaa0dc..fd3c12ec 100644 --- a/Debian/Debhelper/Dh_Lib.pm +++ b/Debian/Debhelper/Dh_Lib.pm @@ -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 () { @@ -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') || diff --git a/debhelper.pod b/debhelper.pod index 5dd215c3..676ad0d0 100644 --- a/debhelper.pod +++ b/debhelper.pod @@ -91,7 +91,8 @@ Act on all architecture independent packages. =item B<->I, B<--package=>I -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> diff --git a/debian/changelog b/debian/changelog index 93e708fe..9d0b5846 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Sat, 17 Nov 2001 14:00:54 -0500 + +debhelper (3.0.49) unstable; urgency=low + + * More informative error, Closes: #118767 + + -- Joey Hess 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), diff --git a/dh_installdeb b/dh_installdeb index a97fc009..1b363a9f 100755 --- a/dh_installdeb +++ b/dh_installdeb @@ -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"); diff --git a/dh_installman b/dh_installman index c5efe70c..a01f63d1 100755 --- a/dh_installman +++ b/dh_installman @@ -165,7 +165,7 @@ sub find_so_man { } # Test first line of file for the .so thing. - open (SOTEST,$_); + open (SOTEST,$_) || die "$_: $!"; my $l=; close SOTEST; if ($l=~m/\.so\s+(.*)/) { diff --git a/dh_movefiles b/dh_movefiles index b4e1a6f6..afed17ca 100755 --- a/dh_movefiles +++ b/dh_movefiles @@ -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"); diff --git a/dh_undocumented b/dh_undocumented index 2242ffd6..da96473e 100755 --- a/dh_undocumented +++ b/dh_undocumented @@ -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"); } } -- cgit v1.2.3