Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 39233 - Script for gentoolkit: efuse
Summary: Script for gentoolkit: efuse
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-24 04:21 UTC by Narada Sage
Modified: 2004-10-06 11:37 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 Narada Sage 2004-01-24 04:21:47 UTC
Location of script:
http://dhruba.codewordt.co.uk/scripts/fuse

Script options:
$ fuse -h
fuse v0.4: shows all packages using a USE flag

  -i | --installed      : show only installed packages
  -v | --verbose        : show detailed output (versioning data)
  -m | --mono           : show monochrome output (no color)
  -V | --version        : show version
  -h | --help           : show help

Notes:
 * Any number of arguments and parameters may be given in any order.
 * Parameters may not be combined but can be intermingled with arguments.

Notes:
Basically you give it one or more USE flags and it takes one USE flag at a time and returns all packages which use that USE flag.   Options are shown above.  It is at version 0.4 at this time.  Verbose option provides version and revision numbers as well as package names.

I have had ideas about new features but have no time to implement more at this time.  Overall, it's a nice little thing that produces full colour output and AFAIK I have not come across any alternative for doing the same thing.

Problems:
(1) Because it works in real time without caching it may be considered slow working but it does work.  On a local portage tree it will be faster.  On an nfs mounted portage tree it will be much slower depending on bandwidth of interconnection.  On the plus side to state the obvious if you install a package it will pick it up immediately.

(2) It's results are accurate with one exception.  It does not go into eclasses to find use flags defined in there.  It only uses information inside ebuilds themselves and use.local.use and use.local.  If any suggestion can be made as to how it is supposed to cater for use flags inside eclasses then I'd be interested to hear it.

Please try it and kindly let me know what you think.
Comment 1 Narada Sage 2004-01-24 04:22:18 UTC
Forgot to say: It produces portage style output as much as possible.
Comment 2 SpanKY gentoo-dev 2004-01-24 12:21:47 UTC
fuse is a bad name to use because we already have something that installs as /usr/bin/fuse

better to go with efuse or just euse to follow the e* naming convention
Comment 3 Narada Sage 2004-01-24 15:19:14 UTC
SpanKY: A name change is fine by me.  However, there is also /usr/bin/euse in gentoolkit.  That leaves only genuse or efuse or different alternatives like use-pkg or pkg-use.  Just going through some random thoughts since I can't decide.
Comment 4 SpanKY gentoo-dev 2004-01-24 16:26:56 UTC
your script so it's your choice ... just saying that 'fuse' wont work :)
Comment 5 Narada Sage 2004-01-24 16:42:38 UTC
Gah.  This is hard work!  Okay efuse it is.  :)
Comment 6 Narada Sage 2004-01-24 20:10:13 UTC
Since I finished a uni deadline tonight and since the script was officially submitted I was motivated to do more work on it.  Meet efuse v0.5.

Script v0.5: http://dhruba.codewordt.co.uk/scripts/efuse
HTML v0.5: http://dhruba.codewordt.co.uk/scripts/efuse.html

Changelog v0.5 from v0.4
 * New feature: efuse -i & efuse -i -v (verbose adds more)
   Gives system use flags information
 * Code cleanups
 * Improved arg/params handling and colour handling
 * Changed help to be in colour
 * Changed name to efuse and version bumped :)
Comment 7 Narada Sage 2004-02-01 21:17:35 UTC
efuse v0.6: http://dhruba.codewordt.co.uk/scripts/efuse-0.6

Changelog v0.6 from v0.5:
* Added -s | --search to search for use flags
* Added Status : enabled/disabled to indicate current state of use flag
* Added more colour and modified existing colours in help and output
* Added [E] output to indicate use flag was enabled at install/compile time
* Added [D] output to indicate use flag was disabled at install/compile time
* Modified [ Installed ] output to [I E D] output to better combine indications
* Modified [ Category: Data ] output to | Category : Item for better visibility
* Code reduction, cleanups and bugs fixes

Future possible feature: -o | --output to output package list to file

Extensive testing as well as any kind of feedback would be much appreciated.
Comment 8 Narada Sage 2004-02-10 05:45:51 UTC
efuse 0.6.3: http://dhruba.codewordt.co.uk/scripts/efuse-0.6.3

Changelog (0.6.3 <- 0.6.0):
--------------------------
* Almost halved time taken to produce results
  * Added additional parameters to find which I hope will be multiplatform
* Modified presentation of output to make less cluttered
* Modified presentation of and added to help
* Code cleanups, reduction and bug fixes
Comment 9 Marius Mauch (RETIRED) gentoo-dev 2004-10-06 11:37:24 UTC
Hmm, probably useful but I don't want to add more portage-related bash scripts to gentoolkit (they've proven to be PITA for maintenance/consistency). Besides, in the current state it already has several problems (setting of PORTDIR, not ROOT aware, not package.use aware, usage of /tmp, ...). I'm closing this bug, if you want to rewrite it in python or (even better) make a patch for gentoolkit.py or equery feel free to reopen it.