No longer need to specify version for 'listfiles' target.
While here improve previous commit too. --HG-- extra : convert_revision : 435009e7dc55d74f08cc57fc6f78deea0fcb3f39
This commit is contained in:
parent
c4be9a5aba
commit
ecad518a07
11
xbps.sh
11
xbps.sh
|
@ -1260,15 +1260,18 @@ install_pkg()
|
||||||
list_pkg_files()
|
list_pkg_files()
|
||||||
{
|
{
|
||||||
local pkg="$1"
|
local pkg="$1"
|
||||||
local f="$XBPS_DESTDIR/$pkg/.xbps-filelist"
|
local ver=
|
||||||
|
|
||||||
[ -z $pkg ] && msg_error "unexistent package, aborting."
|
[ -z $pkg ] && msg_error "unexistent package, aborting."
|
||||||
|
|
||||||
if [ ! -d "$XBPS_DESTDIR/$pkg" ]; then
|
ver=$($XBPS_PKGDB_CMD version $pkg)
|
||||||
|
[ -z "$ver" ] && msg_error "$pkg is not installed."
|
||||||
|
|
||||||
|
if [ ! -d "$XBPS_DESTDIR/$pkg-$ver" ]; then
|
||||||
msg_error "cannot find $pkg in $XBPS_DESTDIR."
|
msg_error "cannot find $pkg in $XBPS_DESTDIR."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat $f|sort -u
|
cat $XBPS_DESTDIR/$pkg-$ver/.xbps-filelist|sort -u
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -1298,6 +1301,8 @@ remove_pkg()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ver=$($XBPS_PKGDB_CMD version $pkg)
|
ver=$($XBPS_PKGDB_CMD version $pkg)
|
||||||
|
[ -z "$ver" ] && msg_error "$pkg is not installed."
|
||||||
|
|
||||||
if [ ! -d "$XBPS_DESTDIR/$pkg-$ver" ]; then
|
if [ ! -d "$XBPS_DESTDIR/$pkg-$ver" ]; then
|
||||||
msg_error "cannot find package on $XBPS_DESTDIR."
|
msg_error "cannot find package on $XBPS_DESTDIR."
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue