Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
OBSOLETE Search meaning of useflags applicable on a ebuild
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
garo
Bodhisattva
Bodhisattva


Joined: 15 Jul 2002
Posts: 860
Location: Edegem,BELGIUM

PostPosted: Sun May 02, 2004 5:56 pm    Post subject: OBSOLETE Search meaning of useflags applicable on a ebuild Reply with quote

If you put the following code at the end of the ".bashrc" file in your homedirectory then you can run "explainuse foobar" to see all use useflags applicable on foobar, their states and their meanings.

Code:
function explainuse {
  emerge -vp $1 &&
  for i in `emerge -vp $1` ;  do
    if [ `echo $i | cut -c1` = "-" -o `echo $i | cut -c1` = "+" ] ; then
      useflag=`echo $i | cut -c2-`
      grep $useflag /usr/portage/profiles/use.desc
    fi
  done
}


To use this you need the following software on your system:
sys-apps/portage (I am 100 % sure you already have this)
sys-apps/coreutils (I am 100 % sure you already have this)
app-shells/bash (I am 99 % sure you already have this)
sys-apps/grep (I am 90 % sure you already have this)

TODO: put a layout in this post

(post errors and suggestions)
_________________
My favorite links this month:
- Surf Random
- Web-based SSH
- Stop Spam


Last edited by garo on Sun May 02, 2004 6:28 pm; edited 1 time in total
Back to top
View user's profile Send private message
curtis119
Bodhisattva
Bodhisattva


Joined: 10 Mar 2003
Posts: 2160
Location: Phoenix, AZ USA, North America, Earth, SOL System, Milky Way, The Universe, The Cosmos, and Beyond.

PostPosted: Sun May 02, 2004 6:06 pm    Post subject: Reply with quote

Code:
root@yellow mike # etcat --help
etcat (0.3.1) - Portage Information Extractor - By: Alastair Tse
NOTICE: This tool will be phased out at some point in
        the future, please use equery instead.
        Bugs are still fixed, but new features won't be added.
 
Usage: etcat [ options ] [ action ] [ package ]
 
Actions:
 
  files (-f short option)
    Lists files that belongs to a package and optionally with version.
 
  versions (-v short option)
    Displays the versions available for a specific package. Colour coded
    to indicate installation status and displays slot information.
        (I)nstalled
        (~)Unstable Testing Branch
        (M)asked Package
 
  graph (-g short option)
    Graphs Dependencies (NON WORKING)
 
  depends (-d short option)
    Finds all packages that are directly dependent to a regex search stri-
    ng.
        etcat depends 'gnome-base/libgnome'
        etcat depends '>=dev-lang/python-2.2'
 
  belongs (-b short option)
    Searches for a package that owns a specified file with an option to r-
    estrict the search space.
        etcat belongs /usr/bin/gimp media-gfx
        etcat belongs /usr/lib/libjpeg.so media-*

        etcat belongs /usr/lib/libmpeg.so
 
  uses (-u short option)
    Advanced output of USE vars in a package. Tells you flags used by a p-
    ackage at time of installation, flags in current config and flag desc-
    ription.
 
  changes (-c short option)
    Outputs the changelog entry to screen. It is possible to give a versi-
    on number along with the package name.
        etcat changes mozilla
        etcat changes mozilla-1.1-r1
        etcat changes gkrellm$
 
  size (-s short option)
    Lists the installed size of a package.


I prefer this one though. It's faster and gives more meaningful info that is easier to understand.Hopefully the unimplemented options will be included in the next couple of versions:

Code:
root@yellow mike # equery --help
Usage: equery <global-opts> command <local-opts>
where <global-opts> is one of
 -q, --quiet   - minimal output
 -C, --nocolor - turn off colours
 -h, --help    - this help screen
 -V, --version - display version info
where command is one of
 files <local-opts> pkgspec - list files owned by pkgspec
 stats  - not implemented yet
 list <local-opts> pkgspec - list all packages matching pkgspec
 glsa  - not implemented yet
 depends  - not implemented yet
 belongs <local-opts> file - list all packages owning file
 uses <local-opts> pkgspec - display USE flags for pkgspec
 which pkgspec - print full path to ebuild for package pkgspec
 depgraph <local-opts> pkgspec - display a dependency tree for pkgspec
 changes  - not implemented yet
 check pkgspec - check package's files against recorded MD5 sums and timestamps
 size <local-opts> pkgspec - print size of files contained in package pkgspec

_________________
Gentoo: it's like wiping your ass with silk.
Back to top
View user's profile Send private message
garo
Bodhisattva
Bodhisattva


Joined: 15 Jul 2002
Posts: 860
Location: Edegem,BELGIUM

PostPosted: Sun May 02, 2004 6:27 pm    Post subject: Reply with quote

equery is indeed a better solution, but etcat doesn't always work (try gvim for example)
_________________
My favorite links this month:
- Surf Random
- Web-based SSH
- Stop Spam
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum