Skip to content

Instantly share code, notes, and snippets.

@hoefling
Last active April 16, 2019 08:57
Show Gist options
  • Save hoefling/872779b051d00969ced841cdf40781b4 to your computer and use it in GitHub Desktop.
Save hoefling/872779b051d00969ced841cdf40781b4 to your computer and use it in GitHub Desktop.
filter installed packages having 2.7 as only python target and activate python2_7 use flag
#!/usr/bin/env bash
$(which eix) --compact --installed --use python_targets_python2_7 \
--not --use python_targets_python3_5 --not --use python_targets_python3_4 \
--not --use python_targets_python3_3 --not --use python_targets_python3_2 \
| sed -n 's/^\[I\] \(.*\/.*\) ([[:digit:]].*$/\1/p' \
| awk '{print $1" python_targets_python2_7"}' \
> /etc/portage/package.use/python2_7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment