From 6cec12be9ddef11b26df6256027c68aa26bc08fd Mon Sep 17 00:00:00 2001 From: shenmo Date: Sun, 23 Oct 2022 13:06:03 +0800 Subject: [PATCH] =?UTF-8?q?3302=20=E4=BF=AE=E5=A4=8Dpkexec=E6=9C=AA?= =?UTF-8?q?=E6=89=A7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 7 +++++++ src/main.cpp | 4 ++-- tool/update-upgrade/ss-do-upgrade.sh | 7 ++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8a5fca4..fc56541 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +spark-store (3.3.0.2) stable; urgency=medium + + * 修复 pkexec未执行 + + +-- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.3.0.1) stable; urgency=medium * 修复 检查更新的更新进程未实际运行 diff --git a/src/main.cpp b/src/main.cpp index 8717195..c985e45 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -37,7 +37,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.3.0.1")); + dialog.setVersion(DApplication::buildVersion("Version 3.3.0.2")); dialog.setProductIcon(QIcon::fromTheme("spark-store")); // 设置Logo dialog.setProductName(QLabel::tr("Spark Store")); dialog.setDescription( @@ -58,7 +58,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.3.0.1")); + a.setApplicationVersion(DApplication::buildVersion("3.3.0.2")); a.setApplicationAcknowledgementPage("https://gitee.com/deepin-community-store/spark-store"); a.setApplicationDescription( QObject::tr( diff --git a/tool/update-upgrade/ss-do-upgrade.sh b/tool/update-upgrade/ss-do-upgrade.sh index 008584e..e079ee1 100755 --- a/tool/update-upgrade/ss-do-upgrade.sh +++ b/tool/update-upgrade/ss-do-upgrade.sh @@ -1,4 +1,9 @@ #!/bin/bash +if [ "$(id -u)" != "0" ];then +pkexec $0 +exit +fi + bash aptss ssupdate | zenity --progress --auto-close --no-cancel --pulsate --text=正在更新检查,请稍候... --height 70 --width 400 --title="星火商店更新模块" 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)" ####如果没更新,就弹出不需要更新 @@ -22,7 +27,7 @@ done | zenity --list --text="选择你想更新的应用" --column=是否更新 if [ "$PKG_UPGRADE_LIST" = "" ];then zenity --info --icon-name=spark-store --text "没有选中任何软件\n但是你并没有站在世界之巅" --title "星火商店更新检测服务" --height 150 --width 300 else -bash aptss install $PKG_UPGRADE_LIST -y | zenity --progress --auto-close --no-cancel --pulsate --text=正在更新已选中的应用,请稍候... --height 70 --width 400 --title="星火商店更新模块" +bash aptss install $PKG_UPGRADE_LIST -y | zenity --text-info --title="更新日志" --width 550 --height 540 --auto-scroll if [ "$?" = "0" ];then