-
Notifications
You must be signed in to change notification settings - Fork 462
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::pin ignores order parameter #1093
Comments
I've just noticed the same issue as well. Seems like an easy enough fix, however it will likely be a breaking change since it would update all existing .prefs files with a new prefix. I will see if I can draft a PR |
I've been looking into this but not sure what the best practice is for naming of APT preferences. Documentation explicitly states
So the ordering of files makes sense to ensure preferences are evaluated correctly. However, the numbered prefex is not mandatory and I know of at least one example where a vendor (Ubuntu) is not using them.
If we force the use of the order/priority parameter and prefix all managed .prefs files, we would essentially make all managed resources lower priority to vendor configs which don't follow that naming scheme. In this case, it might be best if we leave the apt::pin type as-is and just use the resource title to create the needed priorities. |
If this is agreed as the best option, we could do a bit of cleanup on the |
Describe the Bug
The
order
parameter to theapt::pin
resource is ignored and has no effect.Expected Behavior
Given the following:
I'd expect the files
10bravo.pref
and20alpha.pref
to be created in /etc/apt/preferences.d so that bravo takes priority over alpha when read by apt..Steps to Reproduce
Given code like the above, observe that the order property is ignored, and the created files are called
alpha.pref
andbravo.pref
.Environment
Additional Context
I think this stems from these lines in setting.pp that ignores the priority value for "list" and "pref" type settings.
The text was updated successfully, but these errors were encountered: