diff --git a/debian/changelog b/debian/changelog index e98c87f..fa05cd1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +spark-store (4.2.7.1) stable; urgency=medium + + * 修复:aptss加锁失败现在会正常报错 + * 新增:在aptss的特定操作时添加了提示 + * 新增:在aptss提示加粗 + * 调整:ssinstall验证支持使用cdn.d.获取 + + -- shenmo Sun, 5 Mar 2022 11:45:14 +0800 + + spark-store (4.2.7) stable; urgency=medium * 修复:更新星火商店后禁止更新提醒的配置失效 diff --git a/debian/spark-store.postinst b/debian/spark-store.postinst index e681b13..dae15a1 100755 --- a/debian/spark-store.postinst +++ b/debian/spark-store.postinst @@ -10,8 +10,7 @@ case "$1" in ;; aarch64) - echo "Enabling armhf arch..." - dpkg --add-architecture armhf + echo "Will not enable armhf since 4271" ;; *) diff --git a/pkg/usr/share/aptss/transhell/aptss_en_US.transhell b/pkg/usr/share/aptss/transhell/aptss_en_US.transhell index 28a9715..b74b388 100644 --- a/pkg/usr/share/aptss/transhell/aptss_en_US.transhell +++ b/pkg/usr/share/aptss/transhell/aptss_en_US.transhell @@ -1,4 +1,5 @@ #!/bin/bash -TRANSHELL_CONTENT_RUNNING_IN_NOT_ROOT_USER="W:Running in non-root mode! If error occurs, please try to excute me as root." +TRANSHELL_CONTENT_RUNNING_IN_NOT_ROOT_USER="INFO:Running in non-root mode! If error occurs, please try to excute me as root." TRANSHELL_CONTENT_INFO_SOURCES_LIST_D_IS_EMPTY="INFO:sources.list.d directory is empty,will not try to sync" TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST="Getting server and mirror lists..." +TRANSHELL_CONTENT_PLEASE_USE_APTSS_INSTEAD_OF_APT="Please note: Although the error message suggests using \"apt\" (such as \"apt install --fix-broken\"), please use \"aptss\" instead of \"apt\" when troubleshooting errors (for example, change to \"aptss install --fix-broken\")." diff --git a/pkg/usr/share/aptss/transhell/aptss_zh_CN.transhell b/pkg/usr/share/aptss/transhell/aptss_zh_CN.transhell index 1f16da5..97d8e94 100644 --- a/pkg/usr/share/aptss/transhell/aptss_zh_CN.transhell +++ b/pkg/usr/share/aptss/transhell/aptss_zh_CN.transhell @@ -1,4 +1,5 @@ #!/bin/bash -TRANSHELL_CONTENT_RUNNING_IN_NOT_ROOT_USER="警告:正在使用非root权限模式启动!若出现问题,请尝试使用root权限执行指令" +TRANSHELL_CONTENT_RUNNING_IN_NOT_ROOT_USER="信息:正在使用非root权限模式启动!若出现问题,请尝试使用root权限执行指令" TRANSHELL_CONTENT_INFO_SOURCES_LIST_D_IS_EMPTY="信息:sources.list.d文件夹是空的,将不会尝试同步" TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST="从服务器获取配置和镜像列表..." +TRANSHELL_CONTENT_PLEASE_USE_APTSS_INSTEAD_OF_APT="注意:尽管报错信息中提示使用apt(如apt install --fix-broken),请在排查错误的时候使用aptss而不是apt(对于例子,改为使用 aptss install --fix-broken)." diff --git a/tool/aptss b/tool/aptss index 21a6ae5..f9c9805 100755 --- a/tool/aptss +++ b/tool/aptss @@ -24,7 +24,7 @@ is_empty_dir(){ if [ "$(id -u)" != "0" ];then #############################无root权限时 -echo "${TRANSHELL_CONTENT_RUNNING_IN_NOT_ROOT_USER}" +echo -e "\e[1;32m${TRANSHELL_CONTENT_RUNNING_IN_NOT_ROOT_USER}\e[0m" else @@ -38,7 +38,7 @@ fi if [ ! -e "/tmp/aptss-conf/apt-fast.conf" ];then ###刷新apt-fast配置 mkdir -p /tmp/aptss-conf/ -echo "${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}" +echo -e "\e[1;32m${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}\e[0m" echo curl --progress-bar -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf" chmod -R 755 /tmp/aptss-conf @@ -49,7 +49,7 @@ fi if [ ! -e "/var/lib/aptss/lists/d.spark-app.store_${STORE_URL}_Packages" ] && [ ! -e "/var/lib/aptss/lists/d.store.deepinos.org.cn_${STORE_URL}_Packages" ] && [ ! -e "/var/lib/aptss/lists/mirrors.sdu.edu.cn_spark-store-repository_${STORE_URL}_Packages" ];then mkdir -p /tmp/aptss-conf/ -echo "${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}" +echo -e "\e[1;32m${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}\e[0m" echo curl --silent -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf" chmod -R 755 /tmp/aptss-conf @@ -74,6 +74,9 @@ if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" = "full-upgrade" ] ; ${SS_APT_FAST} "$@" --allow-downgrades -c /opt/durapps/spark-store/bin/apt-fast-conf/aptss-apt.conf +echo -e "\e[1;33m$TRANSHELL_CONTENT_PLEASE_USE_APTSS_INSTEAD_OF_APT\e[0m" + + elif [ "$1" = "download" ];then @@ -92,7 +95,7 @@ elif [ "$1" = "policy" ] || [ "$1" = "search" ];then elif [ "$1" = "ssupdate" ];then mkdir -p /tmp/aptss-conf/ -echo "${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}" +echo -e "\e[1;32m${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}\e[0m" echo curl --silent -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf" chmod -R 755 /tmp/aptss-conf @@ -105,12 +108,10 @@ apt update -c /opt/durapps/spark-store/bin/apt-fast-conf/aptss-apt.conf -o Dir:: #只更新星火源 elif [ "$1" = "update" ];then -curl --progress-bar -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list "https://d.store.deepinos.org.cn/sparkstore${STORE_LIST_URL}.list" - - -mkdir -p /tmp/aptss-conf/ -echo "${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}" +echo -e "\e[1;32m${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}\e[0m" echo +curl --progress-bar -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list "https://d.store.deepinos.org.cn/sparkstore${STORE_LIST_URL}.list" +mkdir -p /tmp/aptss-conf/ curl --progress-bar -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf" chmod -R 755 /tmp/aptss-conf ### 额外一份拿来给aptss自动补全用 diff --git a/tool/ssinstall b/tool/ssinstall index d674144..500abe7 100755 --- a/tool/ssinstall +++ b/tool/ssinstall @@ -43,15 +43,15 @@ function zenity() function hash_check() { -if [ ! -e "/var/lib/aptss/lists/zunyun01.store.deepinos.org.cn_${STORE_URL}_Packages" ] && [ ! -e "/var/lib/aptss/lists/d.store.deepinos.org.cn_${STORE_URL}_Packages" ] && [ ! -e "/var/lib/aptss/lists/mirrors.sdu.edu.cn_spark-store-repository_${STORE_URL}_Packages" ];then +if [ ! -e "/var/lib/aptss/lists/cdn.d.store.deepinos.org.cn_${STORE_URL}_Packages" ] && [ ! -e "/var/lib/aptss/lists/d.store.deepinos.org.cn_${STORE_URL}_Packages" ] && [ ! -e "/var/lib/aptss/lists/mirrors.sdu.edu.cn_spark-store-repository_${STORE_URL}_Packages" ];then echo "接收星火仓库软件信息中..." aptss ssupdate fi ### 选择包信息位置 -if [ -e "/var/lib/aptss/lists/zunyun01.store.deepinos.org.cn_${STORE_URL}_Packages" ];then -PACKAGES_DATA_PATH="/var/lib/aptss/lists/zunyun01.store.deepinos.org.cn_${STORE_URL}_Packages" +if [ -e "/var/lib/aptss/lists/cdn.d.store.deepinos.org.cn_${STORE_URL}_Packages" ];then +PACKAGES_DATA_PATH="/var/lib/aptss/lists/cdn.d.store.deepinos.org.cn_${STORE_URL}_Packages" echo "星火仓库的Packages位置为 $PACKAGES_DATA_PATH,是星火域名单目录仓库配置" elif [ -e "/var/lib/aptss/lists/d.store.deepinos.org.cn_${STORE_URL}_Packages" ];then PACKAGES_DATA_PATH="/var/lib/aptss/lists/d.store.deepinos.org.cn_${STORE_URL}_Packages" @@ -144,6 +144,14 @@ fi else echo "${TRANSHELL_CONTENT_WILL_NOT_DELETE_DEB}" +if dpkg -s "$package_name" >/dev/null 2>&1; then + echo "软件包已安装:$package_name" +else + echo "软件包未安装:$package_name" + echo "安装异常!抛出错误" +echo "OMG-IT-GOES-WRONG" +fi + fi else