-
Notifications
You must be signed in to change notification settings - Fork 2.2k
(PUP-10597) Remove deprecated held #8267
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
(PUP-10597) Remove deprecated held #8267
Conversation
|
CLA signed by all contributors. |
7f0f0b4 to
9adf282
Compare
|
@Dorin-Pleava we should entirely remove "held" from ensure values, as it was replaced by apt mark: #7802 |
79b917c to
7bce804
Compare
|
Jenkins please test this on debian8-64,debian9-64,debian10-64 |
|
Jenkins please test this on debian10-64a,debian8-64a,debian8-32a,debian9-64a,debian9-32a |
|
Jenkins please test this on debian9-64,debian10-64 |
| @@ -1,4 +1,4 @@ | |||
| test_name "dpkg ensure held package is latest installed" do | |||
| test_name "dpkg ensure hold package is latest installed" do | |||
| confine :to, :platform => /debian-8-amd64/ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please update this to debian-9 as debian-8 was dropped in puppet-agent main
| @@ -1,4 +1,4 @@ | |||
| test_name "dpkg ensure held package should preserve version if package is already installed" do | |||
| test_name "dpkg ensure hold package should preserve version if package is already installed" do | |||
| confine :to, :platform => /debian-8-amd64/ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please update this to debian-9 as debian-8 was dropped in puppet-agent main
7bce804 to
ee97ee7
Compare
| def deprecated_hold | ||
| def hold | ||
| if package_not_installed? | ||
| self.install | ||
| end | ||
| hold | ||
| end | ||
|
|
||
| def hold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we still need to call self.install in this step, as it may run the install twice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, it seems it installs the package without doing the self.install here.
I think package_not _installed? method can also be removed as I only found it being used here.
|
I believe this works okay, but while testing I found a behavior that's not idempotent (also happens without changes from this PR). The following will always report changes on Debian 10: package { 'mc':
ensure => present,
mark => none,
}/cc @ciprianbadescu |
As provider.hold does not install packages, method package_not_installed? is no longer needed. Also removed package_not_installed? tests and tests that expect provider.hold to call provider.install
Should be solved with bellow change: |
|
CLA signed by all contributors. |
64544ca to
5a55bbb
Compare
No description provided.