summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2020-03-31 04:00:43 +0000
committerEric Hameleers <alien@slackware.com>2020-03-31 08:59:49 +0200
commitc53350a4854e6d348955bdc9a5ca27b3a7a44756 (patch)
tree3dd9b1864d314a7f4ef6d6764bc79d28ab28d7fe
parent4f2bf4aab6138916c8b1a2db874c95d92d89703b (diff)
downloadcurrent-c53350a4854e6d348955bdc9a5ca27b3a7a44756.tar.gz
Tue Mar 31 04:00:43 UTC 202020200331040043
a/pkgtools-15.0-noarch-31.txz: Rebuilt. removepkg: support an uninstall script. See removepkg(8). d/meson-0.54.0-x86_64-1.txz: Upgraded.
-rw-r--r--ChangeLog.rss17
-rw-r--r--ChangeLog.txt5
-rw-r--r--FILELIST.TXT62
-rw-r--r--source/a/pkgtools/manpages/removepkg.810
-rwxr-xr-xsource/a/pkgtools/pkgtools.SlackBuild4
-rw-r--r--source/a/pkgtools/scripts/removepkg44
6 files changed, 93 insertions, 49 deletions
diff --git a/ChangeLog.rss b/ChangeLog.rss
index aa637136..fd579153 100644
--- a/ChangeLog.rss
+++ b/ChangeLog.rss
@@ -11,10 +11,23 @@
<description>Tracking Slackware development in git.</description>
<language>en-us</language>
<id xmlns="http://www.w3.org/2005/Atom">urn:uuid:c964f45e-6732-11e8-bbe5-107b4450212f</id>
- <pubDate>Sun, 29 Mar 2020 23:05:46 GMT</pubDate>
- <lastBuildDate>Mon, 30 Mar 2020 06:59:45 GMT</lastBuildDate>
+ <pubDate>Tue, 31 Mar 2020 04:00:43 GMT</pubDate>
+ <lastBuildDate>Tue, 31 Mar 2020 06:59:43 GMT</lastBuildDate>
<generator>maintain_current_git.sh v 1.11</generator>
<item>
+ <title>Tue, 31 Mar 2020 04:00:43 GMT</title>
+ <pubDate>Tue, 31 Mar 2020 04:00:43 GMT</pubDate>
+ <link>https://git.slackware.nl/current/tag/?h=20200331040043</link>
+ <guid isPermaLink="false">20200331040043</guid>
+ <description>
+ <![CDATA[<pre>
+a/pkgtools-15.0-noarch-31.txz: Rebuilt.
+ removepkg: support an uninstall script. See removepkg(8).
+d/meson-0.54.0-x86_64-1.txz: Upgraded.
+ </pre>]]>
+ </description>
+ </item>
+ <item>
<title>Sun, 29 Mar 2020 23:05:46 GMT</title>
<pubDate>Sun, 29 Mar 2020 23:05:46 GMT</pubDate>
<link>https://git.slackware.nl/current/tag/?h=20200329230546</link>
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 1c952244..683cc9c7 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,8 @@
+Tue Mar 31 04:00:43 UTC 2020
+a/pkgtools-15.0-noarch-31.txz: Rebuilt.
+ removepkg: support an uninstall script. See removepkg(8).
+d/meson-0.54.0-x86_64-1.txz: Upgraded.
++--------------------------+
Sun Mar 29 23:05:46 UTC 2020
d/ccache-3.7.9-x86_64-1.txz: Upgraded.
d/llvm-10.0.0-x86_64-2.txz: Rebuilt.
diff --git a/FILELIST.TXT b/FILELIST.TXT
index 0f02c889..d2bd0361 100644
--- a/FILELIST.TXT
+++ b/FILELIST.TXT
@@ -1,20 +1,20 @@
-Sun Mar 29 23:18:13 UTC 2020
+Tue Mar 31 04:12:38 UTC 2020
Here is the file list for this directory. If you are using a
mirror site and find missing or extra files in the disk
subdirectories, please have the archive administrator refresh
the mirror.
-drwxr-xr-x 12 root root 4096 2020-03-29 23:05 .
+drwxr-xr-x 12 root root 4096 2020-03-31 04:00 .
-rw-r--r-- 1 root root 10064 2016-06-30 18:39 ./ANNOUNCE.14_2
-rw-r--r-- 1 root root 14975 2020-02-08 21:06 ./CHANGES_AND_HINTS.TXT
--rw-r--r-- 1 root root 961019 2020-03-28 06:02 ./CHECKSUMS.md5
--rw-r--r-- 1 root root 163 2020-03-28 06:02 ./CHECKSUMS.md5.asc
+-rw-r--r-- 1 root root 961019 2020-03-29 23:19 ./CHECKSUMS.md5
+-rw-r--r-- 1 root root 163 2020-03-29 23:19 ./CHECKSUMS.md5.asc
-rw-r--r-- 1 root root 17976 1994-06-10 02:28 ./COPYING
-rw-r--r-- 1 root root 35147 2007-06-30 04:21 ./COPYING3
-rw-r--r-- 1 root root 19573 2016-06-23 20:08 ./COPYRIGHT.TXT
-rw-r--r-- 1 root root 616 2006-10-02 04:37 ./CRYPTO_NOTICE.TXT
--rw-r--r-- 1 root root 841762 2020-03-29 23:05 ./ChangeLog.txt
+-rw-r--r-- 1 root root 841961 2020-03-31 04:00 ./ChangeLog.txt
drwxr-xr-x 3 root root 4096 2013-03-20 22:17 ./EFI
drwxr-xr-x 2 root root 4096 2020-03-25 22:52 ./EFI/BOOT
-rw-r--r-- 1 root root 1417216 2019-07-05 18:54 ./EFI/BOOT/bootx64.efi
@@ -25,9 +25,9 @@ drwxr-xr-x 2 root root 4096 2020-03-25 22:52 ./EFI/BOOT
-rwxr-xr-x 1 root root 2504 2019-07-05 18:54 ./EFI/BOOT/make-grub.sh
-rw-r--r-- 1 root root 10722 2013-09-21 19:02 ./EFI/BOOT/osdetect.cfg
-rw-r--r-- 1 root root 1273 2013-08-12 21:08 ./EFI/BOOT/tools.cfg
--rw-r--r-- 1 root root 1262736 2020-03-28 06:02 ./FILELIST.TXT
+-rw-r--r-- 1 root root 1262736 2020-03-29 23:18 ./FILELIST.TXT
-rw-r--r-- 1 root root 1572 2012-08-29 18:27 ./GPG-KEY
--rw-r--r-- 1 root root 746030 2020-03-29 23:16 ./PACKAGES.TXT
+-rw-r--r-- 1 root root 746030 2020-03-31 04:10 ./PACKAGES.TXT
-rw-r--r-- 1 root root 8564 2016-06-28 21:33 ./README.TXT
-rw-r--r-- 1 root root 3629 2020-03-25 22:26 ./README.initrd
-rw-r--r-- 1 root root 34412 2017-12-01 17:44 ./README_CRYPT.TXT
@@ -834,13 +834,13 @@ drwxr-xr-x 2 root root 4096 2012-09-20 18:06 ./patches
-rw-r--r-- 1 root root 575 2012-09-20 18:06 ./patches/FILE_LIST
-rw-r--r-- 1 root root 14 2012-09-20 18:06 ./patches/MANIFEST.bz2
-rw-r--r-- 1 root root 224 2012-09-20 18:06 ./patches/PACKAGES.TXT
-drwxr-xr-x 18 root root 4096 2020-03-29 23:16 ./slackware64
--rw-r--r-- 1 root root 295094 2020-03-29 23:16 ./slackware64/CHECKSUMS.md5
--rw-r--r-- 1 root root 163 2020-03-29 23:16 ./slackware64/CHECKSUMS.md5.asc
--rw-r--r-- 1 root root 367483 2020-03-29 23:13 ./slackware64/FILE_LIST
--rw-r--r-- 1 root root 3806846 2020-03-29 23:14 ./slackware64/MANIFEST.bz2
+drwxr-xr-x 18 root root 4096 2020-03-31 04:10 ./slackware64
+-rw-r--r-- 1 root root 295094 2020-03-31 04:10 ./slackware64/CHECKSUMS.md5
+-rw-r--r-- 1 root root 163 2020-03-31 04:10 ./slackware64/CHECKSUMS.md5.asc
+-rw-r--r-- 1 root root 367483 2020-03-31 04:08 ./slackware64/FILE_LIST
+-rw-r--r-- 1 root root 3806706 2020-03-31 04:08 ./slackware64/MANIFEST.bz2
lrwxrwxrwx 1 root root 15 2009-08-23 23:34 ./slackware64/PACKAGES.TXT -> ../PACKAGES.TXT
-drwxr-xr-x 2 root root 28672 2020-03-28 05:57 ./slackware64/a
+drwxr-xr-x 2 root root 28672 2020-03-31 04:07 ./slackware64/a
-rw-r--r-- 1 root root 327 2018-06-24 18:44 ./slackware64/a/aaa_base-14.2-x86_64-5.txt
-rw-r--r-- 1 root root 10820 2018-06-24 18:44 ./slackware64/a/aaa_base-14.2-x86_64-5.txz
-rw-r--r-- 1 root root 163 2018-06-24 18:44 ./slackware64/a/aaa_base-14.2-x86_64-5.txz.asc
@@ -1088,9 +1088,9 @@ drwxr-xr-x 2 root root 28672 2020-03-28 05:57 ./slackware64/a
-rw-r--r-- 1 root root 450 2018-04-13 13:10 ./slackware64/a/pcmciautils-018-x86_64-2.txt
-rw-r--r-- 1 root root 32548 2018-04-13 13:10 ./slackware64/a/pcmciautils-018-x86_64-2.txz
-rw-r--r-- 1 root root 163 2018-04-13 13:10 ./slackware64/a/pcmciautils-018-x86_64-2.txz.asc
--rw-r--r-- 1 root root 672 2020-01-22 20:09 ./slackware64/a/pkgtools-15.0-noarch-30.txt
--rw-r--r-- 1 root root 196284 2020-01-22 20:09 ./slackware64/a/pkgtools-15.0-noarch-30.txz
--rw-r--r-- 1 root root 163 2020-01-22 20:09 ./slackware64/a/pkgtools-15.0-noarch-30.txz.asc
+-rw-r--r-- 1 root root 672 2020-03-31 03:54 ./slackware64/a/pkgtools-15.0-noarch-31.txt
+-rw-r--r-- 1 root root 196616 2020-03-31 03:54 ./slackware64/a/pkgtools-15.0-noarch-31.txz
+-rw-r--r-- 1 root root 163 2020-03-31 03:54 ./slackware64/a/pkgtools-15.0-noarch-31.txz.asc
-rw-r--r-- 1 root root 523 2019-01-07 20:48 ./slackware64/a/plzip-1.8-x86_64-1.txt
-rw-r--r-- 1 root root 55804 2019-01-07 20:48 ./slackware64/a/plzip-1.8-x86_64-1.txz
-rw-r--r-- 1 root root 163 2019-01-07 20:48 ./slackware64/a/plzip-1.8-x86_64-1.txz.asc
@@ -1443,7 +1443,7 @@ drwxr-xr-x 2 root root 20480 2020-03-25 23:01 ./slackware64/ap
-rw-r--r-- 1 root root 506 2020-02-16 18:00 ./slackware64/ap/zsh-5.8-x86_64-1.txt
-rw-r--r-- 1 root root 3053312 2020-02-16 18:00 ./slackware64/ap/zsh-5.8-x86_64-1.txz
-rw-r--r-- 1 root root 163 2020-02-16 18:00 ./slackware64/ap/zsh-5.8-x86_64-1.txz.asc
-drwxr-xr-x 2 root root 20480 2020-03-29 23:13 ./slackware64/d
+drwxr-xr-x 2 root root 20480 2020-03-31 04:07 ./slackware64/d
-rw-r--r-- 1 root root 360 2020-02-15 18:51 ./slackware64/d/Cython-0.29.15-x86_64-1.txt
-rw-r--r-- 1 root root 3295652 2020-02-15 18:51 ./slackware64/d/Cython-0.29.15-x86_64-1.txz
-rw-r--r-- 1 root root 163 2020-02-15 18:51 ./slackware64/d/Cython-0.29.15-x86_64-1.txz.asc
@@ -1565,9 +1565,9 @@ drwxr-xr-x 2 root root 20480 2020-03-29 23:13 ./slackware64/d
-rw-r--r-- 1 root root 659 2020-03-05 07:11 ./slackware64/d/mercurial-5.3.1-x86_64-1.txt
-rw-r--r-- 1 root root 4331020 2020-03-05 07:11 ./slackware64/d/mercurial-5.3.1-x86_64-1.txz
-rw-r--r-- 1 root root 163 2020-03-05 07:11 ./slackware64/d/mercurial-5.3.1-x86_64-1.txz.asc
--rw-r--r-- 1 root root 410 2020-02-27 19:50 ./slackware64/d/meson-0.53.2-x86_64-1.txt
--rw-r--r-- 1 root root 838676 2020-02-27 19:50 ./slackware64/d/meson-0.53.2-x86_64-1.txz
--rw-r--r-- 1 root root 163 2020-02-27 19:50 ./slackware64/d/meson-0.53.2-x86_64-1.txz.asc
+-rw-r--r-- 1 root root 410 2020-03-30 17:45 ./slackware64/d/meson-0.54.0-x86_64-1.txt
+-rw-r--r-- 1 root root 880448 2020-03-30 17:45 ./slackware64/d/meson-0.54.0-x86_64-1.txz
+-rw-r--r-- 1 root root 163 2020-03-30 17:45 ./slackware64/d/meson-0.54.0-x86_64-1.txz.asc
-rw-r--r-- 1 root root 339 2018-12-27 22:59 ./slackware64/d/nasm-2.14.02-x86_64-1.txt
-rw-r--r-- 1 root root 390388 2018-12-27 22:59 ./slackware64/d/nasm-2.14.02-x86_64-1.txz
-rw-r--r-- 1 root root 163 2018-12-27 22:59 ./slackware64/d/nasm-2.14.02-x86_64-1.txz.asc
@@ -5115,13 +5115,13 @@ drwxr-xr-x 2 root root 4096 2019-02-17 23:51 ./slackware64/y
-rw-r--r-- 1 root root 1147 2018-03-01 07:55 ./slackware64/y/maketag
-rw-r--r-- 1 root root 1147 2018-03-01 07:55 ./slackware64/y/maketag.ez
-rw-r--r-- 1 root root 14 2018-03-01 07:55 ./slackware64/y/tagfile
-drwxr-xr-x 19 root root 4096 2020-03-29 23:18 ./source
--rw-r--r-- 1 root root 486476 2020-03-29 23:18 ./source/CHECKSUMS.md5
--rw-r--r-- 1 root root 163 2020-03-29 23:18 ./source/CHECKSUMS.md5.asc
--rw-r--r-- 1 root root 686002 2020-03-29 23:17 ./source/FILE_LIST
--rw-r--r-- 1 root root 20646078 2020-03-29 23:17 ./source/MANIFEST.bz2
+drwxr-xr-x 19 root root 4096 2020-03-31 04:12 ./source
+-rw-r--r-- 1 root root 486476 2020-03-31 04:12 ./source/CHECKSUMS.md5
+-rw-r--r-- 1 root root 163 2020-03-31 04:12 ./source/CHECKSUMS.md5.asc
+-rw-r--r-- 1 root root 686002 2020-03-31 04:11 ./source/FILE_LIST
+-rw-r--r-- 1 root root 20658362 2020-03-31 04:11 ./source/MANIFEST.bz2
-rw-r--r-- 1 root root 1314 2006-10-02 04:40 ./source/README.TXT
-drwxr-xr-x 112 root root 4096 2020-03-06 20:27 ./source/a
+drwxr-xr-x 112 root root 4096 2020-03-31 03:18 ./source/a
-rw-r--r-- 1 root root 1034 2019-05-04 17:56 ./source/a/FTBFSlog
drwxr-xr-x 2 root root 4096 2018-06-24 18:43 ./source/a/aaa_base
-rw-r--r-- 1 root root 11115 2018-06-24 18:43 ./source/a/aaa_base/_aaa_base.tar.gz
@@ -5805,9 +5805,9 @@ drwxr-xr-x 2 root root 4096 2019-10-04 06:20 ./source/a/pkgtools/manpages
-rw-r--r-- 1 root root 5702 2018-07-09 19:21 ./source/a/pkgtools/manpages/makepkg.8
-rw-r--r-- 1 root root 1401 2018-04-11 19:48 ./source/a/pkgtools/manpages/pkgdiff.8
-rw-r--r-- 1 root root 2518 2009-04-11 21:11 ./source/a/pkgtools/manpages/pkgtool.8
--rw-r--r-- 1 root root 3251 2018-06-19 19:28 ./source/a/pkgtools/manpages/removepkg.8
+-rw-r--r-- 1 root root 3702 2020-03-31 03:54 ./source/a/pkgtools/manpages/removepkg.8
-rw-r--r-- 1 root root 2962 2018-06-08 19:56 ./source/a/pkgtools/manpages/upgradepkg.8
--rwxr-xr-x 1 root root 3742 2020-01-22 20:09 ./source/a/pkgtools/pkgtools.SlackBuild
+-rwxr-xr-x 1 root root 3754 2020-03-31 03:16 ./source/a/pkgtools/pkgtools.SlackBuild
drwxr-xr-x 2 root root 4096 2020-01-12 23:09 ./source/a/pkgtools/scripts
-rw-r--r-- 1 root root 3608 2018-06-19 19:28 ./source/a/pkgtools/scripts/explodepkg
-rw-r--r-- 1 root root 27102 2019-10-04 06:05 ./source/a/pkgtools/scripts/installpkg
@@ -5815,7 +5815,7 @@ drwxr-xr-x 2 root root 4096 2020-01-12 23:09 ./source/a/pkgtools/scripts
-rw-r--r-- 1 root root 16220 2019-11-24 21:11 ./source/a/pkgtools/scripts/makepkg
-rw-r--r-- 1 root root 4712 2018-04-11 20:28 ./source/a/pkgtools/scripts/pkgdiff
-rw-r--r-- 1 root root 21938 2018-06-19 19:28 ./source/a/pkgtools/scripts/pkgtool
--rw-r--r-- 1 root root 15717 2020-01-22 20:04 ./source/a/pkgtools/scripts/removepkg
+-rw-r--r-- 1 root root 16536 2020-03-31 03:47 ./source/a/pkgtools/scripts/removepkg
-rw-r--r-- 1 root root 170 2003-02-16 00:56 ./source/a/pkgtools/scripts/setup.70.install-kernel
-rw-r--r-- 1 root root 9164 2018-06-19 19:28 ./source/a/pkgtools/scripts/setup.80.make-bootdisk
-rw-r--r-- 1 root root 1062 2018-04-28 19:12 ./source/a/pkgtools/scripts/setup.htmlview
@@ -6904,8 +6904,8 @@ drwxr-xr-x 2 root root 4096 2020-03-05 07:08 ./source/d/mercurial
-rwxr-xr-x 1 root root 4114 2020-03-05 07:10 ./source/d/mercurial/mercurial.SlackBuild
-rw-r--r-- 1 root root 38 2017-12-02 19:13 ./source/d/mercurial/mercurial.url
-rw-r--r-- 1 root root 1245 2018-02-27 06:13 ./source/d/mercurial/slack-desc
-drwxr-xr-x 2 root root 4096 2020-02-27 19:50 ./source/d/meson
--rw-r--r-- 1 root root 1187231 2020-02-25 18:36 ./source/d/meson/meson-0.53.2.tar.lz
+drwxr-xr-x 2 root root 4096 2020-03-30 17:45 ./source/d/meson
+-rw-r--r-- 1 root root 1236212 2020-03-29 17:40 ./source/d/meson/meson-0.54.0.tar.lz
-rwxr-xr-x 1 root root 2771 2020-01-08 18:40 ./source/d/meson/meson.SlackBuild
-rw-r--r-- 1 root root 36 2018-11-09 03:24 ./source/d/meson/meson.url
-rw-r--r-- 1 root root 895 2018-02-27 06:13 ./source/d/meson/slack-desc
diff --git a/source/a/pkgtools/manpages/removepkg.8 b/source/a/pkgtools/manpages/removepkg.8
index f92ed8c2..58a88ce6 100644
--- a/source/a/pkgtools/manpages/removepkg.8
+++ b/source/a/pkgtools/manpages/removepkg.8
@@ -70,9 +70,17 @@ you do this (and maybe pipe the output to
) before removing packages to make sure you've backed up anything that might
be important.
.LP
-When removing a package, it's original file index will be moved from
+When removing a package, its original file index will be moved from
/var/lib/pkgtools/packages to /var/log/pkgtools/removed_packages. Likewise, its installation
script will be moved from /var/lib/pkgtools/scripts to /var/log/pkgtools/removed_scripts.
+.LP
+.B removepkg
+supports /bin/sh compatible uninstall scripts.
+If the package shipped with an uninstall script, it will be run after the package
+is removed. If present, the uninstall script resides in the /var/lib/pkgtools/douninst.sh/
+directory and has the same full name as the package (without the extension). For example,
+a package named foo-1.0-noarch-1.txz might contain an uninstall script named:
+/var/lib/pkgtools/douninst.sh/foo-1.0-noarch-1
.SH OPTIONS
.TP
.B \--copy packagename
diff --git a/source/a/pkgtools/pkgtools.SlackBuild b/source/a/pkgtools/pkgtools.SlackBuild
index f0bf5c78..37315121 100755
--- a/source/a/pkgtools/pkgtools.SlackBuild
+++ b/source/a/pkgtools/pkgtools.SlackBuild
@@ -30,7 +30,7 @@ PKGNAM=pkgtools
# *** UPDATE THESE WITH EACH BUILD:
VERSION=15.0
ARCH=${ARCH:-noarch}
-BUILD=${BUILD:-30}
+BUILD=${BUILD:-31}
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
@@ -92,7 +92,7 @@ mkdir -p $PKG
)
# Create the base directories (not really necessary, but doesn't hurt):
-mkdir -p $PKG/var/lib/pkgtools/{packages,scripts}
+mkdir -p $PKG/var/lib/pkgtools/{packages,scripts,douninst.sh}
mkdir -p $PKG/var/log/pkgtools/{removed_packages,removed_scripts}
mkdir -p $PKG/install
diff --git a/source/a/pkgtools/scripts/removepkg b/source/a/pkgtools/scripts/removepkg
index d94031dc..0166a59b 100644
--- a/source/a/pkgtools/scripts/removepkg
+++ b/source/a/pkgtools/scripts/removepkg
@@ -3,7 +3,7 @@
#
# Copyright 1994, 1995, 1998 Patrick Volkerding, Moorhead, Minnesota USA
# Copyright 2001, Slackware Linux, Inc., Concord, CA USA
-# Copyright 2009, 2015, 2016, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2009, 2015, 2016, 2018, 2020 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,6 +24,12 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
+# Tue Mar 31 03:06:25 UTC 2020
+# Support an uninstall script to be executed when the package is removed.
+# The script should be a standard sh script with the same name as the package
+# (without the .txz or other extension), and should be installed in
+# /var/lib/pkgtools/douninst.sh.
+#
# Tue Jun 5 20:04:45 UTC 2018
# Use /var/lib/pkgtools for the package database, not /var/log.
# Logs of the removed packages and scripts will remain in /var/log, but moved
@@ -327,10 +333,17 @@ remove_packages() {
fi
popd > /dev/null
fi
-
if [ -r $ADM_DIR/packages/$PKGNAME ]; then
if [ ! "$WARN" = true ]; then
echo "Removing package: $(basename $ADM_DIR/packages/$PKGNAME)"
+ # If there's an uninstall script, save it:
+ if [ -r $ADM_DIR/douninst.sh/$PKGNAME ]; then
+ cp -a $ADM_DIR/douninst.sh/$PKGNAME $TMP/$PKGNAME
+ elif [ -r $ADM_DIR/douninst.sh/$(echo ${PKGNAME} | sed "s/-upgraded.*//") ]; then
+ cp -a $ADM_DIR/douninst.sh/$(echo ${PKGNAME} | sed "s/-upgraded.*//") $TMP/$PKGNAME
+ else
+ rm -f $TMP/$PKGNAME
+ fi
fi
if fgrep "./" $ADM_DIR/packages/$PKGNAME 1> /dev/null 2>&1; then
TRIGGER="^\.\/"
@@ -380,27 +393,32 @@ remove_packages() {
# so we'll remake the directories and symlinks first:
mkdir -p $LOG_DIR/removed_packages $LOG_DIR/removed_scripts
for symlink in removed_packages removed_scripts ; do
- if [ ! -L $LOG_DIR/../$symlink ]; then
- rm -rf $LOG_DIR/../$symlink
- ( cd $LOG_DIR/.. ; ln -sf pkgtools/$symlink . )
- fi
+ if [ ! -L $LOG_DIR/../$symlink ]; then
+ rm -rf $LOG_DIR/../$symlink
+ ( cd $LOG_DIR/.. ; ln -sf pkgtools/$symlink . )
+ fi
done
# Now that we know we have log directories, move the files:
mv $ADM_DIR/packages/$PKGNAME $LOG_DIR/removed_packages
if [ -r $ADM_DIR/scripts/$PKGNAME ]; then
mv $ADM_DIR/scripts/$PKGNAME $LOG_DIR/removed_scripts
fi
+ # If there is an uninstall script, run it here:
+ if [ -r $TMP/$PKGNAME ]; then
+ cd $ROOT/ ; sh $TMP/$PKGNAME
+ rm -f $TMP/$PKGNAME
+ fi
+ # In the case where a library and symlink are removed but an earlier version
+ # remains on the machine, this will link it up and save potential problems:
+ if [ "$ROOT" = "" ] && [ -x /sbin/ldconfig ]; then
+ ( flock 9 || exit 11
+ /sbin/ldconfig 2> /dev/null
+ ) 9> $INSTLOCKDIR/ldconfig.lock
+ fi
fi
else
echo "No such package: $(basename $ADM_DIR/packages/$PKGNAME). Can't remove."
fi
- # In the case where a library and symlink are removed but an earlier version
- # remains on the machine, this will link it up and save potential problems:
- if [ "$ROOT" = "" ] && [ -x /sbin/ldconfig ]; then
- ( flock 9 || exit 11
- /sbin/ldconfig 2> /dev/null
- ) 9> $INSTLOCKDIR/ldconfig.lock
- fi
done
}