Skip to content

Build beta 2026.08.14.1: repair uninstall so reinstall works - #56

Merged
chodeus merged 4 commits into
betafrom
fix/plg-uninstall-package-name
Aug 14, 2026
Merged

Build beta 2026.08.14.1: repair uninstall so reinstall works#56
chodeus merged 4 commits into
betafrom
fix/plg-uninstall-package-name

Conversation

@chodeus

@chodeus chodeus commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Uninstall left the package entry behind, breaking every reinstall

Reported on the forums: uninstalling FolderView3 prints

No such package: folder.view3-2026.08.01.  Can't remove.

and the following reinstall then prints

| Skipping package folder.view3-2026.08.01-x86_64-1 (already installed) |

leaving the plugin installed-but-dead — plugin-manager reports success, but no files are on disk.

Root cause

2026.07.07.1 (f61dac6) standardised the package name to folder.view3-<version>-x86_64-1.txz and updated the pre-install, install and post-install blocks to match. The remove block was missed and still ran:

removepkg folder.view3-<version>          # installed entry is folder.view3-<version>-x86_64-1

removepkg matches /var/log/packages/<name> exactly, so it aborted — but the block has no set -e, so the next two lines still ran:

rm -rf /usr/local/emhttp/plugins/folder.view3
rm -rf /boot/config/plugins/folder.view3

Net result: the files were deleted, the package DB entry survived. On reinstall, upgradepkg --install-new saw an identically-named installed package and skipped extraction entirely.

Fix

Remove block — glob the DB entry instead of reconstructing its name, so it is version-agnostic and self-corrects after any future drift:

for p in /var/log/packages/folder.view3-*; do
    [ -e "$p" ] || continue
    removepkg "$(basename "$p")"
done

Installupgradepkg --install-newupgradepkg --install-new --reinstall, so a stale entry can never suppress extraction again, and reinstalling the same version actually reinstalls.

Both patterns match Community Applications' own .plg, which uses upgradepkg --install-new --reinstall and removepkg &name;-&version;-x86_64-1.

Removing the bug class, not just the bug — the package name was reconstructed by hand at four sites, and this outage was one of those four drifting when 2026.07.07.1 swept the other three. It now has a single definition:

<!ENTITY pkgname "&name;-&version;-x86_64-1">

referenced by the pre-install prune, the install FILE/URL, and the post-install keep-check. The remove block needs no version at all and stays glob-based. Grepping the shortest distinguishing token (x86_64) now returns only the declaration and one comment; &name;-&version; appears only inside the declaration itself. No site reconstructs the name any more, so this specific drift is no longer expressible.

No rebuild was needed — the .plg ships separately from the .txz and is not inside it (verified: 0 .plg files in the package), so the built package and its MD5 are untouched.

Verification

Loop logic exercised under bash (the .plg interpreter) across five cases:

Case Result
Normal install, current version present removes the right entry
Version drift (.plg newer than installed) still removes the installed one
Nothing installed clean no-op
folder.view / folder.view2 also installed not matched — siblings safe
Stale + current entry both present removes both

The &pkgname; refactor was verified by resolving the entities (xmllint --noent) on the before and after .plg and diffing what Unraid actually executes. FILE Name and URL come out byte-identical; the only two deltas are tightenings, both over sets already prefixed folder.view3-:

Site Before After
pre-install prune grep -v '2026.08.14.1-x86_64-1' grep -v 'folder.view3-2026.08.14.1-x86_64-1'
post-install keep case … in *2026.08.14.1-x86_64-1) case … in folder.view3-2026.08.14.1-x86_64-1)

Because pkg_build.sh rewrites this file, every dependent was executed rather than assumed: the version and MD5 seds touch only their own lines (pkgname is untouched), the version/MD5 read-backs and CI's two grep -oP extractions each still return exactly one value, and the branch-rewrite seds still produce a correct, well-formed .plg — resolving to the right archive URL for both a main and a beta build, idempotently.

Also: xmllint clean, .plg MD5 matches the built package, package contains all 75 plugin files and both bundled beta fixes.

Recovery for users already stuck

Installing this beta is enough — the package name differs from the orphaned folder.view3-2026.08.01-x86_64-1 entry, so upgradepkg treats it as an upgrade and extracts normally, and post-install prunes the stale entry. No terminal step needed.

Users who want to stay on stable can clear it manually first:

for p in /var/log/packages/folder.view3-*; do removepkg "$(basename "$p")"; done

then reinstall from Community Applications. Note that Unraid's UI has no force-reinstall that gets past this — the skip happens inside upgradepkg, below the plugin manager.

Also bundled in this build

The two fixes already sitting on beta but not yet in a package, now with changelog entries:

Merging — safe as titled

This PR already contains the built package (folder.view3-2026.08.14.1-x86_64-1.txz) and the matching .plg version/MD5 bump, so a second CI build would be wasteful and would desync the .plg version from the ###2026.08.14.1 CHANGES heading.

release-dispatch.yml fires release-beta.yml on any push to beta whose head commit matches ^(feat|fix)(\(...\))?!?:. The PR title is deliberately not in that form, so every merge strategy is safe:

Merge strategy Resulting head subject Dispatches?
Squash Build beta 2026.08.14.1: … (#56) no
Merge commit Merge pull request #56 from … no
Rebase refactor: centralise the package name … no

Don't retitle it back to fix: — that reintroduces the double build.

Note (not changed here)

The remove block also does rm -rf /boot/config/plugins/folder.view3, which wipes all folder definitions, custom CSS, themes and settings on uninstall. Combined with this bug, anyone who tried uninstall→reinstall as a repair lost their entire configuration. Worth deciding separately whether uninstall should preserve the flash config.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed stale package entries remaining after plugin removal.
    • Improved restoration of folder view settings from backups.
    • Corrected Docker autostart ordering for containers assigned by label.
  • Chores
    • Updated the plugin package release and checksum.
    • Improved package cleanup, installation, downloads, and retention of installed packages.

The remove block ran `removepkg folder.view3-<version>`, but since
2026.07.07.1 the package is named folder.view3-<version>-x86_64-1.
removepkg aborted with "No such package ... Can't remove" while the
following rm -rf lines still deleted the plugin dir and the flash
config, leaving an orphaned /var/log/packages entry behind.

upgradepkg --install-new then reported "Skipping package ... (already
installed)" on the next install of that same version, so the files were
never extracted and the plugin came back dead while plugin-manager
reported success.

Remove now globs /var/log/packages/folder.view3-* and removepkg's each
basename, so it is version-agnostic and self-corrects after any future
drift; folder.view and folder.view2 do not match the glob. Install
gained --reinstall so a stale entry can never suppress extraction
again. Both patterns match Community Applications' own .plg.
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3169a6a5-fafb-402e-9b9e-ad488881db75

📥 Commits

Reviewing files that changed from the base of the PR and between 98db195 and 6285271.

⛔ Files ignored due to path filters (2)
  • CHANGELOG-fixes.md is excluded by !CHANGELOG-fixes.md
  • archive/folder.view3-2026.08.14.1-x86_64-1.txz is excluded by !archive/**, !**/*.txz
📒 Files selected for processing (1)
  • folder.view3.plg

📝 Walkthrough

Walkthrough

The plugin release updates metadata and release notes. Package operations now use the computed package name. Uninstallation removes all installed package entries that match the plugin name.

Changes

Plugin package lifecycle

Layer / File(s) Summary
Computed package identity and cleanup
folder.view3.plg
The plugin metadata changes to version 2026.08.14.1 with updated checksum and package identifier. Package cleanup, installation, retention, and uninstallation use the computed package name. Uninstallation removes all matching installed package entries.

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: ⚪ Minimal · up to 62852

This localized package-installation and uninstall fix is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the beta build and the main change: repairing uninstall behavior so reinstall works.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/plg-uninstall-package-name

Comment @coderabbitai help to get the list of available commands.

The name folder.view3-<version>-x86_64-1 was reconstructed by hand at
four sites, and this outage was one of those four drifting when
2026.07.07.1 swept the other three. Fixing the remove block fixes the
instance; this removes the class.

&pkgname; is now the single definition, referenced by the pre-install
prune, the install FILE/URL and the post-install keep-check. The remove
block needs no version at all and stays glob-based.

Resolved output (xmllint --noent) is byte-identical for FILE Name and
URL. The two deltas are tightenings: the pre-install grep and the
post-install case now match the full package name instead of a version
substring, both over sets already prefixed folder.view3-.

No rebuild: the .plg ships separately and is not inside the .txz, so
the existing package and its MD5 are unchanged.
@chodeus chodeus changed the title fix: uninstall leaves the package entry behind, breaking reinstall Build beta 2026.08.14.1: repair uninstall so reinstall works Aug 14, 2026
@chodeus

chodeus commented Aug 14, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@chodeus

chodeus commented Aug 14, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@chodeus
chodeus merged commit bb904e1 into beta Aug 14, 2026
2 checks passed
@chodeus
chodeus deleted the fix/plg-uninstall-package-name branch August 14, 2026 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant