|Summary:||net-misc/dhcpcd-5.6.2: some elog messages should only be shown right after the relevant use flag is enabled.|
|Component:||[OLD] Core system||Assignee:||William Hubbs <williamh>|
|Package list:||Runtime testing required:||---|
|Bug Depends on:|
Description poletti.marco 2012-10-31 10:47:53 UTC
Comment 1 William Hubbs 2012-11-01 20:58:48 UTC
(In reply to comment #0) > Such messages should only be displayed when the package is a new install, or > when the relevant USE flag is not enabled in the current installed version. > These situations can be checked in the ebuild as follows: > > if use zeroconf && ! has_version 'net-misc/dhcpcd[zeroconf]'; then This condition will not work in pkg_postinst in this form, because by the time pkg_postinst is running, the has_version portion will always be true. What I would have to do is set a flag in pkg_preinst if the currently installed version has zeroconf turned on, then use that flag in place of the has_version portion of the test you suggest in pkg_postinst.
Comment 2 poletti.marco 2012-11-01 21:01:05 UTC
Yes, it makes sense. I'll add this hint to the tracker.
Comment 3 William Hubbs 2012-11-01 21:20:26 UTC
Created attachment 328000 [details, diff] zeroconf.patch Here is an example of what would need to be done in this case. What are your thoughts? Is it worth adding the pkg_preinst phase just to set a flag for this?
Comment 4 poletti.marco 2012-11-01 21:27:02 UTC
I don't think I should be the one to decide this. I don't have much experience with portage, nor with how the portage tree is administered. Also, you are the package maintainer. So my opinion is not well-informed and does not really matter. Please do what you think it's right. If that means not changing the current ebuild to keep it simple and ease future maintenance, feel free to close this bug.
Comment 5 William Hubbs 2013-06-04 19:49:40 UTC
As far as I can tell this is taken care of as well as it can be with dhcpcd-5.99.7. If you disagree, feel free to reopen.