summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Debian/Debhelper/Dh_Lib.pm20
-rw-r--r--autoscripts/postinst-wm4
-rw-r--r--debhelper.pod22
-rw-r--r--debian/changelog19
-rw-r--r--debian/compat2
-rwxr-xr-xdh_builddeb11
-rwxr-xr-xdh_installman14
-rwxr-xr-xdh_installwm4
-rw-r--r--doc/TODO10
9 files changed, 80 insertions, 26 deletions
diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index 64b8b79..9767959 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -16,7 +16,7 @@ use vars qw(@ISA @EXPORT %dh);
&compat &addsubstvar &delsubstvar &excludefile &package_arch
&is_udeb &udeb_filename &debhelper_script_subst &escape_shell);
-my $max_compat=5;
+my $max_compat=6;
sub init {
# If DH_OPTIONS is set, prepend it @ARGV.
@@ -405,7 +405,7 @@ sub autoscript {
my $filename=shift;
my $sed=shift || "";
- # This is the file we will append to.
+ # This is the file we will modify.
my $outfile="debian/".pkgext($package)."$script.debhelper";
# Figure out what shell script snippet to use.
@@ -423,9 +423,19 @@ sub autoscript {
}
}
- complex_doit("echo \"# Automatically added by ".basename($0)."\">> $outfile");
- complex_doit("sed \"$sed\" $infile >> $outfile");
- complex_doit("echo '# End automatically added section' >> $outfile");
+ if (-e $outfile && ($script eq 'postrm' || $script eq 'prerm')) {
+ # Add fragments to top so they run in reverse order when removing.
+ complex_doit("echo \"# Automatically added by ".basename($0)."\"> $outfile.new");
+ complex_doit("sed \"$sed\" $infile >> $outfile.new");
+ complex_doit("echo '# End automatically added section' >> $outfile.new");
+ complex_doit("cat $outfile >> $outfile.new");
+ complex_doit("mv $outfile.new $outfile");
+ }
+ else {
+ complex_doit("echo \"# Automatically added by ".basename($0)."\">> $outfile");
+ complex_doit("sed \"$sed\" $infile >> $outfile");
+ complex_doit("echo '# End automatically added section' >> $outfile");
+ }
}
# Removes a whole substvar line.
diff --git a/autoscripts/postinst-wm b/autoscripts/postinst-wm
index aef412a..d47aefa 100644
--- a/autoscripts/postinst-wm
+++ b/autoscripts/postinst-wm
@@ -1,4 +1,6 @@
if [ "$1" = "configure" ]; then
update-alternatives --install /usr/bin/x-window-manager \
- x-window-manager #WM# #PRIORITY#
+ x-window-manager #WM# #PRIORITY# \
+ --slave /usr/share/man/man1/x-window-manager.1.gz \
+ x-window-manager /usr/share/man/man1/#WM#.1.gz
fi
diff --git a/debhelper.pod b/debhelper.pod
index bf932f0..123f726 100644
--- a/debhelper.pod
+++ b/debhelper.pod
@@ -353,6 +353,28 @@ dh_install errors out if wildcards expand to nothing.
=back
+=item V6
+
+This mode is still under development. Currently it has these differences
+compared to V5:
+
+=over 8
+
+=item -
+
+dh_installwm will install a slave manpage link for x-window-manager.1.gz.
+
+=item -
+
+dh_builddeb did not previously delete everything matching
+DH_ALWAYS_EXCLUDE, if it was set to a list of things to exclude, such as
+"CVS:.svn". Now it does.
+
+=item -
+
+dh_installman allows overwriting existing man pages in the package build
+directory. In previous compatability levels it silently refuses to do this.
+
=back
=head2 Doc directory symlinks
diff --git a/debian/changelog b/debian/changelog
index 1a78315..7df38da 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,23 @@ debhelper (5.0.44) UNRELEASED; urgency=low
* dh_installudev: Don't fail if the link already somehow exists on initial
package install. Closes: #415717
-
- -- Joey Hess <joeyh@debian.org> Mon, 09 Apr 2007 14:37:48 -0400
+ * prerm and postrm scripts are now generated in a reverse order than
+ preinst and postinst scripts. For example, if a package uses
+ dh_pysupport before dh_installinit, the prerm will first stop the init
+ script and then remove the python files.
+ * Introducing beginning of v6 mode.
+ * dh_installwm: In v6 mode, install a slave manpage link for
+ x-window-manager.1.gz. Done in v6 mode because some window managers
+ probably work around this longstanding debhelper bug by registering the
+ slave on their own. This bug was only fixable once programs moved out of
+ /usr/X11R6. Closes: #85963
+ * dh_builddeb: In v6 mode, fix bug in DH_ALWAYS_EXCLUDE handling, to work
+ the same as all the other code in debhelper. This could only be fixed in
+ v6 mode because packages may potentially legitimately rely on the old
+ buggy behavior. Closes: #242834
+ * dh_installman: In v6 mode, overwrite exsiting man pages. Closes: #288250
+
+ -- Joey Hess <joeyh@debian.org> Mon, 09 Apr 2007 15:18:22 -0400
debhelper (5.0.43) unstable; urgency=low
diff --git a/debian/compat b/debian/compat
index 7ed6ff8..1e8b314 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-5
+6
diff --git a/dh_builddeb b/dh_builddeb
index 31bcdc6..dcc5af5 100755
--- a/dh_builddeb
+++ b/dh_builddeb
@@ -60,8 +60,15 @@ else {
foreach my $package (@{$dh{DOPACKAGES}}) {
my $tmp=tmpdir($package);
if (exists $ENV{DH_ALWAYS_EXCLUDE} && length $ENV{DH_ALWAYS_EXCLUDE}) {
- complex_doit("find $tmp -name $_ | xargs rm -rf")
- foreach split(":", $ENV{DH_ALWAYS_EXCLUDE});
+ if (! compat(5)) {
+ complex_doit("find $tmp $dh{EXCLUDE_FIND} | xargs rm -rf");
+ }
+ else {
+ # Old broken code here for compatability. Does not
+ # remove everything.
+ complex_doit("find $tmp -name $_ | xargs rm -rf")
+ foreach split(":", $ENV{DH_ALWAYS_EXCLUDE});
+ }
}
if (! is_udeb($package)) {
doit("dpkg-deb", @{$dh{U_PARAMS}}, "--build", $tmp, $dh{DESTDIR}.$dh{FILENAME});
diff --git a/dh_installman b/dh_installman
index 7f39b93..6dbafb8 100755
--- a/dh_installman
+++ b/dh_installman
@@ -163,14 +163,14 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
}
$destdir=~tr:/:/:s; # just for looks
- if (! -e "$destdir/$instname.$section" &&
- ! -l "$destdir/$instname.$section") {
- if (! -d $destdir) {
- doit "install","-d",$destdir;
- }
- doit "install","-p","-m644",$page,
- "$destdir$instname.$section$gz";
+ next if -l "$destdir/$instname.$section";
+ next if compat(5) && -e "$destdir/$instname.$section";
+
+ if (! -d $destdir) {
+ doit "install","-d",$destdir;
}
+ doit "install","-p","-m644",$page,
+ "$destdir$instname.$section$gz";
}
diff --git a/dh_installwm b/dh_installwm
index 31ce63c..1989056 100755
--- a/dh_installwm
+++ b/dh_installwm
@@ -17,7 +17,9 @@ B<dh_installwm> [S<I<debhelper options>>] [B<-n>] [B<--priority=>I<n>] [S<I<wm .
dh_installwm is a debhelper program that is responsible for
generating the postinst and postrm commands that register a window manager
-with L<update-alternatives(8)>
+with L<update-alternatives(8)>. The window manager's man page is also
+registered as a slave symlink (in v6 mode and up), and is assumed to be
+located in /usr/share/man/man1/<wm>.1.gz.
Any window manager programs specified as parameters will be registered in
the first package dh_installwm is told to act on. By default, this is the
diff --git a/doc/TODO b/doc/TODO
index b790a60..c3df66e 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -33,16 +33,12 @@ Wishlist items:
v6:
* escaping in config files (for whitespace)?
-* make dh_installman set up slave links. X11 stuff is no longer
- a problem due to X reorg. #85963
-* fix dh_builddeb DH_ALWAYS_EXCLUDE support to operate same as other
- commands, see #242834
-* Fix #288250
Deprecated:
-* DH_COMPAT 1, 2. Can be removed once all packages are seen to be using 3 or
- higher. I won't hold my breath. Now with evil warning messages though.
+* DH_COMPAT 1, 2, 3. Can be removed once all packages are seen to be using
+ a newer version. I won't hold my breath. Now with evil warning messages
+ though.
* Also, grep the entire archive for all dh_* command lines,
and check to see what other switches are not being used, and maybe remove
some of them. I'd also like to deprecate/remove debian/compress files, -X is