Okay, I've decided to unleash version 0.8.4 onto the unsuspecting masses... There are quite a few changes:
- the script now uses the getopt.getopt() function for option parsing
- you have the following options now:
-v or --version: prints version
-h or --help
-s or --sync: makes emerge rsync before anything else
-e or --emergeopts: here you list the opts you would give to emerge: for instance pye -e uDv world would be equivalent with calling emerge -puDv world
-i or --info <package> will print all info about <package> that can be found in /var/db/pkg
-c or --category: will list all packages available in a portage category; e.g. pye -c games-fps will give you the list of all FPS games in portage, to choose from
-p or --prune: lists all installed packages, and the user can choose which nes to unmerge
When the packages are listed, you will have the following possibilities:
Code: Select all
* you can simply enter the numbers comma-separated, e.g. 1,3,5,6,8
* you can also specify ranges: 2,4-7,9,11-16
* "a" or "all" merges all packages in the list
* "!" excludes the specified packages (and merges the rest): !4,6-8,13
* "x" excludes _and_ masks them in /etc/portage/package.mask or ~/.pye/pye.mask
* "q" quits pye
- Pye now boasts of a config file! It would reside in ~/.pye/pye.conf (you should manually create the dir and file for the time being), and can contain the following variables:
Code: Select all
EMERGEOPTS = uDv
SILENT = no
MASKFILE_ETC_PORTAGE_PACKAGEMASK = no
With EMERGEOPTS you can specify your standard options for emerge (pye -e overrides this).
If SILENT is yes, pye will not print the list of choices as shown above.
The maskfile is a new feature. When you specify the packages to be excluded with an x (e.g. x3,6-9,23), pye will enter these packages either into /etc/portage/package.mask or ~/.pye/pye.mask, depending on the variable MASKFILE_ETC_PORTAGE_PACKAGEMASK (if yes, the former, if no, the latter). Those packages will not show up when you dp pye world the next time.
At the end, pye now gives emerge times for the individual packages.
The script is available
from here. Please test extensively and suggest improvements.
TODO:
- --purge option to totally unmerge a package
- --sqlite backend
- HUSH variable to oppress emerge output
Enjoy,
dr_strange