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

Bet way to 'hold' package version #15

Open
brosev opened this issue Sep 21, 2021 · 2 comments
Open

Bet way to 'hold' package version #15

brosev opened this issue Sep 21, 2021 · 2 comments

Comments

@brosev
Copy link

brosev commented Sep 21, 2021

I see that pinning is an option but there doesnt appear to be a parameter for specific version. What's the best way to make sure a package retains it's version?

Thanks!

@premar
Copy link

premar commented Feb 8, 2022

Would be interested, too. Because in the readme it says:
apt::hold: This define was removed. Simply use an apt::pin with priority => 1001 for the same functionality.

So I went with the following for my package:
apt::pin { 'hold-kubelet': packages => 'kubelet', version => '1.23.3-00', priority => 1001, }

But if I run apt-mark showhold on the server, nothing is shown. But after running apt-mark hold kubelet manually its working. Could somebody explain what I did wrong or is this a bug?

@premar
Copy link

premar commented Feb 12, 2022

Okay, did some research. I didn't know that pin exists.

So apparently you can do both ways to hold / pin the version of a package.

With hold, by using the mark keyword:
package { 'package_name': ensure => '1.0.0', mark => 'hold', }
Here apt-mark showhold yields that the package is on hold.

Or you go with the pin approach:
apt::pin { 'hold-package_name': packages => 'package_name', version => '1.0.0', priority => 1001, }

Personally I am using from now on the pin option, because this sound like the more robust way.

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

2 participants