my $package="";
my $arch="";
my @list=();
+ my %seen;
open (CONTROL, 'debian/control') ||
error("cannot read debian/control: $!\n");
while (<CONTROL>) {
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') ||
=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>
+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),
# 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");
# 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");
}
# Test first line of file for the .so thing.
- open (SOTEST,$_);
+ open (SOTEST,$_) || die "$_: $!";
my $l=<SOTEST>;
close SOTEST;
if ($l=~m/\.so\s+(.*)/) {
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");
# 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) {
$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");
}
}