Fix rpm-ostree compatibility and postinst script issues
- Add --version and --help flags for rpm-ostree compatibility - Fix postinst script to handle 'triggered' argument properly - Maintain subcommand interface while adding flag support - Improve error messages and help text
This commit is contained in:
parent
86b2c1b4ea
commit
5fe7b0a519
3 changed files with 125 additions and 25 deletions
17
debian/apt-ostree.postinst
vendored
17
debian/apt-ostree.postinst
vendored
|
|
@ -127,6 +127,23 @@ EOF
|
|||
echo "Aborting $PACKAGE configuration..."
|
||||
;;
|
||||
|
||||
triggered)
|
||||
# Handle trigger activation (e.g., man page updates, shell completion)
|
||||
echo "Handling $PACKAGE triggers..."
|
||||
|
||||
# Update shell completion caches
|
||||
if command -v update-bash-completion >/dev/null 2>&1; then
|
||||
update-bash-completion apt-ostree || true
|
||||
fi
|
||||
|
||||
# Update man page database
|
||||
if command -v mandb >/dev/null 2>&1; then
|
||||
mandb -q || true
|
||||
fi
|
||||
|
||||
echo "$PACKAGE triggers handled successfully"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue