apt-ostree/debian/apt-ostree.postinst
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

68 lines
1.7 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 setup shell completions
setup_completions() {
log "Setting up shell completions..."
# Reload bash completion if available (skip if problematic)
# if [ -f /etc/bash_completion ]; then
# . /etc/bash_completion || true
# fi
# Reload zsh completion if available
if [ -d /usr/share/zsh/vendor-completions ]; then
# Zsh will automatically pick up completions from this directory
log "Zsh completions installed"
fi
}
# Function to check dependencies
check_dependencies() {
log "Checking dependencies..."
# Check if apt-ostreed is installed and running
if ! dpkg -l apt-ostreed >/dev/null 2>&1; then
log "Warning: apt-ostreed package not found. Some features may not work."
fi
# Check if ostree is available
if ! command -v ostree >/dev/null 2>&1; then
log "Warning: ostree command not found. Please install ostree package."
fi
# Check if systemd is available
if ! command -v systemctl >/dev/null 2>&1; then
log "Warning: systemd not available. Some features may not work."
fi
}
# Main execution
case "$1" in
configure)
log "Configuring apt-ostree package..."
setup_completions
check_dependencies
log "Configuration completed successfully"
;;
abort-upgrade|abort-remove|abort-deconfigure)
# Do nothing on abort
;;
*)
log "Unknown action: $1"
exit 1
;;
esac
exit 0