Name libappindicator and zim-tools, not the names they provide
libappindicator-gtk3 and zimwriterfs aren't packages any more; they installed only because libappindicator and zim-tools provide them. But hampackremove couldn't match those names with what's installed, so it never removed them. zim-tools was already listed, so zimwriterfs goes. Updates rename the old names in the record of installed packages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
8023b04024
commit
bc536407c4
@@ -23,6 +23,14 @@ step() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Rename a package in HamPack's record of packages it installed
|
||||
rename_recorded_package() {
|
||||
local list="$HAMPACK_STATE/installed-packages"
|
||||
grep -qxF "$1" "$list" 2> /dev/null || return 0
|
||||
grep -vxF "$1" "$list" > "$list.tmp"
|
||||
mv -f "$list.tmp" "$list" && record_installed installed-packages "$2"
|
||||
}
|
||||
|
||||
remove_stale_files() {
|
||||
# The HamPack GUI app (a Go program) was removed, along with its source and build hook
|
||||
rm -f "$HOME/.local/bin/hampack"
|
||||
@@ -40,6 +48,11 @@ remove_stale_files() {
|
||||
# Versions recorded under app names HamPack no longer uses
|
||||
forget_version Kiwix-Desktop
|
||||
forget_version Kiwix-Tools
|
||||
# Packages recorded under names only provided by another package, which
|
||||
# hampackremove can't match with what's installed. zim-tools provides
|
||||
# zimwriterfs, and was recorded with it
|
||||
rename_recorded_package libappindicator-gtk3 libappindicator
|
||||
rename_recorded_package zimwriterfs zim-tools
|
||||
# Build directories from before builds used a private temporary directory
|
||||
rm -rf /tmp/hampack-build /tmp/windowsapps 2> /dev/null
|
||||
# The passwordless sudoers file the old installer used, if a killed install left it behind
|
||||
|
||||
Reference in New Issue
Block a user