Disclaimer: this bug has been filed in a semi-automated manner. When emerging the package net-misc/dhcpcd-5.6.2, the following elog messages are displayed: * Messages for package net-misc/dhcpcd-5.6.2 * You have installed dhcpcd with zeroconf support. * This means that it will always obtain an IP address even if no * DHCP server can be contacted, which will break any existing * failover support you may have configured in your net configuration. * This behaviour can be controlled with the -L flag. * See the dhcpcd man page for more details. 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 See the tracker bug 440214 for more details.
(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.
Yes, it makes sense. I'll add this hint to the tracker.
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?
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.
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.