Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 106815 - app-portage/ufed enhancements to filter list of flags
Summary: app-portage/ufed enhancements to filter list of flags
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Sven Eden
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-21 11:47 UTC by yyra1av26
Modified: 2020-12-16 07:19 UTC (History)
3 users (show)

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


Attachments
Enhanced version of ufed (ufed-0.37,13.57 KB, text/plain)
2005-09-21 11:48 UTC, yyra1av26
Details
Revised, Enhanced version of ufed (ufed-0.37.pl,14.35 KB, text/plain)
2005-09-21 14:33 UTC, yyra1av26
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yyra1av26 2005-09-21 11:47:22 UTC
I will attach an updated ufed script which accepts a couple of parameters to
filter the flags one can edit.

If you run "ufed -g" it will only show the global use flags

If you run "ufed <ebuild>, <ebuild1>, ..." it will look up "equery which
<ebuild>" and only allow you to edit the flags that matter to <ebuild>,
<ebuild1>, ...

If you run "ufed -g <ebuild>, <ebuild1>, ..." it will only allow you to edit the
*global* flags that matter to <ebuild>, <ebuild1>, ...

My perl skill are not guru level, so my apologies if my changes cause any problems.


Reproducible: Always
Steps to Reproduce:
Comment 1 yyra1av26 2005-09-21 11:48:25 UTC
Created attachment 68954 [details]
Enhanced version of ufed
Comment 2 yyra1av26 2005-09-21 12:03:56 UTC
Sorry, I just realized that, for example, when you run "ufed sun-jdk", make
changes, and save it totally destroys all your use flags except the subset that
sun-jdk is concerned with.

I guess it needs some more work.  Perhaps it'll give a head start to an
interested person.
Comment 3 yyra1av26 2005-09-21 14:33:22 UTC
Created attachment 68969 [details]
Revised, Enhanced version of ufed

I've attached a new 'fixed' version of the enhanced ufed script.  I believe I
have tested it with nearly every combination of parameters, and it works
correctly on my box.

It now uses a working set of use flags that it resolves with all of the
currently set use flags before it saves.
Comment 4 yyra1av26 2005-09-21 14:41:46 UTC
Two more notes, then I promise I'm done.  First, since my changes make use of
equery.  I believe that creates a dependency on the gentoolkit package.

Second, there may be some performance enhancements necessary.  I've only tested
the ebuild filtering with packages with a small list of use flags, whereas some
of the loops I've added are nested and would increase polynomially as more flags
are involved.  Since basically we are just talking about set operations it might
be better to do something like what the resolve_flags method does and use
hashtables instead of arrays.

I also have not tested the filtering with a wide array of ebuilds, so I'm not
sure if my regular expressions will scale well.

With all of those caveats, I hope my changes can still be of use.
Comment 5 Harald van Dijk (RETIRED) gentoo-dev 2005-09-21 15:41:31 UTC
I assume (because of the version number) this is a modified version of ufed
0.36? I'm slowly working on getting ufed 0.40 ready, and I doubt your changes
can be applied to what I have now without modifications. For post-0.40,
filtering in another form is on my to-do list, and I'd like to try to keep the
changes needed for it in the interface code as much as possible, so it will need
to be written rather differently.

If you would like to use your custom ufed - I assume you would - some notes on
the implementation: IUSE may also be set from eclasses, so simply searching for
IUSE="..." won't catch all flags.
IUSE="flag1"; IUSE="${IUSE} flag2"
is also valid and would be misinterpreted. More importantly, it would seriously
misbehave in the simple case
IUSE="flag1" # flag2 is disabled for now
because it assumes IUSE="..." is all that's on the line.
It's probably easiest to query portage for the IUSE flags. This would involve
writing a short Python program, which basically does the equivalent of emerge
--pretend --verbose --nodeps pkgname.

Hope that helps somewhat, and sorry I can't really add your changes.
Comment 6 Marius Mauch (RETIRED) gentoo-dev 2005-09-21 16:13:01 UTC
(In reply to comment #5)

> It's probably easiest to query portage for the IUSE flags. This would involve
> writing a short Python program, which basically does the equivalent of emerge
> --pretend --verbose --nodeps pkgname.

Just use d.g.o/~genone/scripts/auxget ;)
Comment 7 yyra1av26 2005-09-22 08:01:34 UTC
Thanks for the comments.  I know my regexp wasn't robust.  It's been a while
since I've done Perl and, well, Perl is Perl.  I'll look forward to 0.40 and
beyond.  Filtering would be a cool addition to ufed, because often times I don't
want to wade through a list of 100+ use flags.  I only want to see the flags
that matter to particular packages.  Thanks for all your work on ufed.
Comment 8 Sven Eden 2012-12-30 10:34:04 UTC
This is a nice idea, but needs some planning. The filtering for "global" versus "local" USE-flags is discussed in bug 104852 already.
But a different build up of the shown USE-flags if a specific package is added on the command line sounds interesting. It is a bit like "equery u <package>" but with editing functionality, right?
Well, I guess I go "spying" in gentoolkit how they do it. ;)
Comment 9 Sven Eden 2013-03-29 20:18:01 UTC
This is now work in progress, as it is on my todo list now that the new 0.90_rc1 is out.
Comment 10 Paul Varner (RETIRED) gentoo-dev 2016-05-23 21:08:01 UTC
Svwn, was this ever addressed in the current 0.92?
Comment 11 Jonas Stein gentoo-dev 2017-07-22 19:10:05 UTC
What is the status on this?
Comment 12 Sven Eden 2017-07-24 07:55:21 UTC
(In reply to Jonas Stein from comment #11)
> What is the status on this?

Currently I am working on elogind. ufed is next on my list, but I will not continue until elogind-234 (current systemd stable version) is out.

Cautiously I'd say that I'll need another two weeks until elogind-234 will be out.

However, I have planned a few upgrades to ufed, and this one is in the top three of my list.
Comment 13 Jonas Stein gentoo-dev 2018-02-05 09:11:53 UTC
sys-auth/elogind-235.2-r1 is out and the ticket is 5 years in progress/on todo list... 
It seems to be a more complicate problem. 
If you got stuck, we are glad to help on IRC #gentoo-dev-help if it is related to gentoo or on perl channels, if it is related to perl.
Comment 14 Sven Eden 2018-03-08 09:10:53 UTC
(In reply to Jonas Stein from comment #13)
> sys-auth/elogind-235.2-r1 is out and the ticket is 5 years in progress/on
> todo list... 
> It seems to be a more complicate problem. 
> If you got stuck, we are glad to help on IRC #gentoo-dev-help if it is
> related to gentoo or on perl channels, if it is related to perl.

Thanks for the reminder!

There is only one problem: Time.

For a lot more months than I liked, issues keep popping up in all sorts of projects, demanding what little spare time I have.

This means I have to prioritize "major issue" on project "Foo" higher than "nice to have" on ufed. However, I am working on being able to regain at least some control over my spare time. 

That said, I would be happy if I had time to work on ufed, as there are quite some things to do, and some of these will be real fun to develop...
Comment 15 Jonas Stein gentoo-dev 2019-06-08 14:53:27 UTC
still no progress visible. Changing status.