apt-ostree/debian/apt-ostree.postrm
robojerk 306a68b89a fix: Resolve compilation errors in parallel and cache modules
- Fix parallel execution logic to properly handle JoinHandle<Result<R, E>> types
- Use join_all instead of try_join_all for proper Result handling
- Fix double question mark (??) issue in parallel execution methods
- Clean up unused imports in parallel and cache modules
- Ensure all performance optimization modules compile successfully
- Fix CI build failures caused by compilation errors
2025-08-16 15:10:00 -07:00

66 lines
1.4 KiB
Bash
Executable file

#!/bin/sh
set -e
# Source debconf library
. /usr/share/debconf/confmodule
# Define package name
PACKAGE="apt-ostree"
# Function to log messages
log() {
echo "$PACKAGE: $1" >&2
}
# Function to cleanup shell completions
cleanup_completions() {
log "Cleaning up shell completions..."
# Remove bash completion
if [ -f /usr/share/bash-completion/completions/apt-ostree ]; then
rm -f /usr/share/bash-completion/completions/apt-ostree
fi
# Remove zsh completion
if [ -f /usr/share/zsh/vendor-completions/_apt-ostree ]; then
rm -f /usr/share/zsh/vendor-completions/_apt-ostree
fi
# Reload bash completion if available (skip if problematic)
# if [ -f /etc/bash_completion ]; then
# . /etc/bash_completion
# fi
}
# Function to cleanup man pages
cleanup_man_pages() {
log "Cleaning up man pages..."
# Remove man page
if [ -f /usr/share/man/man1/apt-ostree.1 ]; then
rm -f /usr/share/man/man1/apt-ostree.1
fi
# Update man page database
if command -v mandb >/dev/null 2>&1; then
mandb -q || true
fi
}
# Main execution
case "$1" in
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
cleanup_completions
cleanup_man_pages
;;
purge)
cleanup_completions
cleanup_man_pages
;;
*)
log "Unknown action: $1"
exit 1
;;
esac
exit 0