summaryrefslogtreecommitdiffstats
path: root/files/core-functions.sh
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackware.com>2018-06-07 23:00:02 -0500
committerRobby Workman <rworkman@slackware.com>2018-06-07 23:00:02 -0500
commit10b2f7d493a7ded620cdc20ab582b25f58e45c62 (patch)
tree330234981c89a3ee20bd863155ed795344df2581 /files/core-functions.sh
parente1fc7d99876aaba621fb353d8c484756e20ad0e8 (diff)
downloadslackpkg-10b2f7d493a7ded620cdc20ab582b25f58e45c62.tar.xz
Fix for /var/log/packages/ possibly being a symlink to elsewhere
Diffstat (limited to 'files/core-functions.sh')
-rw-r--r--files/core-functions.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/files/core-functions.sh b/files/core-functions.sh
index ec753c7..76cab6f 100644
--- a/files/core-functions.sh
+++ b/files/core-functions.sh
@@ -805,7 +805,7 @@ function searchlist() {
# First is the package already installed?
# Amazing what a little sleep will do
# exclusion is so much nicer :)
- INSTPKG=$(ls -1 $ROOT/var/log/packages | \
+ INSTPKG=$(ls -1 $ROOT/var/log/packages/ | \
grep -e "^${BASENAME}-[^-]\+-\(${ARCH}\|fw\|noarch\)-[^-]\+")
# INSTPKG is local version
@@ -1199,14 +1199,14 @@ function sanity_check() {
[ "$SPINNING" = "off" ] || spinning ${TMPDIR}/waiting &
- for i in $(ls -1 $ROOT/var/log/packages | \
+ for i in $(ls -1 $ROOT/var/log/packages/ | \
egrep -- "^.*-(${ARCH}|fw|noarch)-[^-]+-upgraded"); do
REVNAME=$(echo ${i} | awk -F'-upgraded' '{ print $1 }')
mv $ROOT/var/log/packages/${i} $ROOT/var/log/packages/${REVNAME}
mv $ROOT/var/log/scripts/${i} $ROOT/var/log/scripts/${REVNAME}
done
- ls -1 $ROOT/var/log/packages | egrep "^.*-(${ARCH}|fw|noarch)-[^-]+$" | \
+ ls -1 $ROOT/var/log/packages/ | egrep "^.*-(${ARCH}|fw|noarch)-[^-]+$" | \
batchcutpkg | sort > $TMPDIR/list1
cat $TMPDIR/list1 | uniq > $TMPDIR/list2
FILES="$(diff $TMPDIR/list1 $TMPDIR/list2 | grep '<' | cut -f2 -d\ )"
@@ -1223,12 +1223,12 @@ function sanity_check() {
if [ "$DOUBLEFILES" != "" ]; then
echo -e "\
-You have a broken $ROOT/var/log/packages - with two versions of the same package.\n\
+You have a broken $ROOT/var/log/packages/ - with two versions of the same package.\n\
The list of packages duplicated in your machine are shown below, but don't\n\
worry about this list - when you select your action, slackpkg will show a\n\
better list:\n"
for i in $DOUBLEFILES ; do
- ls -1 $ROOT/var/log/packages |\
+ ls -1 $ROOT/var/log/packages/ |\
egrep -i -- "^${i}-[^-]+-(${ARCH}|fw|noarch)-"
done
echo -ne "\n\
@@ -1243,7 +1243,7 @@ Select your action (B/R/I): "
;;
R|r)
for i in $DOUBLEFILES ; do
- FILE=$(ls -1 $ROOT/var/log/packages |\
+ FILE=$(ls -1 $ROOT/var/log/packages/ |\
egrep -i -- "^${i}-[^-]+-(${ARCH}|fw|noarch)-")
FILES="$FILES $FILE"
done