Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 575836 - app-portage/portpeek: Scan useflags in package.use
Summary: app-portage/portpeek: Scan useflags in package.use
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Mike Pagano
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-27 17:54 UTC by haarp
Modified: 2020-07-24 19:40 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description haarp 2016-02-27 17:54:52 UTC
Hey,

got a suggestion for this very handy tool.

Portpeek currently just checks if packages are installed in package.use. In order to ease maintenance and useflag management, portpeek could also check for outdated/invalid or global useflags being used in this file.

If an useflag us defined despite not being available for an ebuild, portpeek should let me know. If an useflag is defined globally (in make.conf) and redundantly in package.use, portpeek could also mention that.

Thanks! :)
Comment 1 Brian Dolbec (RETIRED) gentoo-dev 2016-02-27 18:01:17 UTC
At least some of that is available in other tools.

While I didn't get to adding notification for oblsolete entries.  Enalyze's analyze and rebuild sub commands can report on all use flags how they are used, whether they are global, etc..

The rebuild sub-command can consider all those factors and produce a new package.* file for you.  Enalyze is part of gentoolkit.
Comment 2 Mike Pagano gentoo-dev 2016-02-27 20:23:47 UTC
(In reply to haarp from comment #0)
> Hey,
> 
> got a suggestion for this very handy tool.
> 
> Portpeek currently just checks if packages are installed in package.use. In
> order to ease maintenance and useflag management, portpeek could also check
> for outdated/invalid or global useflags being used in this file.
> 
> If an useflag us defined despite not being available for an ebuild, portpeek
> should let me know. If an useflag is defined globally (in make.conf) and
> redundantly in package.use, portpeek could also mention that.
> 
> Thanks! :)



I'm glad you like the tool. I think this bug should be reserved for a feature request for portpeek and not used to steer users elsewhere.  

I will definitely put this feature on the list.
Comment 3 Mike Pagano gentoo-dev 2016-02-29 13:45:40 UTC
Do you want something more that it has right now? 

package.use:
www-client/chromium fakeuse

$ portpeek -sq

package.use:
No valid use flags found for package: www-client/chromium. Invalid flag(s) found: fakeuse

Remove entries from files [y/n] y

Removing from: /etc/portage/package.use: Invalid use flag(s) from www-client/chromium fakeuse

Done

$ cat package.use
Comment 4 haarp 2016-02-29 16:05:23 UTC
Ah yes, you're right. It does do that already. Turns out in my years as a Gentoo user, I never had an invalid flag, so I misconstrued that as portpeek not checking :D

Sorry about that.

However, the second part is still valid, useflag defined in both make.conf and package.use are redundant and could be mentioned by the tool.
Comment 5 Larry the Git Cow gentoo-dev 2020-07-24 19:40:31 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3bb6f6285f695a9b5da9e88f3225167e0c1ef8a

commit c3bb6f6285f695a9b5da9e88f3225167e0c1ef8a
Author:     Mike Pagano <mpagano@gentoo.org>
AuthorDate: 2020-07-24 19:40:18 +0000
Commit:     Mike Pagano <mpagano@gentoo.org>
CommitDate: 2020-07-24 19:40:18 +0000

    app-portage/portpeek: Notify for duplicate use flags (w/make.conf)
    
    Add support for notifying when a duplicate use flag is
    in package.use/* and make.conf
    
    Closes: https://bugs.gentoo.org/575836
    Package-Manager: Portage-3.0.0, Repoman-2.3.23
    Signed-off-by: Mike Pagano <mpagano@gentoo.org>

 app-portage/portpeek/Manifest              |  1 +
 app-portage/portpeek/portpeek-3.1.2.ebuild | 30 ++++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)