mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-15 21:32:05 +08:00
Compare commits
34 Commits
3.3
...
3.3.3test3
| Author | SHA1 | Date | |
|---|---|---|---|
| cbd594e217 | |||
| 42b6a20c97 | |||
| 110adc995d | |||
| cd6d0ac133 | |||
| 568e73de07 | |||
| 62c8841c50 | |||
| 6fd611919b | |||
| 77a84785de | |||
| 9969f4f2fc | |||
| 833a8ec14b | |||
| dd679f3f26 | |||
| 5411a832dc | |||
| 0aeadb5526 | |||
| 91fd97b878 | |||
| f2cf344f62 | |||
| 8d84e433a6 | |||
| a6e9dac2f9 | |||
| 495ef3292e | |||
| 5900b3cdf3 | |||
| e644214263 | |||
| 2b76f5e202 | |||
| 6fe06667eb | |||
| f61e3a6ede | |||
| bddbbcc2e8 | |||
| 8310a59df8 | |||
| 05cfdbb318 | |||
| b5488b6c32 | |||
| 6cec12be9d | |||
| 53f9746ebf | |||
| b68ef5aab1 | |||
| c6daf5159c | |||
| b0453c7a8a | |||
| c7ee32a452 | |||
| e1d25e401f |
56
debian/changelog
vendored
56
debian/changelog
vendored
@@ -1,3 +1,59 @@
|
|||||||
|
spark-store (3.3.3~test3) stable; urgency=medium
|
||||||
|
|
||||||
|
* Now use ss-apt-fast instead of apt-fast
|
||||||
|
* 修复:右上角 更新和安装设置 菜单中进入更新列表失效
|
||||||
|
|
||||||
|
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||||
|
|
||||||
|
spark-store (3.3.3~test2) stable; urgency=medium
|
||||||
|
|
||||||
|
* bug fix: 更新和检查更新出错时不报错.此更新需要一个推送
|
||||||
|
|
||||||
|
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||||
|
|
||||||
|
spark-store (3.3.3~test1) stable; urgency=medium
|
||||||
|
|
||||||
|
* 3.3.3将会是修复大部分bug后的最终版本
|
||||||
|
* 图形环境中所有root权限的组件剥离到cli(可用于deepin 23 daily,只保证商店本体正常运作,不处理安装依赖不满足)
|
||||||
|
* 文案更改:更新检查-->检查更新
|
||||||
|
|
||||||
|
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||||
|
|
||||||
|
spark-store (3.3.1~test1) stable; urgency=medium
|
||||||
|
|
||||||
|
* 安装时不再需要联网
|
||||||
|
|
||||||
|
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||||
|
|
||||||
|
spark-store (3.3.0.4) stable; urgency=medium
|
||||||
|
|
||||||
|
* 为减轻服务器压力,不再单独更新某一个应用,而是作为整体更新
|
||||||
|
|
||||||
|
|
||||||
|
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||||
|
|
||||||
|
spark-store (3.3.0.3) stable; urgency=medium
|
||||||
|
|
||||||
|
* 回滚 更新中行为到进度条而不是实时输出
|
||||||
|
* 更新应用时显示正在更新哪个应用
|
||||||
|
|
||||||
|
|
||||||
|
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||||
|
|
||||||
|
spark-store (3.3.0.2) stable; urgency=medium
|
||||||
|
|
||||||
|
* 修复 pkexec未执行
|
||||||
|
|
||||||
|
|
||||||
|
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||||
|
|
||||||
|
spark-store (3.3.0.1) stable; urgency=medium
|
||||||
|
|
||||||
|
* 修复 检查更新的更新进程未实际运行
|
||||||
|
|
||||||
|
|
||||||
|
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||||
|
|
||||||
spark-store (3.3) stable; urgency=medium
|
spark-store (3.3) stable; urgency=medium
|
||||||
|
|
||||||
* 修复 检查更新 未刷新软件源
|
* 修复 检查更新 未刷新软件源
|
||||||
|
|||||||
6
debian/spark-store.postinst
vendored
6
debian/spark-store.postinst
vendored
@@ -30,7 +30,7 @@ case "$1" in
|
|||||||
|
|
||||||
gcc /opt/durapps/spark-store/bin/ss-feedback/sender-d.sh.c -o /opt/durapps/spark-store/bin/ss-feedback/sender-d
|
gcc /opt/durapps/spark-store/bin/ss-feedback/sender-d.sh.c -o /opt/durapps/spark-store/bin/ss-feedback/sender-d
|
||||||
|
|
||||||
# Download and install key
|
# Install key
|
||||||
mkdir -p /tmp/spark-store-install/
|
mkdir -p /tmp/spark-store-install/
|
||||||
cp -f /opt/durapps/spark-store/bin/spark-store.asc /tmp/spark-store-install/spark-store.asc
|
cp -f /opt/durapps/spark-store/bin/spark-store.asc /tmp/spark-store-install/spark-store.asc
|
||||||
gpg --dearmor /tmp/spark-store-install/spark-store.asc
|
gpg --dearmor /tmp/spark-store-install/spark-store.asc
|
||||||
@@ -39,8 +39,8 @@ case "$1" in
|
|||||||
|
|
||||||
|
|
||||||
# Run apt update to avoid users being fucked up by the non-exist dependency problem
|
# Run apt update to avoid users being fucked up by the non-exist dependency problem
|
||||||
|
# Now abandoned as aptss now run ssupdate everytime
|
||||||
aptss ssupdate
|
#aptss ssupdate
|
||||||
|
|
||||||
|
|
||||||
# Start upgrade detect service
|
# Start upgrade detect service
|
||||||
|
|||||||
5
debian/spark-store.preinst
vendored
5
debian/spark-store.preinst
vendored
@@ -3,7 +3,7 @@
|
|||||||
function network-check()
|
function network-check()
|
||||||
{
|
{
|
||||||
#超时时间
|
#超时时间
|
||||||
local timeout=5
|
local timeout=15
|
||||||
|
|
||||||
#目标网站
|
#目标网站
|
||||||
local target=www.baidu.com
|
local target=www.baidu.com
|
||||||
@@ -24,4 +24,5 @@ function network-check()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
network-check
|
#network-check
|
||||||
|
echo "不再检测网络"
|
||||||
@@ -4,15 +4,15 @@
|
|||||||
<policyconfig>
|
<policyconfig>
|
||||||
<vendor>Spark Store</vendor>
|
<vendor>Spark Store</vendor>
|
||||||
<icon_name>x-package-repository</icon_name>
|
<icon_name>x-package-repository</icon_name>
|
||||||
<action id="store.spark-app.ss-do-upgrade">
|
<action id="store.spark-app.ss-do-upgrade-worker">
|
||||||
<description>运行ss-do-upgrade需要权限</description>
|
<description>运行ss-do-upgrade-worker需要权限</description>
|
||||||
<message>要使用ss-do-upgrade需要权限</message>
|
<message>要使用ss-do-upgrade-worker需要权限</message>
|
||||||
<defaults>
|
<defaults>
|
||||||
<allow_any>yes</allow_any>
|
<allow_any>yes</allow_any>
|
||||||
<allow_inactive>yes</allow_inactive>
|
<allow_inactive>yes</allow_inactive>
|
||||||
<allow_active>yes</allow_active>
|
<allow_active>yes</allow_active>
|
||||||
</defaults>
|
</defaults>
|
||||||
<annotate key="org.freedesktop.policykit.exec.path">/opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade.sh</annotate>
|
<annotate key="org.freedesktop.policykit.exec.path">/opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh</annotate>
|
||||||
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
|
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
|
||||||
</action>
|
</action>
|
||||||
</policyconfig>
|
</policyconfig>
|
||||||
@@ -36,7 +36,7 @@ desktop.path = /usr/share/applications
|
|||||||
service.files += pkg/usr/lib/systemd/system/spark-update-notifier.service
|
service.files += pkg/usr/lib/systemd/system/spark-update-notifier.service
|
||||||
service.path = /usr/lib/systemd/system/
|
service.path = /usr/lib/systemd/system/
|
||||||
|
|
||||||
polkit-1.files +=pkg/usr/share/polkit-1/actions/store.spark-app.ss-do-upgrade.policy
|
polkit-1.files +=pkg/usr/share/polkit-1/actions/store.spark-app.ss-do-upgrade-worker.policy
|
||||||
polkit-1.path = /usr/share/polkit-1/actions/
|
polkit-1.path = /usr/share/polkit-1/actions/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ int main(int argc, char *argv[])
|
|||||||
DAboutDialog dialog;
|
DAboutDialog dialog;
|
||||||
a.setAboutDialog(&dialog);
|
a.setAboutDialog(&dialog);
|
||||||
dialog.setLicense(QObject::tr("We publish this program under GPL V3"));
|
dialog.setLicense(QObject::tr("We publish this program under GPL V3"));
|
||||||
dialog.setVersion(DApplication::buildVersion("Version 3.3"));
|
dialog.setVersion(DApplication::buildVersion("Version 3.3.3~test3"));
|
||||||
dialog.setProductIcon(QIcon::fromTheme("spark-store")); // 设置Logo
|
dialog.setProductIcon(QIcon::fromTheme("spark-store")); // 设置Logo
|
||||||
dialog.setProductName(QLabel::tr("Spark Store"));
|
dialog.setProductName(QLabel::tr("Spark Store"));
|
||||||
dialog.setDescription(
|
dialog.setDescription(
|
||||||
@@ -58,7 +58,7 @@ int main(int argc, char *argv[])
|
|||||||
a.setOrganizationName("spark-union");
|
a.setOrganizationName("spark-union");
|
||||||
a.setOrganizationDomain("https://www.deepinos.org/");
|
a.setOrganizationDomain("https://www.deepinos.org/");
|
||||||
a.setApplicationName("Spark Store"); //不需要翻译,否则 ~/.local/share/ 下文件夹名称也被翻译为中文
|
a.setApplicationName("Spark Store"); //不需要翻译,否则 ~/.local/share/ 下文件夹名称也被翻译为中文
|
||||||
a.setApplicationVersion(DApplication::buildVersion("3.3"));
|
a.setApplicationVersion(DApplication::buildVersion("3.3.3~test3"));
|
||||||
a.setApplicationAcknowledgementPage("https://gitee.com/deepin-community-store/spark-store");
|
a.setApplicationAcknowledgementPage("https://gitee.com/deepin-community-store/spark-store");
|
||||||
a.setApplicationDescription(
|
a.setApplicationDescription(
|
||||||
QObject::tr(
|
QObject::tr(
|
||||||
|
|||||||
13
tool/aptss
13
tool/aptss
@@ -22,8 +22,8 @@ if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" = "full-upgrade" ] ;
|
|||||||
|
|
||||||
DEPEND=`which apt-fast`
|
DEPEND=`which apt-fast`
|
||||||
if [ "$DEPEND" = "" ] ; then
|
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 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
|
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"
|
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"
|
||||||
@@ -38,8 +38,8 @@ bwrap --dev-bind / / \
|
|||||||
elif [ "$1" = "download" ];then
|
elif [ "$1" = "download" ];then
|
||||||
DEPEND=`which apt-fast`
|
DEPEND=`which apt-fast`
|
||||||
if [ "$DEPEND" = "" ] ; then
|
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 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
|
fi
|
||||||
|
|
||||||
###执行
|
###执行
|
||||||
@@ -64,11 +64,10 @@ mkdir -p /tmp/aptss-conf/
|
|||||||
echo "从服务器获取配置和镜像列表..."
|
echo "从服务器获取配置和镜像列表..."
|
||||||
echo "Getting server and mirror lists..."
|
echo "Getting server and mirror lists..."
|
||||||
echo
|
echo
|
||||||
curl --progress-bar -o /tmp/aptss-conf/apt-fast.conf "https://gitee.com/deepin-community-store/repo_auto_update_script/raw/master/mirror-list-for-apt-fast/apt-fast.conf"
|
curl --silent -o /tmp/aptss-conf/apt-fast.conf "https://gitee.com/deepin-community-store/repo_auto_update_script/raw/master/mirror-list-for-apt-fast/apt-fast.conf"
|
||||||
chmod -R 755 /tmp/aptss-conf
|
chmod -R 755 /tmp/aptss-conf
|
||||||
|
|
||||||
sudo 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"
|
sudo curl --silent -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"
|
||||||
### 额外一份拿来给aptss自动补全用
|
|
||||||
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"
|
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"
|
||||||
|
|
||||||
#只更新星火源
|
#只更新星火源
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ if [ "$(id -u)" != "0" ];then
|
|||||||
|
|
||||||
IS_INSTALLED=`which apt-fast`
|
IS_INSTALLED=`which apt-fast`
|
||||||
if [ "$IS_INSTALLED" = "" ] ; then
|
if [ "$IS_INSTALLED" = "" ] ; then
|
||||||
echo "未安装依赖:apt-fast 开始安装"
|
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 apt-fast -y
|
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
|
fi
|
||||||
|
|
||||||
@@ -68,8 +68,8 @@ else
|
|||||||
|
|
||||||
IS_INSTALLED=`which apt-fast`
|
IS_INSTALLED=`which apt-fast`
|
||||||
if [ "$IS_INSTALLED" = "" ] ; then
|
if [ "$IS_INSTALLED" = "" ] ; 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 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
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
26
tool/update-upgrade/ss-do-upgrade-worker.sh
Executable file
26
tool/update-upgrade/ss-do-upgrade-worker.sh
Executable file
@@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if [ "$(id -u)" != "0" ];then
|
||||||
|
pkexec "$0" "$@"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
ssupdate)
|
||||||
|
aptss ssupdate 2>&1 | tee /tmp/spark-store-app-ssupdate-log.txt
|
||||||
|
IS_SSUPDATE_ERROR=`cat /tmp/spark-store-app-ssupdate-log.txt | grep "E: "`
|
||||||
|
echo "$IS_SSUPDATE_ERROR" > /tmp/spark-store-app-ssupdate-status.txt
|
||||||
|
;;
|
||||||
|
upgradable-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
|
||||||
|
;;
|
||||||
|
upgrade-app)
|
||||||
|
aptss install "${@:2}" --only-upgrade 2>&1 | tee /tmp/spark-store-app-upgrade-log.txt
|
||||||
|
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
|
||||||
|
;;
|
||||||
|
|
||||||
|
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
|
||||||
|
;;
|
||||||
|
esac
|
||||||
@@ -1,36 +1,55 @@
|
|||||||
#!/bin/bash
|
#!/bin/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)"
|
|
||||||
|
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 --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
|
||||||
|
pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh clean-log
|
||||||
|
|
||||||
|
PKG_LIST="$(pkexec /opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh upgradable-list)"
|
||||||
####如果没更新,就弹出不需要更新
|
####如果没更新,就弹出不需要更新
|
||||||
if [ -z "$PKG_LIST" ];then
|
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
|
else
|
||||||
PKG_UPGRADE_LIST=`for PKG_NAME in $PKG_LIST;
|
PKG_UPGRADE_LIST=`for PKG_NAME in $PKG_LIST;
|
||||||
do
|
do
|
||||||
#### 检测是否是hold状态
|
#### 检测是否是hold状态
|
||||||
if [ "$(dpkg-query -W -f='${Status}' $PKG_NAME | grep hold)" = "" ];then
|
if [ "$(dpkg-query -W -f='${Status}' $PKG_NAME | grep hold)" = "" ];then
|
||||||
echo "true"
|
echo "true"
|
||||||
|
echo "$PKG_NAME"
|
||||||
echo "$PKG_NAME"
|
echo "$PKG_NAME"
|
||||||
else
|
else
|
||||||
echo "false"
|
echo "false"
|
||||||
echo "$PKG_NAME (无法更新:请先执行 sudo apt-mark unhold 后再更新)"
|
echo "$PKG_NAME(无法更新:已被标记为保留)"
|
||||||
|
echo "$PKG_NAME"
|
||||||
fi
|
fi
|
||||||
done | zenity --list --text="选择你想更新的应用" --column=是否更新 --column=应用包名 --separator=" " --checklist --print-column=2 --multiple --height 350 --width 550 `
|
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
|
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
|
else
|
||||||
sudo aptss install $PKG_UPGRADE_LIST -y | zenity --progress --auto-close --no-cancel --pulsate --text=正在更新已选中的应用,请稍候... --height 70 --width 400 --title="星火商店更新模块"
|
|
||||||
|
|
||||||
if [ "$?" = "0" ];then
|
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
|
||||||
|
|
||||||
zenity --info --icon-name=spark-store --text "已选中的软件已经更新完毕" --title "星火商店更新检测服务" --height 150 --width 300
|
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
|
||||||
else
|
else
|
||||||
zenity --error --text "更新出现错误!请手动执行 sudo aptss full-upgrade 查看问题" --title "星火商店更新检测服务" --height 150 --width 300
|
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
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ case $option in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
2)
|
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)
|
3)
|
||||||
if [ -f /usr/share/polkit-1/actions/store.spark-app.ssinstall.policy ];then
|
if [ -f /usr/share/polkit-1/actions/store.spark-app.ssinstall.policy ];then
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ function notify-send() {
|
|||||||
function network()
|
function network()
|
||||||
{
|
{
|
||||||
#超时时间
|
#超时时间
|
||||||
local timeout=5
|
local timeout=15
|
||||||
|
|
||||||
#目标网站
|
#目标网站
|
||||||
local target=www.baidu.com
|
local target=www.baidu.com
|
||||||
|
|||||||
Reference in New Issue
Block a user