summaryrefslogtreecommitdiff
path: root/bin/pkg
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-06-30 11:29:21 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-06-30 11:29:21 +0200
commit00f1159d59544f26e9b7a6b863177d40de101641 (patch)
treedf39e403d36d5fbb97c6921cf96fe3869bca81ee /bin/pkg
parentd0856a923fd90a06b3883837c0b07864df54064b (diff)
bin/pkg: Added lst_remove_package to be called from pkg_remove
Diffstat (limited to 'bin/pkg')
-rwxr-xr-xbin/pkg7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/pkg b/bin/pkg
index 0057bc6..e4eaaa4 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -175,6 +175,12 @@ lst_update_package () {
vcs_to_lst $1 >> .list
}
+lst_remove_package () {
+ cd $PDIR
+ LIST=$(cat .list | grep -v ^"$1 ")
+ echo $LIST > .list
+}
+
vcs_upgrade () {
[ -d .hg ] && {hg pull --update ; return}
[ -d .git ] && {git pull ; return}
@@ -362,6 +368,7 @@ pkg_remove () {
}
exec_hook "$1" "pre-remove"
genocide_collected "$1"
+ lst_remove_package $1
rm -rf $PDIR/$1
info "Package removed.\n"
}