Some checks to be sure that user is able to unstow pkgs.
--HG-- extra : convert_revision : 5651565c9e7caefed71d4e39f9285d3f62e613ab
This commit is contained in:
parent
5885c7583f
commit
1c8b62123c
1 changed files with 5 additions and 1 deletions
6
xbps.sh
6
xbps.sh
|
@ -1383,7 +1383,11 @@ unstow_pkg()
|
|||
[ "$build_style" = "meta-template" ] && return 0
|
||||
|
||||
cd $XBPS_DESTDIR/$pkgname-$ver || exit 1
|
||||
[ ! -f .xbps-filelist ] && exit 1
|
||||
if [ ! -f .xbps-filelist ]; then
|
||||
msg_error "$pkg is incomplete, missing .xbps-filelist file."
|
||||
elif [ ! -O .xbps-filelist ]; then
|
||||
msg_error "$pkg cannot be removed (permission denied)."
|
||||
fi
|
||||
|
||||
for f in $(cat .xbps-filelist|sort -ur); do
|
||||
if [ -f $XBPS_MASTERDIR/$f -o -h $XBPS_MASTERDIR/$f ]; then
|
||||
|
|
Loading…
Reference in a new issue