ebuild.update is not capable to detect USE changes
With "ebuild.update" could happened for use flags to change without find_changes detecting it. find_changes only looks to dicts given by list_pkgs, which only contain version info.
To solve this problem I could let ebuild.list_pkgs add to the "version" some "extra info" (i.e. use flags), but doing this for every package installed would be a HUGE work which would take a lot of time.
What should i do? Should I parse emerge output?
I'm not familiar with USE flags -- what are they used for?
USE flags are used to select configuration options (the options for the './configure' script which generate the Makefile) system wide or on a per package basis. Could happen for the USE flags to change without a version update. Of course, in this case, a rebuild is needed for the change to take affect and the "emerge" command in "ebuild.update" takes care of this. But find_changes is not able to notice this.
Please note that this problem is also present in "ebuild.upgrade"
As an example, if you wanted vim with python support compiled you'd set the python use flag.
Ooohhh... The days that I had time to watch my system compile from the ground up... :)
Pedro Algarvio @ phone
----- Reply message ----- De: "faust" [email protected] Para: "saltstack/salt" [email protected] Assunto: [salt] ebuild.update is not capable to detect USE changes (#5782) Data: sex, Jun 28, 2013 07:45 USE flags are used to select configuration options (the options for the './configure' script which generate the Makefile) system wide or on a per package basis.
Could happen for the USE flags to change without a version update. Of course, in this case, a rebuild is needed for the change to take affect and the "emerge" command in "ebuild.update" takes care of this. But find_changes is not able to notice this.
Please note that this problem is also present in "ebuild.upgrade"
— Reply to this email directly or view it on GitHub.
Ah, then I agree, we definitely should add logic to detect these. I'll let those more familiar with emerge figure out how to do it..... =P
This is a tricky bit here. I note you pass '--newuse' in several functions, like _get_upgradable(), update(), and upgrade(). So new use flags should get picked up. However, I see that when I call highstate after making changes to a package.use entry the change is not noticed. I'll look into this a bit more, as time allows.
I understand the issue regarding parsing emerge output, seems nasty and slow. It might be possible to use portage.package.ebuild._config.UseManager in this case, although I have not tried myself. It would seem possible to use the portage api directly to ease some of the burden. In fact, it might be best to use the portage api directly for anything involving gentoo package management since much of the hard work has already been done in portage, but that would require some large refactor which may not be easy to manage at this time. That said, I would be interested in collaborating on that and can consult with fellow gentoo devs more intimate than I with the portage api where necessary.
I only wish I had learned about saltstack earlier as I could have easily proposed some work for GSoC this year, and mentored the student(s). Maybe next year.
faust, since you seems to kickin out the contrib in the salt+gentoo arena, maybe you could find me on freenode (basenick:quantumsummers) and we could try to sort through some of these issues. There is at least one other gentoo dev idling in #salt too. At any rate, I am vested in insuring first-class gentoo support in saltstack.
I only wish I had learned about saltstack earlier as I could have easily proposed some work for GSoC this year, and mentored the student(s). Maybe next year.
I wish too... I was looking for salt con GSoC page this year.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.