From 398cd512d705349847c075a86e98e7f5c7687fb1 Mon Sep 17 00:00:00 2001 From: shenmo Date: Mon, 15 Aug 2022 14:54:03 +0000 Subject: [PATCH] =?UTF-8?q?!76=20=20=20*=20=E6=94=B9=E5=8F=98=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E7=AD=96=E7=95=A5=EF=BC=8C=E7=8E=B0=E5=9C=A8=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=BA=94=E7=94=A8=E5=9C=A8=E6=9B=B4=E6=96=B0=E6=97=B6?= =?UTF-8?q?=E5=BC=95=E5=85=A5=E6=96=B0=E4=BE=9D=E8=B5=96=20*=20ss-apt-fast?= =?UTF-8?q?=E7=8E=B0=E5=9C=A8=E9=BB=98=E8=AE=A4=E5=85=81=E8=AE=B8=E9=99=8D?= =?UTF-8?q?=E7=BA=A7=EF=BC=8C=E4=BB=A5=E4=B8=8Eapt=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E4=BD=93=E9=AA=8C=E4=B8=80=E8=87=B4=20*=20=20=20*=20=E6=94=B9?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=E6=96=B0=E7=AD=96=E7=95=A5=EF=BC=8C=E7=8E=B0?= =?UTF-8?q?=E5=9C=A8=E6=94=AF=E6=8C=81=E5=BA=94=E7=94=A8=E5=9C=A8=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=97=B6=E5=BC=95=E5=85=A5=E6=96=B0=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 8 +++++ src/main.cpp | 4 +-- tool/ss-apt-fast | 2 +- tool/update-upgrade/ss-do-upgrade.sh | 40 ++++++++++++++++++---- tool/update-upgrade/ss-update-controler.sh | 3 +- 5 files changed, 46 insertions(+), 11 deletions(-) diff --git a/debian/changelog b/debian/changelog index c05bf2f..0b3b4d6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +spark-store (3.1.5) stable; urgency=medium + + * 改变更新策略,现在支持应用在更新时引入新依赖 + * ss-apt-fast现在默认允许降级,以与apt使用体验一致 + + +-- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.1.4-2) stable; urgency=medium * 客户端下载使用metalink来支持bt下载加速 diff --git a/src/main.cpp b/src/main.cpp index 6f93aba..13d1361 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -30,7 +30,7 @@ int main(int argc, char *argv[]) DAboutDialog dialog; a.setAboutDialog(&dialog); dialog.setLicense(QObject::tr("We publish this program under GPL V3")); - dialog.setVersion(DApplication::buildVersion("Version 3.1.4-2")); + dialog.setVersion(DApplication::buildVersion("Version 3.1.5")); dialog.setProductIcon(QIcon::fromTheme("spark-store")); // 设置Logo dialog.setProductName(QLabel::tr("Spark Store")); dialog.setDescription( @@ -51,7 +51,7 @@ int main(int argc, char *argv[]) a.setOrganizationName("spark-union"); a.setOrganizationDomain("https://www.deepinos.org/"); a.setApplicationName("Spark Store"); //不需要翻译,否则 ~/.local/share/ 下文件夹名称也被翻译为中文 - a.setApplicationVersion(DApplication::buildVersion("3.1.4-2")); + a.setApplicationVersion(DApplication::buildVersion("3.1.5")); a.setApplicationAcknowledgementPage("https://gitee.com/deepin-community-store/spark-store"); a.setApplicationDescription( QObject::tr( diff --git a/tool/ss-apt-fast b/tool/ss-apt-fast index fd619ee..8e3299f 100755 --- a/tool/ss-apt-fast +++ b/tool/ss-apt-fast @@ -24,7 +24,7 @@ fi bwrap --dev-bind / / \ --bind '/tmp/ss-apt-fast-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-fast "$@" + apt-fast "$@" --allow-downgrades rm -rf /tmp/ss-apt-fast-conf diff --git a/tool/update-upgrade/ss-do-upgrade.sh b/tool/update-upgrade/ss-do-upgrade.sh index 2013b2c..dd883bb 100755 --- a/tool/update-upgrade/ss-do-upgrade.sh +++ b/tool/update-upgrade/ss-do-upgrade.sh @@ -2,13 +2,41 @@ echo "以上可升级,是否升级?[y/n]" read yes_or_no -if [ "$yes_or_no" = "y" ];then -mkdir -p /tmp/ss-apt-fast-conf/sources.list.d +if [ "$yes_or_no" = "y" ];then ###这是确定是否同意 + +echo "获取更新列表..." +PKG_LIST="$(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 list --upgradable -o Dir::Etc::sourcelist="sources.list.d/sparkstore.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" | awk 'BEGIN {FS="/"} {print $1}' | awk NR\>1)" -sudo ss-apt-fast upgrade -y -o Dir::Etc::sourcelist="sources.list.d/sparkstore.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" +isuos=`cat /etc/os-release | grep UnionTech` +if [ "$isuos" != "" ]; then ###这是确定是否为UOS +echo "UOS中系统依赖无法使用第三方下载工具,放弃使用apt-fast" + + for PKG_NAME in $PKG_LIST; + do + echo "$PKG_NAME 正在准备更新..." + if 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 install "$PKG_NAME" -y >/dev/null 2>&1; + then + echo "$PKG_NAME 已更新" + else + echo "WARNING: $PKG_NAME 无法更新" + fi + done + +else ###这是确定是否为UOS + + for PKG_NAME in $PKG_LIST; + do + echo "$PKG_NAME 正在准备更新..." + if sudo /usr/local/bin/ss-apt-fast install "$PKG_NAME" -y >/dev/null 2>&1; + then + echo "$PKG_NAME 已更新" + else + echo "WARNING: $PKG_NAME 无法更新" + fi + done -else -exit -fi \ No newline at end of file +fi ###这是确定是否为UOS + +fi ###这是确定是否同意 \ No newline at end of file diff --git a/tool/update-upgrade/ss-update-controler.sh b/tool/update-upgrade/ss-update-controler.sh index 09c70f6..bcd8c46 100755 --- a/tool/update-upgrade/ss-update-controler.sh +++ b/tool/update-upgrade/ss-update-controler.sh @@ -71,10 +71,9 @@ case $option in ;; 2) - echo "请注意:如果有些更新需要从系统获取更多依赖,你将需要手动操作 sudo ss-apt-fast upgrade" echo "执行以下操作需要授权..." sudo ss-apt-fast ssupdate - /opt/durapps/spark-store/bin/update-upgrade/ss-upgrade-list.sh + /opt/durapps/spark-store/bin/update-upgrade/ss-upgrade-list.sh /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade.sh echo "---请按回车返回" read