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
+1
-2
@@ -19,7 +19,7 @@ UTILITIES=(
|
||||
hamlib
|
||||
jdk-openjdk
|
||||
jq # patch-potacat.sh
|
||||
libappindicator-gtk3
|
||||
libappindicator
|
||||
libkiwix
|
||||
libtorrent-rasterbar
|
||||
libnotify
|
||||
@@ -48,7 +48,6 @@ UTILITIES=(
|
||||
xdg-utils
|
||||
xdotool
|
||||
zim-tools
|
||||
zimwriterfs
|
||||
)
|
||||
|
||||
# Ham applications
|
||||
|
||||
@@ -65,9 +65,12 @@ setup() {
|
||||
@test "update removes stale state from older HamPack versions" {
|
||||
mkdir -p "$HAMPACK_STATE"
|
||||
printf 'Kiwix-Desktop=2.75.1\nkiwix-desktop=2.5.1\nKiwix-Tools=3.8.2\n' > "$HAMPACK_STATE/.installed_versions"
|
||||
mark_installed $(all_hampack_packages)
|
||||
printf 'fldigi\nlibappindicator-gtk3\nzim-tools\nzimwriterfs\n' > "$HAMPACK_STATE/installed-packages"
|
||||
touch "$HOME/.local/bin/hampackupdate"
|
||||
run bash "$REPO/update.sh"
|
||||
[ "$(cat "$HAMPACK_STATE/.installed_versions")" = "kiwix-desktop=2.5.1" ]
|
||||
[ "$(cat "$HAMPACK_STATE/installed-packages")" = "$(printf 'fldigi\nlibappindicator\nzim-tools')" ]
|
||||
[ ! -e "$HOME/.local/bin/hampackupdate" ]
|
||||
grep -qx "sudo rm -f /etc/sudoers.d/hampack" "$STUB_LOG"
|
||||
}
|
||||
|
||||
@@ -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