+debhelper (5.0.49) UNRELEASED; urgency=low
+
+ * dh_installwm: Fix several stupid bugs, including:
+ - man page handling was supposed to be v6 only and was not
+ - typo in alternatives call
+ - use the basename of the wm to get the man page name
+ Closes: #420158
+ * dh_installwm: Also make the code to find the man page more robust and
+ fall back to not registering a man page if it is not found.
+
+ -- Joey Hess <joeyh@debian.org> Fri, 20 Apr 2007 13:29:39 -0400
+
debhelper (5.0.48) unstable; urgency=low
* Remove use of #SECTION# from dh_installinfo postinst snippet
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)>. 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.
+registered as a slave symlink (in v6 mode and up), if it is found in
+usr/share/man/man1/ in the package build directory.
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
}
foreach my $package (@{$dh{DOPACKAGES}}) {
-# my $tmp=tmpdir($package);
+ my $tmp=tmpdir($package);
my $file=pkgfile($package,"wm");
my @wm;
}
if (! $dh{NOSCRIPTS}) {
- foreach (@wm) {
- autoscript($package,"postinst","postinst-wm","s:#WM#:$_:;s/#PRIORITY#/$dh{PRIORITY}/",);
- autoscript($package,"prerm","prerm-wm","s:#WM#:$_:");
+WM: foreach my $wm (@wm) {
+ autoscript($package,"prerm","prerm-wm","s:#WM#:$wm:");
+
+ my $wmman;
+ if (! compat(5)) {
+ foreach my $ext (".1", ".1x") {
+ $wmman="/usr/share/man/man1/".basename($wm).$ext;
+ if (-e "$tmp$wmman" || -e "$tmp$wmman.gz") {
+ autoscript($package,"postinst","postinst-wm","s:#WM#:$wm:;s:#WMMAN#:$wmman.gz:;s/#PRIORITY#/$dh{PRIORITY}/",);
+ next WM;
+ }
+ }
+ }
+ autoscript($package,"postinst","postinst-wm-noman","s:#WM#:$wm:;s/#PRIORITY#/$dh{PRIORITY}/",);
}
}
}