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

apt::mark with setting => unhold is not idempotent #1166

Open
aboks opened this issue Feb 20, 2024 · 0 comments
Open

apt::mark with setting => unhold is not idempotent #1166

aboks opened this issue Feb 20, 2024 · 0 comments

Comments

@aboks
Copy link

aboks commented Feb 20, 2024

Describe the Bug

A resource declation like

apt::mark { 'foo':
  setting => unhold
}

is not idempotent and will execute on every Puppet run.

Expected Behavior

I would expect this resource to be idempotent, so that it can be used to ensure that a certain package is not held.

Steps to Reproduce

Add an apt::mark resource as above for an installed package that is not held, and observe Puppet executing it on every run.

Environment

  • Version 8.2.0 (but seems to be still present in main)
  • Platform Debian 11 & 12

Additional Context

It seems that the unless_cmd for unhold is just not configured:

$unless_cmd = undef

Something like ! (/usr/bin/apt-mark showhold ${title} | grep ${title} -q), or adding /usr/bin/apt-mark showhold ${title} | grep ${title} -q to onlyif, should probably work.

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

No branches or pull requests

2 participants