Skip to content

fix: fix is_in_apt function for virtual packages #41

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

Merged
merged 1 commit into from
Jun 16, 2025

Conversation

meteyou
Copy link
Contributor

@meteyou meteyou commented Jun 8, 2025

This PR fix the is_in_apt function for virtual packages. For example policykit-1 doesn't exist anymore in Debian Trixie and the output of apt-cache policy policykit-1 is:

policykit-1:
  Installed: (none)
  Candidate: (none)
  Version table:

This output creates a false positive with the old is_in_apt like here: https://github.com/meteyou/MainsailOS-dev/actions/runs/15515686418/job/43682280429#step:13:195

Here is a test run with the new is_in_apt: https://github.com/meteyou/MainsailOS-dev/actions/runs/15516654843/job/43684788202#step:13:206

An alternative version would be to parse the Candidate output if it is != (none)

@foosel foosel merged commit 0b23db1 into OctoPrint:main Jun 16, 2025
1 check passed
@foosel
Copy link
Member

foosel commented Jun 16, 2025

Frankly, that solution of yours also strikes me as the cleaner way to get this info 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants