From 384d4b300dd336373e61969179be57438c477148 Mon Sep 17 00:00:00 2001 From: shenmo Date: Fri, 20 Jan 2023 00:15:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=9C=A8=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E5=89=8D=E8=BF=9B=E8=A1=8C=E6=B5=8B=E8=AF=95=EF=BC=88ss-do-upg?= =?UTF-8?q?rade-worker=EF=BC=89=20=E7=94=A8=E6=B3=95=EF=BC=9Apkexec=20/opt?= =?UTF-8?q?/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh?= =?UTF-8?q?=20test-install-app=20pkgname?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 7 +++++++ src/main.cpp | 2 +- tool/update-upgrade/ss-do-upgrade-worker.sh | 15 +++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index df8d66d..04bf141 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +spark-store (4.2.1) stable; urgency=medium + + * 调整:支持在安装前进行测试(ss-do-upgrade-worker) + * 修复: 因依赖不完全导致在LinuxMint下无法下载统计 + + --shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (4.2) stable; urgency=medium * 调整:UOS开发者模式提示现在不会那么挤了 diff --git a/src/main.cpp b/src/main.cpp index 8cc8ba3..c52ffab 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -15,7 +15,7 @@ DWIDGET_USE_NAMESPACE int main(int argc, char *argv[]) { // Get build time - static const QString version = "4.2"; + static const QString version = "4.2.1"; static const QDate buildDate = QLocale(QLocale::English).toDate(QString(__DATE__).replace(" ", " 0"), "MMM dd yyyy"); static const QTime buildTime = QTime::fromString(__TIME__, "hh:mm:ss"); static const QString buildDateTime = buildDate.toString("yyyy.MM.dd") + "-" + buildTime.toString("hh:mm:ss"); diff --git a/tool/update-upgrade/ss-do-upgrade-worker.sh b/tool/update-upgrade/ss-do-upgrade-worker.sh index 04c082c..d6cf44e 100755 --- a/tool/update-upgrade/ss-do-upgrade-worker.sh +++ b/tool/update-upgrade/ss-do-upgrade-worker.sh @@ -32,6 +32,21 @@ case $1 in IS_UPGRADE_ERROR=`cat /tmp/spark-store-app-upgrade-log.txt | grep "Package manager quit with exit code."` echo "$IS_UPGRADE_ERROR" > /tmp/spark-store-app-upgrade-status.txt ;; + test-install-app) + try_run_output=$(aptss --dry-run install $@) + try_run_ret="$?" + + if [ "$try_run_ret" -ne 0 ] + then + echo "Package manager quit with exit code.Here is the log" + echo "包管理器以错误代码退出.日志如下" + echo + echo -e "${try_run_output}" + exit "$try_run_ret" + fi + + exit 0 + ;; clean-log) rm -f /tmp/spark-store-app-ssupdate-status.txt /tmp/spark-store-app-ssupdate-log.txt /tmp/spark-store-app-upgrade-log.txt /tmp/spark-store-app-upgrade-status.txt