On Tue, 03 Mar 2015 11:12:48 +0100 Helmut Jarausch wrote: > On 03/03/2015 10:47:46 AM, Andrew Savchenko wrote: > > Hello, > > > > On Tue, 03 Mar 2015 10:21:19 +0100 Helmut Jarausch wrote: > > > Hi, > > > > > > I'd like to install all packages which need Python, only for Python3 > > except those which cannot be installed for Python3. > > > How can I find out which of the packages installed on my machine > > have PYTHON_TARGETS=python2_7" (only). > > > I could loop over `qlist -IC` do an emerge -vp each grepping for > > this string. > > > But is there an easier way. > > > > You are almost there, just learn the power of mighty eix: > > > > EIX_LIMIT=0 eix -I --only-names -\( -U python_targets_python2_ -! -U > > python_targets_python3_ -\) > > > > This will return you all installed packages having "python2_*" in > > their python targets, but not having "python3_*". > > > > Many thanks Andrew. > I have some problems, though. > > Your command shows media-libs/mesa (among many others) > but > emerge -vp media-libs/mesa doesn't show any python targets.
Run plain: $ eix media-libs/mesa It has PYTHON_TARGETS="python2_7", though probably not in the version currently installed in your system. Please don't forget, that USE flag may appear and disappear during upgrades or downgrades. Best regards, Andrew Savchenko
pgp3045y2fZIf.pgp
Description: PGP signature