Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 440410 - net-misc/dhcpcd-5.6.2: some elog messages should only be shown right after the relevant use flag is enabled.
Summary: net-misc/dhcpcd-5.6.2: some elog messages should only be shown right after th...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: first-time-messages
  Show dependency tree
 
Reported: 2012-10-31 10:47 UTC by poletti.marco
Modified: 2013-06-04 19:49 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
zeroconf.patch (zeroconf.patch,977 bytes, patch)
2012-11-01 21:20 UTC, William Hubbs
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description poletti.marco 2012-10-31 10:47:53 UTC
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.
Comment 1 William Hubbs gentoo-dev 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 gentoo-dev 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 gentoo-dev 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.