Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

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
share|improve this answer

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-

share|improve this answer
    
Funtoo here -- a working example: equery u virtualbox-bin | cut -c 1- –  Nikos Alexandris Jul 11 '13 at 21:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.