Repository navigation
fix: allow installing updates from local deb files - #2217
Conversation
|
@skdas20 Could you please share a screenshot how it looks with the changed logic? |
|
@ogres Thanks for checking. These are headless Flutter renders of the actual Installed 0.9, local 1.0:
You're right about older files. I used equality to answer whether the exact version in the local file is already installed. That unblocks the update case, but also enables a different older version, so the current change is broader than an upgrade-only fix. The existing installation and confirmation flow remains in place, but I haven't added a separate downgrade policy. If the intended behavior is to allow only upgrades, I can narrow the change using Debian version ordering and add a regression for the older-file case; a plain string comparison would not be sufficient. Same-version, older-file and confirmation screenshotsInstalled 1.0, local 1.0: Installed remains disabled. Installed 1.1, local 1.0: Install is also enabled with the current patch. The existing confirmation dialog after clicking Install: The screenshot fixture and the existing local-deb page tests pass (8 tests). Installed versions above are fixture inputs; the version displayed on the page is the local file's version. Capture details and harness. |
|
@skdas20 I think we need to give some kind of information to user that this package is already installed with version XYZ, so that they can understand it - otherwise, there is no way to know whether you have already installed a given package. |
|
Added Updated screenshots (headless Flutter widget renders using mocked PackageKit metadata): Local 1.0, installed 0.9: Local 1.0, installed 1.0: Local 1.0, installed 1.1: The full test suite, analysis, and formatting checks pass. Regression tests cover updates, downgrades, the identical version, and available-only metadata. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The package lookup can return an available entry instead of the installed package, producing an incorrect installation state.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Enables installing a local Debian package when its version differs from the installed version.
Changes:
- Compares installed and local package versions.
- Displays the installed version.
- Adds widget regression coverage for upgrades, downgrades, and available packages.
| File | Description |
|---|---|
local_deb_model.dart |
Derives installed version and installation state. |
local_deb_page.dart |
Displays the installed version. |
app_en.arb |
Adds the localized version label. |
local_deb_page_test.dart |
Tests local package installation behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@skdas20 Changes look good, but let's resolve the possible timing issue as reported above. Thanks! |
|
Hi @skdas20 , do you need help with this PR? |
|
Hi @ogres, thanks for checking in, and sorry for the delay. I'll fix the timing issue by resolving the package with |
|
@skdas20 Nothing to be sorry about, thanks for the contribution. Ping me if you need any help |
|
Thanks — I pushed the follow-up in f4bf1bf. The local-deb lookup now resolves only installed packages, so a later available result cannot replace the installed version. I added a service-level regression test that emits an installed result followed by a newer available result, and a page-level assertion that the lookup requests installed results only. |
|
Nice, you already have an ETA for a deployment in 26.04 ? Thanks 🙏 |









Opening a local
.debcurrently disables installation whenever a package with the same name is installed, even when the installed version differs from the file. For example, an installed 0.9 package makes a local 1.0 package appear already installed.Require the installed package version to match the local file version before reporting
isInstalled. A differing version keeps the existing installation and confirmation flow available. PackageKit remains responsible for validating the requested installation; this does not attempt to sort Debian version strings.Fixes #2190.
Validation with the pinned Flutter 3.44.9 SDK:
installLocalreceives the file path.melos test: 371 app tests and 6 ratings-client tests passed.melos analyze --fatal-infos,melos format:excludeandgit diff --checkpassed.AI-assisted implementation and test execution.