mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-03-23 05:49:43 +08:00
修复 aptss download 会创建 tmp 垃圾文件的问题
This commit is contained in:
@@ -120,8 +120,11 @@ _create_lock()
|
|||||||
# unlock and remove the lock file
|
# unlock and remove the lock file
|
||||||
_remove_lock()
|
_remove_lock()
|
||||||
{
|
{
|
||||||
flock -u "$LCK_FD" 2>/dev/null
|
# Only unlock if lock file exists (was created by _create_lock)
|
||||||
rm -f "$LCK_FILE.lock"
|
if [ -f "$LCK_FILE.lock" ]; then
|
||||||
|
flock -u "$LCK_FD" 2>/dev/null
|
||||||
|
rm -f "$LCK_FILE.lock"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Search for known options and decide if root privileges are needed.
|
# Search for known options and decide if root privileges are needed.
|
||||||
@@ -821,6 +824,9 @@ elif [ "$option" == "download" ]; then
|
|||||||
"${_APTMGR}" "$@"
|
"${_APTMGR}" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Clean up temporary directory for download command
|
||||||
|
cleanup_aptfast
|
||||||
|
|
||||||
elif [ "$option" == "source" ]; then
|
elif [ "$option" == "source" ]; then
|
||||||
msg
|
msg
|
||||||
msg "Working... this may take a while." "normal"
|
msg "Working... this may take a while." "normal"
|
||||||
@@ -847,6 +853,9 @@ elif [ "$option" == "source" ]; then
|
|||||||
# dpkg-source -x "$(basename "$srcfile")"
|
# dpkg-source -x "$(basename "$srcfile")"
|
||||||
#done < "$DLLIST"
|
#done < "$DLLIST"
|
||||||
|
|
||||||
|
# Clean up temporary directory for source command
|
||||||
|
cleanup_aptfast
|
||||||
|
|
||||||
# Execute package manager directly if unknown options are passed.
|
# Execute package manager directly if unknown options are passed.
|
||||||
else
|
else
|
||||||
"${_APTMGR}" "${APT_SCRIPT_WARNING[@]}" "$@"
|
"${_APTMGR}" "${APT_SCRIPT_WARNING[@]}" "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user