]> git.donarmstrong.com Git - debhelper.git/commitdiff
r353: * Modified all postinst script fragments to only run when called with
authorjoey <joey>
Thu, 6 Jul 2000 00:18:18 +0000 (00:18 +0000)
committerjoey <joey>
Thu, 6 Jul 2000 00:18:18 +0000 (00:18 +0000)
     "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
16 files changed:
autoscripts/postinst-emacsen
autoscripts/postinst-info
autoscripts/postinst-info-nosection
autoscripts/postinst-menu
autoscripts/postinst-mime
autoscripts/postinst-modules
autoscripts/postinst-suid
autoscripts/postinst-wm
autoscripts/postinst-xaw
autoscripts/postinst-xfonts
autoscripts/postrm-menu [new file with mode: 0644]
autoscripts/postrm-mime [new file with mode: 0644]
autoscripts/postrm-modules [new file with mode: 0644]
debian/changelog
dh_clean
dh_clean.1

index 48bf26e78f341194d806cbc7b7b560161152db5a..97004eb7e2290a43840ed303fce658c0d71ee0a4 100644 (file)
@@ -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
index 59881a191f275bcc9b7505bf3c49af3f2218bcc9..71ffa19b70697ad62f8373bb4f9165e3ac27cb8c 100644 (file)
@@ -1 +1,3 @@
-install-info --quiet --section "#SECTION#" "#SECTION#" #FILE#
+if [ "$1" = "configure" ]; then
+       install-info --quiet --section "#SECTION#" "#SECTION#" #FILE#
+fi
index cba27d278360e54d99a583dd3236e1dc8b0d6b1b..ffef86368d8af8828c00819a2aa556ba2fc11ee4 100644 (file)
@@ -1 +1,3 @@
-install-info --quiet #FILE#
+if [ "$1" = "configure" ]; then
+       install-info --quiet #FILE#
+fi
index a73a169208ae9d6806d87cda985e805c66346ec5..8a46311ff56369c410df9689b3cc5ff9147cbd90 100644 (file)
@@ -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
index e993233b2007d161d79cb6a675750597b1bfcd95..a28e5bd7911efc26bf1dfaa25c609c2c017f829b 100644 (file)
@@ -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
index a8f4ce706af3e95f1eedca6e500b741ab06fb414..64b8eb0c3d9882032105f3ac855629dace3a1e08 100644 (file)
@@ -1,2 +1,4 @@
-update-modules
-depmod -a
+if [ "$1" = "configure" ]; then
+       update-modules
+       depmod -a
+fi
index 1294d313a63dfa4d695d50264eaf3d301decc980..820d69a4ee221182cc9ce7af31ace441e1a1d4a9 100644 (file)
@@ -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
index 794ad7004502bb5e76f095ae82a11f654f26b110..aef412a35601355ecd3764cbadd4677adcd68916 100644 (file)
@@ -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
index b8d718ea40189f5fb795db0693c8a7f207b99902..324058f8406ac7c29b2aaedced39f6e19c1bb233 100644 (file)
@@ -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
index a0b58c9dde659b48ea863ceb9285cbd36b52813e..ae9996330dc80ac3e889cb8d3c002ec56d9fe530 100644 (file)
@@ -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 (file)
index 0000000..a34b6f1
--- /dev/null
@@ -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 (file)
index 0000000..e993233
--- /dev/null
@@ -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 (file)
index 0000000..a8f4ce7
--- /dev/null
@@ -0,0 +1,2 @@
+update-modules
+depmod -a
index 369431eafe67da07ad1bc65277b148f41fb0aaed..4a806d0590a48b0c2c3886d45bd7d7635e2f0e10 100644 (file)
@@ -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
index 1ca1012510cba863df9a989ea56f74d35b870f11..4b98a6a0430beb72279d59bc1f21bf4f0808b2ab 100755 (executable)
--- 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')
index 729ba0545a62b0b66ab52dedbd52830b29e0e1f4..118a03c2adc470e8176017a9c931382f12db1256 100644 (file)
@@ -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