Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deleted-packages check #2880

Open
nekopsykose opened this issue Sep 7, 2024 · 0 comments
Open

deleted-packages check #2880

nekopsykose opened this issue Sep 7, 2024 · 0 comments

Comments

@nekopsykose
Copy link
Contributor

perhaps something like

  • main/base-removed-packages (always pulled)
  • trigger on /usr/share/deleted-packages/*
  • when something like contrib/foo gets removed, add a /usr/share/deleted-packages/foo in base-removed-packages that contains foo and every subpackage name (just in case)
  • the trigger runs at the end of an upgrade, and reads every line from the new triggered file (only the new removal), then matches them against /etc/apk/world
  • for anything found (non-substring, whole package name matches), just print a warning:

WARNING: package `foo` is in /etc/apk/world but was removed from the repositories (dead package)
WARNING: package `foo-devel`....

the caveat is that virtuals in world wouldn't be caught (though given how infrequently this runs one could also scan through installeddb for virtuals..)

the main reason for this is that currently, anything explicitly removed from the repos sticks around in a world forever, and there are no warnings or anything and eventually people wonder why something is broken when they're 999 held updates behind due to transitive deps. the other way to detect something like this is apk list -O, but there's no good way to automatically run that for someone

or maybe this whole idea should be some sort of apk feature where it does it for you, just writing down a random thought though

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

No branches or pull requests

1 participant