From 8f791cd6a6ebef64247263b73904964314747625 Mon Sep 17 00:00:00 2001 From: yeshanshan Date: Fri, 5 Sep 2025 14:25:11 +0800 Subject: [PATCH] fix: remove set -e and exit 0 from postinst script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed the 'set -e' command and explicit 'exit 0' from the postinst script to follow Debian packaging best practices. The 'set -e' command causes the script to exit immediately on any error, which can prevent proper error handling and cleanup in package installation scripts. The explicit 'exit 0' is unnecessary as the script will naturally exit with the status of the last executed command. These changes ensure the script behaves consistently with standard Debian package installation conventions. Influence: 1. Test package installation and removal to ensure no regression 2. Verify that script errors are handled appropriately without immediate termination 3. Test triggered functionality to confirm proper operation 4. Check that the script exits with correct status codes in various scenarios fix: 从 postinst 脚本中移除 set -e 和 exit 0 移除了 postinst 脚本中的 'set -e' 命令和显式的 'exit 0' 以遵循 Debian 打 包最佳实践。'set -e' 命令会导致脚本在任何错误时立即退出,这可能妨碍包安 装脚本中的正确错误处理和清理。显式的 'exit 0' 是不必要的,因为脚本会自 然以最后执行命令的状态退出。这些更改确保脚本行为符合标准的 Debian 包安装 约定。 Influence: 1. 测试软件包安装和移除以确保没有回归问题 2. 验证脚本错误能够被适当处理而不会立即终止 3. 测试触发功能以确认正常运行 4. 检查脚本在各种场景下是否以正确的状态码退出 --- debian/dde-dconfig-daemon.postinst | 2 -- 1 file changed, 2 deletions(-) diff --git a/debian/dde-dconfig-daemon.postinst b/debian/dde-dconfig-daemon.postinst index e8d8b54..00ad146 100644 --- a/debian/dde-dconfig-daemon.postinst +++ b/debian/dde-dconfig-daemon.postinst @@ -1,5 +1,4 @@ #!/bin/sh -set -e # Handle dconfig triggers if [ "$1" = "triggered" ]; then @@ -17,4 +16,3 @@ if [ "$1" = "triggered" ]; then fi fi -exit 0