Skip to content

fix: filter held snaps from update available list (#1983)#2061

Open
gauravsaini wants to merge 1 commit intoubuntu:mainfrom
gauravsaini:fix/held-snaps-update-list-1983
Open

fix: filter held snaps from update available list (#1983)#2061
gauravsaini wants to merge 1 commit intoubuntu:mainfrom
gauravsaini:fix/held-snaps-update-list-1983

Conversation

@gauravsaini
Copy link
Copy Markdown

Summary

Problem

When a snap's updates are manually held (via snap refresh snapName --hold), the snap still appeared in the App Center's "Updates available" list. This is confusing because the user explicitly held the update.

Fix

Added a filter in fetchRefreshableSnaps() to exclude snaps where snap.hold is set and in the future. The hold field on the Snap class indicates when updates are held until, so we check if hold is null or has passed.

Testing

  1. Run snap refresh --hold <snap-name>
  2. Open App Center → Manage
  3. The held snap should no longer appear in the updates list

Snaps that have been held via 'snap refresh --hold' should not
appear in the updates available list. Added check for snap.hold
field to filter out snaps with active hold.
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.

A update shows in update availables even the snap is been held manually.

1 participant