-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Handle dnf immutable mutable datatypes #46176
Conversation
79edc96
to
7e08837
Compare
+1 to this. |
In DNF < 3.0 are lists, and modifying them works In DNF >= 3.0 < 3.6 are lists, but modifying them doesn't work In DNF >= 3.6 have been turned into tuples, to communicate that modifying them doesn't work Further explanation of this is available via Adam Williamson from the Fedora QA Team. https://www.happyassassin.net/2018/06/27/adams-debugging-adventures-the-immutable-mutable-object/ Signed-off-by: Adam Miller <admiller@redhat.com>
7e08837
to
70025e7
Compare
rebuild_merge |
well, I have a bit more for you.
(yes, this is crazy). For any DNF since that change, you can actually just do this:
and that will do what you want, assuming
Haven't tested it with a DNF older than 2.7.5, though. En passant, this seems kinda like a suboptimal way to offer this setting? From the DNF command line you could disable excludes for multiple repos, I think, because it combines when you pass the same arg multiple times:
and I think that'd wind up setting the base object's |
|
@AdamWill we still test dnf all the way back to Fedora 24 so I'm alright leaving it with the case that works for all known versions even if it is slightly less elegant. I really appreciate all the information you've shared, it's been valuable beyond words. 👍 |
Well, just using the Stay tuned, though, as more fun is coming... |
@AdamWill oh fair point on the duplication, I'll make a new PR to update. |
I may try and talk 'em into throwing out the whole duplication mess upstream, too. It's really awful. I think any fix would unfortunately have to lose compatibility, though :/ |
Signed-off-by: Adam Miller admiller@redhat.com
SUMMARY
In DNF < 3.0 are lists, and modifying them works
In DNF >= 3.0 < 3.6 are lists, but modifying them doesn't work
In DNF >= 3.6 have been turned into tuples, to communicate that
modifying them doesn't work
Further explanation of this is available via Adam Williamson (@AdamWill) from the Fedora QA Team.
https://www.happyassassin.net/2018/06/27/adams-debugging-adventures-the-immutable-mutable-object/
ISSUE TYPE
COMPONENT NAME
dnf
ANSIBLE VERSION