summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoscripts/postinst-emacsen3
-rw-r--r--autoscripts/postinst-info4
-rw-r--r--autoscripts/postinst-info-nosection4
-rw-r--r--autoscripts/postinst-menu2
-rw-r--r--autoscripts/postinst-mime2
-rw-r--r--autoscripts/postinst-modules6
-rw-r--r--autoscripts/postinst-suid12
-rw-r--r--autoscripts/postinst-wm6
-rw-r--r--autoscripts/postinst-xaw9
-rw-r--r--autoscripts/postinst-xfonts16
-rw-r--r--autoscripts/postrm-menu1
-rw-r--r--autoscripts/postrm-mime1
-rw-r--r--autoscripts/postrm-modules2
-rw-r--r--debian/changelog11
-rwxr-xr-xdh_clean10
-rw-r--r--dh_clean.17
16 files changed, 71 insertions, 25 deletions
diff --git a/autoscripts/postinst-emacsen b/autoscripts/postinst-emacsen
index 48bf26e7..97004eb7 100644
--- a/autoscripts/postinst-emacsen
+++ b/autoscripts/postinst-emacsen
@@ -1,3 +1,4 @@
-if [ -x /usr/lib/emacsen-common/emacs-package-install ]; then
+if [ "$1" = "configure" -a -x /usr/lib/emacsen-common/emacs-package-install ]
+then
/usr/lib/emacsen-common/emacs-package-install #PACKAGE#
fi
diff --git a/autoscripts/postinst-info b/autoscripts/postinst-info
index 59881a19..71ffa19b 100644
--- a/autoscripts/postinst-info
+++ b/autoscripts/postinst-info
@@ -1 +1,3 @@
-install-info --quiet --section "#SECTION#" "#SECTION#" #FILE#
+if [ "$1" = "configure" ]; then
+ install-info --quiet --section "#SECTION#" "#SECTION#" #FILE#
+fi
diff --git a/autoscripts/postinst-info-nosection b/autoscripts/postinst-info-nosection
index cba27d27..ffef8636 100644
--- a/autoscripts/postinst-info-nosection
+++ b/autoscripts/postinst-info-nosection
@@ -1 +1,3 @@
-install-info --quiet #FILE#
+if [ "$1" = "configure" ]; then
+ install-info --quiet #FILE#
+fi
diff --git a/autoscripts/postinst-menu b/autoscripts/postinst-menu
index a73a1692..8a46311f 100644
--- a/autoscripts/postinst-menu
+++ b/autoscripts/postinst-menu
@@ -1 +1 @@
-if [ -x /usr/bin/update-menus ] ; then update-menus ; fi
+if [ "$1" = "configure" -a -x /usr/bin/update-menus ]; then update-menus ; fi
diff --git a/autoscripts/postinst-mime b/autoscripts/postinst-mime
index e993233b..a28e5bd7 100644
--- a/autoscripts/postinst-mime
+++ b/autoscripts/postinst-mime
@@ -1 +1 @@
-if [ -x /usr/sbin/update-mime ]; then update-mime; fi
+if [ "$1" = "configure" -a -x /usr/sbin/update-mime ]; then update-mime; fi
diff --git a/autoscripts/postinst-modules b/autoscripts/postinst-modules
index a8f4ce70..64b8eb0c 100644
--- a/autoscripts/postinst-modules
+++ b/autoscripts/postinst-modules
@@ -1,2 +1,4 @@
-update-modules
-depmod -a
+if [ "$1" = "configure" ]; then
+ update-modules
+ depmod -a
+fi
diff --git a/autoscripts/postinst-suid b/autoscripts/postinst-suid
index 1294d313..820d69a4 100644
--- a/autoscripts/postinst-suid
+++ b/autoscripts/postinst-suid
@@ -1,6 +1,8 @@
-if [ -e /etc/suid.conf -a -x /usr/sbin/suidregister ]; then
- suidregister -s #PACKAGE# /#FILE# #OWNER# #GROUP# #PERMS#
-else
- chown #OWNER#.#GROUP# /#FILE#
- chmod #PERMS# /#FILE#
+if [ "$1" = "configure" ]; then
+ if command -v suidregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then
+ suidregister -s #PACKAGE# /#FILE# #OWNER# #GROUP# #PERMS#
+ elif [ -e /#FILE# ]; then
+ chown #OWNER#.#GROUP# /#FILE#
+ chmod #PERMS# /#FILE#
+ fi
fi
diff --git a/autoscripts/postinst-wm b/autoscripts/postinst-wm
index 794ad700..aef412a3 100644
--- a/autoscripts/postinst-wm
+++ b/autoscripts/postinst-wm
@@ -1,2 +1,4 @@
-update-alternatives --install /usr/bin/x-window-manager \
- x-window-manager #WM# #PRIORITY#
+if [ "$1" = "configure" ]; then
+ update-alternatives --install /usr/bin/x-window-manager \
+ x-window-manager #WM# #PRIORITY#
+fi
diff --git a/autoscripts/postinst-xaw b/autoscripts/postinst-xaw
index b8d718ea..324058f8 100644
--- a/autoscripts/postinst-xaw
+++ b/autoscripts/postinst-xaw
@@ -1,3 +1,8 @@
-if test -x /usr/sbin/update-xaw-wrappers; then
- /usr/sbin/update-xaw-wrappers
+if [ "$1" = "configure" ]; then
+ if test -x /usr/sbin/update-xaw-wrappers; then
+ /usr/sbin/update-xaw-wrappers
+ fi
+ for opts in #OPTS#; do
+ update-alternatives --quiet --install $opts 25
+ done
fi
diff --git a/autoscripts/postinst-xfonts b/autoscripts/postinst-xfonts
index a0b58c9d..ae999633 100644
--- a/autoscripts/postinst-xfonts
+++ b/autoscripts/postinst-xfonts
@@ -1,8 +1,10 @@
-fontdirs="#FONTDIRS#"
-updatecmds="#UPDATECMDS#"
-
-for dir in $fontdirs; do
- for currentcmd in $updatecmds; do
- $currentcmd /usr/lib/X11/fonts/$dir
+if [ "$1" = "configure" ]; then
+ fontdirs="#FONTDIRS#"
+ updatecmds="#UPDATECMDS#"
+
+ for dir in $fontdirs; do
+ for currentcmd in $updatecmds; do
+ $currentcmd /usr/lib/X11/fonts/$dir
+ done
done
-done
+fi
diff --git a/autoscripts/postrm-menu b/autoscripts/postrm-menu
new file mode 100644
index 00000000..a34b6f18
--- /dev/null
+++ b/autoscripts/postrm-menu
@@ -0,0 +1 @@
+if [ -x /usr/bin/update-menus ]; then update-menus ; fi
diff --git a/autoscripts/postrm-mime b/autoscripts/postrm-mime
new file mode 100644
index 00000000..e993233b
--- /dev/null
+++ b/autoscripts/postrm-mime
@@ -0,0 +1 @@
+if [ -x /usr/sbin/update-mime ]; then update-mime; fi
diff --git a/autoscripts/postrm-modules b/autoscripts/postrm-modules
new file mode 100644
index 00000000..a8f4ce70
--- /dev/null
+++ b/autoscripts/postrm-modules
@@ -0,0 +1,2 @@
+update-modules
+depmod -a
diff --git a/debian/changelog b/debian/changelog
index 369431ea..4a806d05 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+debhelper (2.0.100) unstable; urgency=low
+
+ * Modified all postinst script fragments to only run when called with
+ "configure". I looked at the other possibilities, and I don't think any
+ of the supported stuff should be called if the postist is called for
+ error unwinds. Closes: #66673
+ * Implemented dh_clean -X, to allow specification of files to not delete,
+ Closes: #66670
+
+ -- Joey Hess <joeyh@debian.org> Wed, 5 Jul 2000 17:02:40 -0700
+
debhelper (2.0.99) unstable; urgency=low
* dh_installmodules will now install modiles even if etc/modutils already
diff --git a/dh_clean b/dh_clean
index 1ca10125..4b98a6a0 100755
--- a/dh_clean
+++ b/dh_clean
@@ -30,6 +30,14 @@ if (! $dh{D_FLAG}) {
doit("rm","-f","debian/files");
}
+ # See if some files that would normally be deleted are excluded.
+ if (! defined($dh{EXCLUDE_FIND}) || $dh{EXCLUDE_FIND} eq '') {
+ $find_options="";
+ }
+ else {
+ $find_options="-a ! ( $dh{EXCLUDE_FIND} )";
+ }
+
# Remove other temp files.
# (The \s+ is important, \s won't work because find would get null
# parameters). Note that you _don't_ quote wildcards used by find
@@ -39,7 +47,7 @@ if (! $dh{D_FLAG}) {
-o -name *.orig -o -name *.rej -o -name *.bak
-o -name .*.orig -o -name .*.rej -o -name .SUMS
-o -name TAGS -o -name core -o ( -path */.deps/* -a -name *.P )
- ) -exec rm -f {} ;"));
+ ) $find_options -exec rm -f {} ;"));
}
doit('rm', '-rf', 'debian/tmp')
diff --git a/dh_clean.1 b/dh_clean.1
index 729ba054..118a03c2 100644
--- a/dh_clean.1
+++ b/dh_clean.1
@@ -3,7 +3,7 @@
dh_clean \- clean up package build directories
.SH SYNOPSIS
.B dh_clean
-.I "[debhelper options] [-k] [-d] [file ...]"
+.I "[debhelper options] [-k] [-d] [file ...] [-Xitem]"
.SH "DESCRIPTION"
dh_clean is a debhelper program that is responsible for cleaning up after a
package is built. It removes the package build directories, and removes some
@@ -29,6 +29,11 @@ was built.
Only clean the package build directories, do not clean up any other files at
all.
.TP
+.B \-Xitem, \--exclude=item
+Exclude files that contain "item" anywhere in their filename from being
+deleted, even if they would normally be deleted. You may use this option
+multiple times to build up a list of things to exclude.
+.TP
.B file ...
Delete these files too.
.SH ENVIRONMENT