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

Adds status property to dpkg parsed packages #1799

Merged
merged 1 commit into from
Jun 7, 2023

Conversation

fretb
Copy link
Contributor

@fretb fretb commented May 31, 2023

dpkg-query displays information about all packages on the system, meaning that removed (non-purged) packages that leave config-files are also in this list.

This makes it hard to identify actually installed
packages. By adding the db:Status-Status field to our package info hash, we have a lot more flexibility.

Slack discussion about this:
https://chefcommunity.slack.com/archives/C55FCUGBS/p1685438915205339.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • I have run the pre-merge tests locally and they pass.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • All commits have been signed-off for the Developer Certificate of Origin.

dpkg-query displays information about all packages on the system,
meaning that removed (non-purged) packages that leave config-files are
also in this list.

This makes it hard to identify actually installed
packages. By adding the `db:Status-Status` field to our package
info hash, we have a lot more flexibility.

Slack discussion about this:
https://chefcommunity.slack.com/archives/C55FCUGBS/p1685438915205339.

Signed-off-by: Frederik Thuysbaert <frederik.thuysbaert@combell.group>
@fretb fretb requested review from a team as code owners May 31, 2023 07:13
@sonarcloud
Copy link

sonarcloud bot commented May 31, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
66.7% 66.7% Duplication

@Tensibai
Copy link

Tensibai commented Jun 2, 2023

I kinda disagree with the non-breaking change, it does change what's reported (due to dpkg query change) so it should have a kinf of warning aroung the distro/dpkg version bringing the change and a proper Changelog entry IMHO.

Main question is: I wonder what happen for old 18.04 ubuntu without this dpkg-query update or if it is not relevant as 18.04 always had this behavior anyway.

Misread the changes, it is totally backward compatible, sounds good to me.

Copy link
Collaborator

@jaymzh jaymzh left a comment

Choose a reason for hiding this comment

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

Nicely done. Thanks for doing this and the tests.

I'm approving, and I'll give throw it in the queue for anyone else to give any feedback or otherwise merge at the Monday meeting (I won't be there, still out of town), but in case they don't get to it, ping me and I'll merge it myself.

@tpowell-progress tpowell-progress self-assigned this Jun 6, 2023
@tpowell-progress tpowell-progress merged commit cc9e707 into chef:main Jun 7, 2023
@fretb fretb deleted the feature/dpkg-package-status branch June 7, 2023 20:16
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.

4 participants