Skip to content

Install specific Scoop versions and update pinned installs - #5619

Merged
Gabriel Dufresne (GabrielDuf) merged 2 commits into
mainfrom
fix/scoop-install-specific-version
Oct 28, 2026
Merged

Gabriel Dufresne (GabrielDuf) merged 2 commits into
mainfrom
fix/scoop-install-specific-version

Conversation

@GabrielDuf

@GabrielDuf Gabriel Dufresne (GabrielDuf) commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Scoop has long supported scoop install bucket/app@version, and since v0.6.0 it resolves the exact old manifest from the bucket's git history. UniGetUI never exposed it, and the README chart marked Scoop as not supporting version choice at all.

Typed version field. Scoop can't list the versions it can install, so the version dropdown had nothing to offer. A new CanListVersions capability separates "can install a chosen version" from "can list versions". When it is false:

  • the install options dialog, the terminal UI and the catalog editor's Pin version dialog show a text field instead of a list;
  • GetVersions returns nothing instead of asking the manager.

A typed version still goes through the shell-safety check that every version on a shell-interpreted manager gets, so 1.7.1;calc is refused.

Pinned installs. A Scoop app installed with @version leaves Scoop's normal tracking: scoop list reports its source as <auto-generated>, scoop status never reports it as outdated, and a plain scoop update keeps the pinned version. That already broke apps pinned from the command line. UniGetUI built the spec <auto-generated>/app, which the package-spec check refuses, so uninstalling them or loading their details failed.

Pinned apps now:

  • are matched to the bucket Scoop itself would pick (known buckets first, then alphabetical) by reading the bucket manifests on disk, and are listed under that bucket;
  • are offered an update when that bucket has a newer version;
  • update with scoop update bucket/app --force, which on Scoop v0.6.0+ moves a pinned app back to the bucket's latest version.

Older Scoop would only reinstall the pinned version, so pinned updates are offered only when scoop --version reports v0.6.0 or later. On older Scoop, pinned apps behave as before, except that uninstall now works.

README chart. In the "Choose version to install" row, Scoop goes from ❌ to ⚠️ and Cargo from ❌ to ✅. Scoop gets ⚠️ because a version that isn't in the bucket's git history can't be resolved. Cargo has supported custom versions in UniGetUI all along.

Testing

  • Checked against real Scoop 0.6.0: a pinned jq@1.7.1 install, how scoop list and scoop status report it, and scoop update -f main/jq bringing it back to 1.8.2.
  • Unit tests for the @version spec, the refused unsafe version, bucket resolution (including bucket order on disk under a fake SCOOP folder), --force, the v0.6.0 check, and not offering a downgrade.
  • A new terminal-UI end-to-end test types a version and installs it; the fake Scoop now behaves like the real one.
  • Full terminal-UI and package-engine suites pass, and both dotnet format checks are clean.
  • Tested by hand in the running app.

Not covered

  • "Download installer" for a pinned app still downloads the bucket's latest version.
  • The bucket lookup uses the SCOOP environment variable or ~/scoop, not a custom root_path in Scoop's config file, like the existing install-location lookup.
  • The NativeAOT publish and macOS/Linux builds weren't run.

Closes #5615

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Saved install-version pins can cause updates to report the old installed version, while pinned-update detection can expose held apps to updates and miss pinned installs present in both user and global scopes.

3 open issues
What changed in this PR

Adds specific-version installation for Scoop across UniGetUI’s desktop, terminal, and catalog interfaces, and restores update handling for pinned installs. It also corrects the feature chart highlighted in #5615.

Changes:

  • Separates version installation from version listing, enabling typed version fields.
  • Resolves pinned Scoop apps to buckets and offers forced updates on Scoop 0.6.0+.
  • Adds regression coverage and corrects Scoop/Cargo version-support indicators.
File Description
src/​UniGetUI.Tui/​Views/​Dialogs/​InstallOptionsDialog.cs Adds typed version entry.
src/​UniGetUI.Tui/​FakeData/​FakePackageManager.cs Models typed-version capabilities.
src/​UniGetUI.Tui/​FakeData/​FakeCatalog.cs Enables version selection for fake Scoop.
src/​UniGetUI.Tui.Tests/​E2E/​PackagePagesE2ETests.cs Tests installation with a typed version.
src/​UniGetUI.PackageEngine.Tests/​ScoopManagerTests.cs Tests version specs, safety, bucket resolution, and pinned updates.
src/​UniGetUI.PackageEngine.PackageManagerClasses/​Manager/​Helpers/​BasePkgDetailsHelper.cs Skips unsupported version enumeration.
src/​UniGetUI.PackageEngine.Managers.Scoop/​Scoop.cs Resolves pinned installs and discovers eligible updates.
src/​UniGetUI.PackageEngine.Managers.Scoop/​Helpers/​ScoopPkgOperationHelper.cs Adds version suffixes and forced pinned updates.
src/​UniGetUI.PackageEngine.Managers.Scoop/​Helpers/​ScoopPkgDetailsHelper.cs Reuses package-spec handling for pinned apps.
src/​UniGetUI.PackageEngine.Enums/​ManagerCapabilities.cs Introduces CanListVersions.
src/​UniGetUI.Avalonia/​Views/​SoftwarePages/​CatalogEditorPage.cs Adds validated typed catalog pins.
src/​UniGetUI.Avalonia/​Views/​DialogPages/​InstallOptionsControl.axaml Displays the typed version field.
src/​UniGetUI.Avalonia/​ViewModels/​DialogPages/​InstallOptionsViewModel.cs Manages typed version state and options.
src/​Languages/​lang_en.json Adds the invalid-version message.
media/​supported-managers.svg Corrects Scoop and Cargo version support.

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The installed-inventory cache can retain stale bucket versions during concurrent startup scans, causing newly available pinned updates to be omitted after the index refresh.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Refresh bucket versions after updates before comparing cached pins

src/​UniGetUI.PackageEngine.Managers.Scoop/​Scoop.cs:421

Startup loads installed packages and updates concurrently, so the 15-second installed-inventory cache can retain bucket versions read before scoop update refreshes the manifests. This comparison can then omit a newly available pinned update from the completed scan. Keep the cached pin identity, but read the current bucket version during this update pass after the index refresh.

3 resolved since last review

Review effort: Balanced

@randy-but-a-ro randy-but-a-ro Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Pull request was approved automatically: the AI review is complete and all its review threads are resolved. 🎉

Integration Details
{
	"deliveryId": "52ed6ca0-d2d3-11f1-8f65-44ebd807b877",
	"headSha": "164f7837c671d12a9ad9904be3d96bf17bc48af8",
	"reviewer": "copilot-pull-request-reviewer[bot]"
}

@GabrielDuf
Gabriel Dufresne (GabrielDuf) merged commit fea4ca7 into main Oct 28, 2026
7 checks passed
@GabrielDuf
Gabriel Dufresne (GabrielDuf) deleted the fix/scoop-install-specific-version branch October 28, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[IMPROVEMENT] readme falsely claims scoop doesn't support installing specific versions

2 participants