修复:vim-common卸载失败

This commit is contained in:
shenmo 2023-11-15 16:55:17 +08:00
parent f89f92533f
commit caadd5d785
2 changed files with 7 additions and 7 deletions
src
DEBIAN
opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin

@ -4,5 +4,5 @@ Section: misc
Priority: optional
Depends: bubblewrap,flatpak,zenity,policykit-1
Maintainer: shenmo <shenmo@spark-app.store>
Architecture: amd64
Architecture: arm64
Description: bwrap wrapper for install and running debs inside a bookworm container

@ -42,7 +42,7 @@ if [ -f "$DPKG_INFO_PATH/$PKGNAME_GUESS.list" ]; then
elif ls "$DPKG_INFO_PATH/${PKGNAME_GUESS}:*.list" 1> /dev/null 2>&1; then
DPKG_LIST_FILE=$(ls "$DPKG_INFO_PATH/${PKGNAME_GUESS}:*.list" | head -n 1)
else
echo "No dpkg list file found for $PKGNAME_GUESS.desktop,try to scan to search for the package"
echo "Warn:No dpkg list file found for $PKGNAME_GUESS.desktop,try to scan to search for the package"
fi
# 验证文件并执行操作
@ -53,17 +53,17 @@ if [ -f "$DPKG_LIST_FILE" ]; then
ret=$?
if [ "$ret" = "0" ];then
echo "Operation succeeded."
exit
else
echo "Operation failed."
exit $ret
fi
else
echo "Error: Path not found in the dpkg list file."
exit 1
echo "Warn: Path not found in the dpkg list file,try to scan to search for the package"
fi
else
# 遍历所有list文件
fi
# 遍历所有list文件 As fallback
for file in "$DPKG_INFO_PATH"/*.list; do
if grep -q "$IN_CONTAINER_PATH" "$file"; then
PKGNAME_GUESS=$(basename "$file" .list | cut -d':' -f1)
@ -82,5 +82,5 @@ else
done
echo "Error: No matching package found."
exit 1
fi