Red Hat Linux Info

March 13, 2010 11:02:46

I wrote a few Python scripts that help me create custom RH Linux installations:

getGroupPkgs.py - lists the packages (and their dependencies) from a list of groups
Usage:
getGroupPkgs.py comps.xml > /path/to/logfile

By default, the packages for the Base and Core groups are displayed. This can be changed by just editing the script, and adding other groups that you want. You can redirect the output to a file (as above), so that you have a record of the packages, and this can also be used for the next script.

Version History
0.208-04-2003Added check for package key to fix bug with RH9
0.122-03-2003Original release
syncRpms.py - takes a list of package names, and a RPM directory, and removes the rpms that are not in the list
Usage:
syncRpms.py /path/to/RPMs/ pkglist > /path/to/logfile

/path/to/RPMs/ is the path to the RPM directory of the distribution that you want to modify. pkglist is just a list of the packages that you want to keep. pkglist is the output of the getGroupPkgs.py script.

Version History
0.324-02-2003Added fix from Alain Tauch for working with RH9.0 (see note below)
0.208-04-2003Added fix from Alain Tauch for accepting /path instead of /path/
0.122-03-2003Original release


Note: You will need the rpm404-python or rpm-python(RH9.0) package installed in order to run this script.

Note: If you are on RedHat 9.0, then use this modified script (thanks to Alain Tauch).



Home :: Red Hat Linux Info :: Asterisk :: Projects :: Publications :: email me