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

Properly handle held packages on dpkg-flavored OS #2087

Merged
merged 2 commits into from
Aug 18, 2017
Merged

Conversation

adamleff
Copy link
Contributor

@adamleff adamleff commented Aug 17, 2017

InSpec was looking at the wrong field in dpkg -s output to determine whether a package was installed or not. An installed, held package was incorrectly reported as uninstalled.

A be_held matcher has been added as well.

Fixes #2006

kisoku and others added 2 commits August 17, 2017 13:51
Signed-off-by: Mathieu Sauve-Frankel <msf@kisoku.net>
InSpec was looking at the wrong field in `dpkg -s` output to determine
whether a package was installed or not. An installed, held package was
incorrectly reported as uninstalled.

This adds the proper unit tests and also adds a `be_held` matcher.

Thanks to @kisoku for the initial work in #2007.

Signed-off-by: Adam Leff <adam@leff.co>
@adamleff adamleff added the Type: Bug Feature not working as expected label Aug 17, 2017
@adamleff adamleff requested a review from a team August 17, 2017 17:55
Copy link
Contributor

@arlimus arlimus left a comment

Choose a reason for hiding this comment

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

Sweet catch and improvement, Thank you @adamleff !!

@arlimus arlimus merged commit 367d42f into master Aug 18, 2017
@arlimus arlimus deleted the adamleff/adopt-2007 branch August 18, 2017 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Feature not working as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants