* feat: aptss 除ssupdate外的操作时候如果检测到存在源文件存在则不再重复获取

* fix: 修复在apt list锁被锁定的时候异常弹出有更新可用
This commit is contained in:
2023-01-03 13:16:24 +08:00
parent c169622806
commit 980e4a17d9
3 changed files with 25 additions and 6 deletions

View File

@@ -18,8 +18,10 @@ fi
if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" = "full-upgrade" ] ; then
sudo bwrap --dev-bind / / --bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list apt update -o Dir::Etc::sourcelist="sources.list.d/sparkstore.list" -o Dir::etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
if [ ! -e "/var/lib/apt/lists/d.store.deepinos.org.cn_Packages" ];then
echo "接收星火仓库软件信息中..."
aptss ssupdate
fi
###执行
bwrap --dev-bind / / \
@@ -38,13 +40,18 @@ bwrap --dev-bind / / \
elif [ "$1" = "policy" ] || [ "$1" = "search" ];then
sudo bwrap --dev-bind / / --bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list apt update -o Dir::Etc::sourcelist="sources.list.d/sparkstore.list" -o Dir::etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
if [ ! -e "/var/lib/apt/lists/d.store.deepinos.org.cn_Packages" ];then
echo "接收星火仓库软件信息中..."
aptss ssupdate
fi
###执行
bwrap --dev-bind / / \
--bind '/tmp/aptss-conf/apt-fast.conf' /etc/apt-fast.conf \
--bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list \
apt "$@" --allow-downgrades
apt "$@"
elif [ "$1" = "ssupdate" ];then