Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC

Bug 440536

Summary: sys-apps/usbutils-006: some elog messages should only be shown when upgrading from an old enough package.
Product: Gentoo Linux Reporter: poletti.marco
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 440214    

Description poletti.marco 2012-10-31 11:29:13 UTC
Disclaimer: this bug has been filed in a semi-automated manner.

When emerging the package sys-apps/usbutils-006, the following elog messages are displayed:

 * The 'network-cron' USE flag is gone; if you want a more up-to-date
 * usb.ids file, you should use sys-apps/hwids-99999999 (live ebuild).

Such messages should only be displayed when the package is upgraded from an old enough package (and possibly for new installs).
These situations can be checked in the ebuild as follows:

if has_version '<sys-apps/usbutils-1.0'; then

Or, if the message should also be displayed for new installs:

if !has_version 'sys-apps/usbutils' || has_version '<sys-apps/usbutils-1.0'; then

Remember to replace 1.0 with the right version number.

See the tracker bug 440214 for more details.
Comment 1 Samuli Suominen gentoo-dev 2012-10-31 17:22:24 UTC
+  31 Oct 2012; Samuli Suominen <ssuominen@gentoo.org> usbutils-006.ebuild:
+  Use REPLACING_VERSIONS to silence pkg_postinst() message about removed
+  USE="network-cron" wrt #440536 by "poletti.marco"

http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/usbutils/usbutils-006.ebuild?r1=1.6&r2=1.7
Comment 2 SpanKY gentoo-dev 2012-11-07 06:40:03 UTC
(In reply to comment #1)

FYI, the < and > operators do string compares, not numeric.  so 006<5 would return the wrong result.  you need to use -gt and -lt to do numeric compares.
Comment 3 SpanKY gentoo-dev 2012-11-07 06:41:11 UTC
(In reply to comment #2)

although, numeric compares would break when dealing with -r# and such.  would have to use versionator.eclass i think if PMS doesn't provide a compare tool.