This commit is contained in:
emmett1
2019-02-08 17:16:10 +08:00
parent 9f4bf74211
commit 42f666418d
4 changed files with 12 additions and 11 deletions

13
pkgadd
View File

@@ -253,18 +253,17 @@ if [ ! "$IGNORE_CONFLICT" ]; then
if [ -e "$ROOT/$line" ]; then
if [ "$UPGRADE_PKG" ] || [ "$REINSTALL_PKG" ]; then
if [ ! "$(grep -Fx "$line" "$INDEX_DIR/$name/.files")" ]; then
fileconflict+=(${line})
echo "$line"
conflictedfile=yes
fi
else
fileconflict+=(${line})
echo "$line"
conflictedfile=yes
fi
fi
done < <(cat $TMP_PKGADD | grep -Ev '(.pkginfo|.pkginstall|.pkgreadme)' | grep -v '/$')
if [ "${#fileconflict[@]}" -gt 0 ]; then
for fc in ${fileconflict[@]}; do
echo "$fc"
done
if [ "$conflictedfile" = "yes" ]; then
msgerr "File conflict found!"
ret 1
fi

View File

@@ -23,6 +23,8 @@ for pkg in $allinstalled; do
fi
done
scratch remove $remove
if [ -n "$remove" ]; then
scratch remove $remove
fi
exit $?

4
pkgdel
View File

@@ -209,7 +209,7 @@ if [ -f "$INDEX_DIR/$name/.bkpfiles" ]; then
fi
while IFS=' ' read -r line; do
if [ -e $ROOT/$line ]; then
if [ -e "$ROOT/$line" ]; then
[ "$VERBOSE_REMOVE" = yes ] && echo "<<< $line"
rm "$ROOT/$line"
fi
@@ -217,7 +217,7 @@ done < <(tac $INDEX_DIR/$name/.files | grep -v '/$')
while IFS=' ' read -r line; do
if [ ! "$(grep -R --exclude-dir="$name" -w "$line" "$INDEX_DIR")" ]; then
if [ -d $ROOT/$line ]; then
if [ -d "$ROOT/$line" ]; then
[ "$VERBOSE_REMOVE" = yes ] && echo "<<< $line"
rmdir "$ROOT/$line"
fi

2
revdep
View File

@@ -84,7 +84,7 @@ rebuild() {
needrebuild=$ALLPKG
fi
for allpkg in $(pkgdeplist $needrebuild | cut -d ' ' -f2); do
for allpkg in $(pkgdeplist -l $needrebuild | cut -d ' ' -f2); do
for pkg in $needrebuild; do
if [ $pkg = $allpkg ]; then
if [ -z "$order" ]; then