diff --git a/debian/changelog b/debian/changelog index bbbd59c..e85e7f9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,8 @@ spark-store (4.1.2) stable; urgency=medium * fix: 适配c11代码规范,消除qt编译警告 * fix: 默认服务器域名指向cdn域名 * fix: 消除内部函数的无用变量,限制作用域 + * feat: aptss 除ssupdate外的操作时候如果检测到存在源文件存在则不再重复获取 + * fix: 修复在apt list锁被锁定的时候异常弹出有更新可用 * chore: 添加 Application 类,继承 DApplication,将 main 函数中设置属性、关于信息等操作移至 Application 构造函数中进行 * chore: 添加 setOrganizationName 操作,设置组织名称为 spark-union,与 SWRT 保持一致 diff --git a/tool/aptss b/tool/aptss index 1a2b761..563c40f 100755 --- a/tool/aptss +++ b/tool/aptss @@ -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 diff --git a/tool/update-upgrade/ss-update-notifier.sh b/tool/update-upgrade/ss-update-notifier.sh index 0febe57..271ea9c 100755 --- a/tool/update-upgrade/ss-update-notifier.sh +++ b/tool/update-upgrade/ss-update-notifier.sh @@ -47,9 +47,19 @@ fi # 每日更新星火源文件 curl --progress-bar -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list "https://gitee.com/deepin-community-store/repo_auto_update_script/raw/master/mirror-list-for-apt-fast/sources.list.d/sparkstore.list" -sleep 10 -updatetext=`aptss ssupdate` + +updatetext=`aptss ssupdate 2>&1` + +until [ "`echo $updatetext | grep E: `" = "" ];do +echo "更新出现异常状况,等待十五秒" +sleep 15 +updatetext=`aptss ssupdate 2>&1` + + + +done + isupdate=`echo ${updatetext: -5}` if [ "$isupdate" = "date." ] ; then exit 0