mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-07-08 06:35:58 +08:00
* feat: aptss 除ssupdate外的操作时候如果检测到存在源文件存在则不再重复获取
* fix: 修复在apt list锁被锁定的时候异常弹出有更新可用
This commit is contained in:
parent
c169622806
commit
980e4a17d9
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -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 保持一致
|
||||
|
15
tool/aptss
15
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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user