&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.
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.
}
}
- 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.
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
=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
* 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
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});
}
$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";
}
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
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