On Monday 15 December 2003 12:39, Renat Golubchyk wrote:
> Hi!
>
> On Monday 15 December 2003 04:10, Joel Konkle-Parker wrote:
> > I'm switching over from OSS to ALSA, so I need to find all the installed
> > packages that were merged with "-alsa". Is this possible?
>
> Try this one (everything in one line):
>
> for pack in $(find /var/db/pkg/ -type f -name IUSE -exec grep -l 'alsa'
> '{}' ';' |sed 's#IUSE$#USE#'); do grep -l '\-alsa' $pack; done |sed
> 's#.*pkg/\(.*\)-[0-9].*/USE#\1#'

Hmm, interestingly enough, this doesn't work for me. The reason is that the 
USE for each package only contains the flags that were enabled. I don't know 
if this is due to a different portage version (2.0.49-r18) or the fact that 
my USE flags begins with -* followed by the flags that I want, but I suspect 
the latter. Here's an alternative that should catch either situation:

for pkg in /var/db/pkg/*/* ; do grep -q 'alsa' $pkg/IUSE && (grep -L 'alsa' 
$pkg/USE || grep -l '\-alsa' $pkg/USE) ; done | sed 
's#.*pkg/\(.*\)-[0-9].*/USE#\1#'

Yes, I plagerized your sed script to clean up the output ;-)

--
Regards,
Jason Stubbs

--
[EMAIL PROTECTED] mailing list

Reply via email to