3

How can I get list of specific package's use flags?

So, there are at least 2 ways to do that:

  • emerge -pv $PACKAGENAME

  • equery uses $PACKAGENAME

But these commands returns to many noisy information. All I want is simple list like

  useflag1
  useflag2
  useflag3

without any words about are they set or not or anything else.

2 Answers 2

1

Here is my approach (for portage, for example):

#> grep --perl-regexp --only-matching "(?<=IUSE=\").*(?=\")" `equery which portage`
build doc epydoc +ipc linguas_pl pypy2_0 python2 python3 selinux xattr
1

If you pipe the output of equery uses it will strip any "noise" to keep only the USE flags and a + or a - whether it is enabled or not.

Here is your command:

$ equery u $PKGNAME | cut -c 2-

1
  • Funtoo here -- a working example: equery u virtualbox-bin | cut -c 1- Jul 11, 2013 at 21:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .