From 6fd611919b08974315b24281947c1325a8c93d9b Mon Sep 17 00:00:00 2001 From: shenmo Date: Fri, 28 Oct 2022 09:08:21 +0800 Subject: [PATCH 1/6] Now use ss-apt-fast as aptss backend --- debian/changelog | 6 ++++++ src/main.cpp | 4 ++-- tool/aptss | 2 +- tool/ssinstall | 8 ++++---- tool/update-upgrade/ss-do-upgrade.sh | 20 ++++++++++---------- 5 files changed, 23 insertions(+), 17 deletions(-) diff --git a/debian/changelog b/debian/changelog index a8e3694..85216d5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +spark-store (3.3.3~test3) stable; urgency=medium + + * Now use ss-apt-fast instead of apt-fast + +-- shenmo Fri, 30 Jan 2022 00:00:00 +0800 + spark-store (3.3.3~test2) stable; urgency=medium * bug fix: 更新和检查更新出错时不报错.此更新需要一个推送 diff --git a/src/main.cpp b/src/main.cpp index b41fcaf..840ea8d 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.3~test2")); + dialog.setVersion(DApplication::buildVersion("Version 3.3.3~test3")); 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.3~test2")); + a.setApplicationVersion(DApplication::buildVersion("3.3.3~test3")); a.setApplicationAcknowledgementPage("https://gitee.com/deepin-community-store/spark-store"); a.setApplicationDescription( QObject::tr( diff --git a/tool/aptss b/tool/aptss index 13ff0f4..ec7684c 100755 --- a/tool/aptss +++ b/tool/aptss @@ -23,7 +23,7 @@ if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" = "full-upgrade" ] ; DEPEND=`which apt-fast` if [ "$DEPEND" = "" ] ; then echo "未安装依赖:apt-fast 开始安装" -aptss ssupdate && 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 apt-fast -y +aptss ssupdate && 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 ss-apt-fast -y fi 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" diff --git a/tool/ssinstall b/tool/ssinstall index d361c71..3ac148c 100755 --- a/tool/ssinstall +++ b/tool/ssinstall @@ -47,8 +47,8 @@ if [ "$(id -u)" != "0" ];then IS_INSTALLED=`which apt-fast` if [ "$IS_INSTALLED" = "" ] ; then -echo "未安装依赖:apt-fast 开始安装" -echo "$upass" | sudo -S aptss ssupdate && echo "$upass" | sudo -S 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 apt-fast -y +echo "未安装依赖:ss-apt-fast 开始安装" +echo "$upass" | sudo -S aptss ssupdate && echo "$upass" | sudo -S 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 ss-apt-fast -y fi @@ -68,8 +68,8 @@ else IS_INSTALLED=`which apt-fast` if [ "$IS_INSTALLED" = "" ] ; then -echo "未安装依赖:apt-fast 开始安装" -aptss ssupdate && 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 apt-fast -y +echo "未安装依赖:ss-apt-fast 开始安装" +aptss ssupdate && 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 ss-apt-fast -y fi diff --git a/tool/update-upgrade/ss-do-upgrade.sh b/tool/update-upgrade/ss-do-upgrade.sh index b548506..a7b406c 100755 --- a/tool/update-upgrade/ss-do-upgrade.sh +++ b/tool/update-upgrade/ss-do-upgrade.sh @@ -1,13 +1,13 @@ #!/bin/bash -pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh ssupdate | zenity --progress --auto-close --pulsate --no-cancel --text="正在检查更新,请稍候..." --height 70 --width 400 --title="星火商店更新模块" +pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh ssupdate | zenity --progress --auto-close --pulsate --no-cancel --text="正在检查更新,请稍候..." --height 70 --width 400 --title="星火商店更新模块" --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg if [ -z `cat /tmp/spark-store-app-ssupdate-status.txt` != "0" ];then echo "无错误" else -zenity --error --text "检查更新进程出现错误!按确定查看报错,可用于反馈" --title "星火商店更新检测服务" --height 200 --width 350 -zenity --text-info --filename=/tmp/spark-store-app-ssupdate-log.txt --checkbox="我已复制了此文本框中的日志,且将会在反馈时附上 。反馈渠道可以在右上角菜单的设置中找到" --title="反馈渠道在商店右上角的设置里" +zenity --error --text "检查更新进程出现错误!按确定查看报错,可用于反馈" --title "星火商店更新检测服务" --height 200 --width 350 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg +zenity --text-info --filename=/tmp/spark-store-app-ssupdate-log.txt --checkbox="我已复制了此文本框中的日志,且将会在反馈时附上 。反馈渠道可以在右上角菜单的设置中找到" --title="反馈渠道在商店右上角的设置里" --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh clean-log exit fi @@ -16,7 +16,7 @@ pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh clean PKG_LIST="$(pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh upgradable-list)" ####如果没更新,就弹出不需要更新 if [ -z "$PKG_LIST" ];then -zenity --info --icon-name=spark-store --text "没有软件需要更新\n但是你并没有站在世界之巅" --title "星火商店更新检测服务" --height 150 --width 300 +zenity --info --text "没有软件需要更新\n但是你并没有站在世界之巅" --title "星火商店更新检测服务" --height 150 --width 300 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg else PKG_UPGRADE_LIST=`for PKG_NAME in $PKG_LIST; do @@ -30,22 +30,22 @@ do echo "$PKG_NAME(无法更新:已被标记为保留)" echo "$PKG_NAME" fi -done | zenity --list --text="选择你想更新的应用" --column=是否更新 --column=应用包名 --column="真的应用包名" --separator=" " --checklist --print-column=3 --multiple --height 350 --width 550 --hide-column=3` +done | zenity --list --text="选择你想更新的应用" --column=是否更新 --column=应用包名 --column="真的应用包名" --separator=" " --checklist --print-column=3 --multiple --height 350 --width 550 --hide-column=3 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg` #### 如果没有选择,则直接退出 if [ "$PKG_UPGRADE_LIST" = "" ];then -zenity --info --icon-name=spark-store --text "没有选中任何软件\n但是你并没有站在世界之巅" --title "星火商店更新检测服务" --height 150 --width 300 +zenity --info --text "没有选中任何软件\n但是你并没有站在世界之巅" --title "星火商店更新检测服务" --height 150 --width 300 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg else -pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh upgrade-app $PKG_UPGRADE_LIST -y | zenity --progress --auto-close --no-cancel --pulsate --text=正在更新已选中的应用,请稍候... --height 70 --width 400 --title="星火商店更新模块" +pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh upgrade-app $PKG_UPGRADE_LIST -y | zenity --progress --auto-close --no-cancel --pulsate --text=正在更新已选中的应用,请稍候... --height 70 --width 400 --title="星火商店更新模块" --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg if [ -z "`cat /tmp/spark-store-app-upgrade-status.txt`" ];then -zenity --info --icon-name=spark-store --text "已选中的软件已经更新完毕" --title "星火商店更新检测服务" --height 150 --width 300 +zenity --info --text "已选中的软件已经更新完毕" --title "星火商店更新检测服务" --height 150 --width 300 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg else -zenity --error --text "更新出现错误!按确定查看报错,可用于反馈" --title "星火商店更新检测服务" --height 200 --width 350 -zenity --text-info --filename=/tmp/spark-store-app-upgrade-log.txt --checkbox="我已复制了此文本框中的日志,且将会在反馈时附上 。反馈渠道可以在右上角菜单的设置中找到" --title="反馈渠道在商店右上角的设置里往下拉" +zenity --error --text "更新出现错误!按确定查看报错,可用于反馈" --title "星火商店更新检测服务" --height 200 --width 350 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg +zenity --text-info --filename=/tmp/spark-store-app-upgrade-log.txt --checkbox="我已复制了此文本框中的日志,且将会在反馈时附上 。反馈渠道可以在右上角菜单的设置中找到" --title="反馈渠道在商店右上角的设置里往下拉" --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg fi From 62c8841c50dac1c2db11a3160825fef63c31092d Mon Sep 17 00:00:00 2001 From: shenmo Date: Fri, 28 Oct 2022 09:55:48 +0800 Subject: [PATCH 2/6] =?UTF-8?q?aptss=E7=9A=84download=E4=B9=9F=E4=BD=BF?= =?UTF-8?q?=E7=94=A8ss-apt-fast?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tool/aptss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/aptss b/tool/aptss index ec7684c..7449e9c 100755 --- a/tool/aptss +++ b/tool/aptss @@ -39,7 +39,7 @@ elif [ "$1" = "download" ];then DEPEND=`which apt-fast` if [ "$DEPEND" = "" ] ; then echo "未安装依赖:apt-fast 开始安装" -aptss ssupdate && 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 apt-fast -y +aptss ssupdate && 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 ss-apt-fast -y fi ###执行 From 568e73de07a73c188c0dee6cdb9134dd97377498 Mon Sep 17 00:00:00 2001 From: shenmo Date: Fri, 28 Oct 2022 09:58:17 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=96=87=E6=A1=88=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tool/aptss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/aptss b/tool/aptss index 7449e9c..b20255c 100755 --- a/tool/aptss +++ b/tool/aptss @@ -38,7 +38,7 @@ bwrap --dev-bind / / \ elif [ "$1" = "download" ];then DEPEND=`which apt-fast` if [ "$DEPEND" = "" ] ; then -echo "未安装依赖:apt-fast 开始安装" +echo "未安装依赖:ss-apt-fast 开始安装" aptss ssupdate && 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 ss-apt-fast -y fi From cd6d0ac1339da6410fff05c410e6c7be071d1336 Mon Sep 17 00:00:00 2001 From: shenmo Date: Fri, 28 Oct 2022 10:19:17 +0800 Subject: [PATCH 4/6] cmmit --- tool/update-upgrade/ss-do-upgrade.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tool/update-upgrade/ss-do-upgrade.sh b/tool/update-upgrade/ss-do-upgrade.sh index a7b406c..7af8431 100755 --- a/tool/update-upgrade/ss-do-upgrade.sh +++ b/tool/update-upgrade/ss-do-upgrade.sh @@ -1,12 +1,12 @@ #!/bin/bash -pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh ssupdate | zenity --progress --auto-close --pulsate --no-cancel --text="正在检查更新,请稍候..." --height 70 --width 400 --title="星火商店更新模块" --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg +pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh ssupdate | zenity --progress --auto-close --pulsate --no-cancel --text="正在检查更新,请稍候..." --height 70 --width 400 --title="星火商店更新模块" --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg if [ -z `cat /tmp/spark-store-app-ssupdate-status.txt` != "0" ];then echo "无错误" else -zenity --error --text "检查更新进程出现错误!按确定查看报错,可用于反馈" --title "星火商店更新检测服务" --height 200 --width 350 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg +zenity --error --text "检查更新进程出现错误!按确定查看报错,可用于反馈" --title "星火商店更新检测模块" --height 200 --width 350 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg zenity --text-info --filename=/tmp/spark-store-app-ssupdate-log.txt --checkbox="我已复制了此文本框中的日志,且将会在反馈时附上 。反馈渠道可以在右上角菜单的设置中找到" --title="反馈渠道在商店右上角的设置里" --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh clean-log exit @@ -16,7 +16,7 @@ pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh clean PKG_LIST="$(pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh upgradable-list)" ####如果没更新,就弹出不需要更新 if [ -z "$PKG_LIST" ];then -zenity --info --text "没有软件需要更新\n但是你并没有站在世界之巅" --title "星火商店更新检测服务" --height 150 --width 300 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg +zenity --info --text "没有软件需要更新\n但是你并没有站在世界之巅" --title "星火商店更新检测模块" --height 150 --width 300 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg else PKG_UPGRADE_LIST=`for PKG_NAME in $PKG_LIST; do @@ -42,9 +42,9 @@ pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh upgra if [ -z "`cat /tmp/spark-store-app-upgrade-status.txt`" ];then -zenity --info --text "已选中的软件已经更新完毕" --title "星火商店更新检测服务" --height 150 --width 300 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg +zenity --info --text "已选中的软件已经更新完毕" --title "星火商店更新检测模块" --height 150 --width 300 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg else -zenity --error --text "更新出现错误!按确定查看报错,可用于反馈" --title "星火商店更新检测服务" --height 200 --width 350 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg +zenity --error --text "更新出现错误!按确定查看报错,可用于反馈" --title "星火商店更新检测模块" --height 200 --width 350 --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg zenity --text-info --filename=/tmp/spark-store-app-upgrade-log.txt --checkbox="我已复制了此文本框中的日志,且将会在反馈时附上 。反馈渠道可以在右上角菜单的设置中找到" --title="反馈渠道在商店右上角的设置里往下拉" --window-icon=/usr/share/icons/hicolor/scalable/apps/spark-store.svg fi From 110adc995d212f9ffc2182642051833a5a5755eb Mon Sep 17 00:00:00 2001 From: shenmo Date: Fri, 28 Oct 2022 10:20:23 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E6=96=87=E6=A1=88=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tool/aptss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/aptss b/tool/aptss index b20255c..343da97 100755 --- a/tool/aptss +++ b/tool/aptss @@ -22,7 +22,7 @@ if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" = "full-upgrade" ] ; DEPEND=`which apt-fast` if [ "$DEPEND" = "" ] ; then -echo "未安装依赖:apt-fast 开始安装" +echo "未安装依赖:ss-apt-fast 开始安装" aptss ssupdate && 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 ss-apt-fast -y fi From 42b6a20c975f4ddef40bac65641bdf8d8871b118 Mon Sep 17 00:00:00 2001 From: shenmo Date: Fri, 28 Oct 2022 21:43:57 +0800 Subject: [PATCH 6/6] =?UTF-8?q?fix=20=E8=8F=9C=E5=8D=95=E4=B8=AD=E8=BF=9B?= =?UTF-8?q?=E5=85=A5=E6=9B=B4=E6=96=B0=E5=88=97=E8=A1=A8=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 1 + tool/update-upgrade/ss-update-controler.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 85216d5..5218078 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ spark-store (3.3.3~test3) stable; urgency=medium * Now use ss-apt-fast instead of apt-fast + * 修复:右上角 更新和安装设置 菜单中进入更新列表失效 -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 diff --git a/tool/update-upgrade/ss-update-controler.sh b/tool/update-upgrade/ss-update-controler.sh index b6c65c0..8e0dea4 100755 --- a/tool/update-upgrade/ss-update-controler.sh +++ b/tool/update-upgrade/ss-update-controler.sh @@ -40,7 +40,7 @@ case $option in ;; 2) - pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade.sh + /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade.sh ;; 3) if [ -f /usr/share/polkit-1/actions/store.spark-app.ssinstall.policy ];then