On 2005-03-24 08:05:06 +0000 (Thu, Mar), Russ Brown wrote: > These are both really useful features. The really annoying thing is that > etcat uses doesn't actually work at the moment (traceback below), which > means I have to install the package to find out what use flags I > actually want, and then install the package again! Well, that or go > looking through the gentoo files myself, but that's what these > utillities are supposed to help you avoid. Yes, I know I can do an > emerge -pv <package> to see a list of the use flags, but that doesn't > explain what they all mean, which etcat did. > > Anyone know if equery is going to be brought up to the level of etcat in > these cases?
This I know not ;-) but you may find this little script useful:
(quick and dirty, I know)
============== coflag.sh ===============
#!/bin/bash
if [ $# -eq 0 ]
then
# use stdin
flags=''
while read f
do
f=$(echo "$f" | sed 's/[^a-zA-Z0-9_+-]/ /g' )
for f2 in $f
do
if [ \( "x${f2:0:1}" = "x-" \) -o \( "x${f2:0:1}" = "x+" \) ]
then
flags="${flags} ${f2}"
fi
done
done
flags="$(echo "${flags}" | sed "s/ /\n/g" | sed 's/^[-+]//' | sort -u )"
else
flags="$(echo "$*" | sed 's/^[-+]\|\W[-+]/ /g' | sed 's/[^-a-zA-Z0-9_]/ /g' )"
echo " $flags"
fi
cd /usr/portage/profiles
for x in $flags; do
grep -e "^$x " -e ":$x " use.* | while read pf opis; do
plik="${pf%:*}"
flaga="${pf##*:}"
tput setaf 6
echo -n "$plik: "
tput sgr0
tput setaf 1
tput bold
echo -n "$flaga "
tput sgr0
echo "$opis"
done
done
===================== EOF ==================
$ emerge -pv mod_php | coflag
or
$ coflag pam -pam +pam '-pam*'
or whatever ;-)
--
$ ls -lart
/bin/ls: you must be root to use LART
pgplYNpgxdkAT.pgp
Description: PGP signature
