feat: #I7R2L5 更新星火商店时不再自动打开更新提示服务

prerm 脚本中添加判断,upgrade 时将更新提示 service 文件改名添加 bak,以此作为升级判断依据;postinst 脚本中判断 bak 文件存在时,优先判断更新提示服务是否为 enable 状态,若被 disable 则不再自启(若为 inactive 状态则同理不再重启服务)

Log: 修改 prerm 和 postinst 实现更新时判断更新提示服务是否需要重新设置自启;修改 debian/changelog,消除编译打包警告
This commit is contained in:
zty199
2023-08-11 23:23:22 +08:00
parent 1f98c8df7c
commit 9f23c2b381
3 changed files with 101 additions and 47 deletions

View File

@@ -4,23 +4,23 @@ case "$1" in
configure)
case `arch` in
x86_64)
echo "Enabling i386 arch..."
dpkg --add-architecture i386
;;
aarch64)
echo "Enabling armhf arch..."
dpkg --add-architecture armhf
;;
*)
echo "Unknown architecture, skip enable 32-bit arch"
;;
x86_64)
echo "Enabling i386 arch..."
dpkg --add-architecture i386
;;
aarch64)
echo "Enabling armhf arch..."
dpkg --add-architecture armhf
;;
*)
echo "Unknown architecture, skip enable 32-bit arch"
;;
esac
mkdir -p /var/lib/aptss/lists
# Remove the sources.list file
rm -f /etc/apt/sources.list.d/sparkstore.list
@@ -39,8 +39,6 @@ case "$1" in
# Create symbol links for SSINSTALL
ln -s -f /opt/durapps/spark-store/bin/auto-install-policy/store.spark-app.ssinstall.policy /usr/share/polkit-1/actions/store.spark-app.ssinstall.policy
# Install key
mkdir -p /tmp/spark-store-install/
cp -f /opt/durapps/spark-store/bin/spark-store.asc /tmp/spark-store-install/spark-store.asc
@@ -52,8 +50,21 @@ case "$1" in
#aptss ssupdate
# Start upgrade detect service
systemctl enable spark-update-notifier
systemctl start spark-update-notifier
systemctl daemon-reload
# Do NOT enable upgrade detect service if disabled by user
if [ ! -f "/usr/lib/systemd/system/spark-update-notifier.service.bak" ] ; then
systemctl enable spark-update-notifier
systemctl start spark-update-notifier
else
if [ $(systemctl is-enabled spark-update-notifier.service) = "enabled" ] ; then
systemctl reenable spark-update-notifier
if [ $(systemctl is-active spark-update-notifier.service) = "active" ] ; then
systemctl restart spark-update-notifier
fi
fi
rm -f /usr/lib/systemd/system/spark-update-notifier.service.bak
fi
# Update certain caches
update-icon-caches /usr/share/icons/hicolor || true