Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 132111 - Perl script for recursive uninstalling
Summary: Perl script for recursive uninstalling
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Lowest enhancement (vote)
Assignee: Gentoo Linux bug wranglers
Depends on:
Reported: 2006-05-03 04:52 UTC by Mladen Stefanov
Modified: 2006-05-03 05:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

recursive uninstaler (,1.31 KB, text/plain)
2006-05-03 04:53 UTC, Mladen Stefanov

Note You need to log in before you can comment on or make changes to this bug.
Description Mladen Stefanov 2006-05-03 04:52:26 UTC
I wrote this script to safely remove gnome from my system, but I think it may usefull for any list of packages. The script takes as input a file which contains list of packages to be removed - in my case:
equery list | grep gnome > pkglist
It removes the version number from the name and the removes duplicate names (resulting from multislot instalations). After this for every package in the list it executes "equery depends <pkgname>" For every package, that depends on <pkgname>, it chechks if it's not already added to the list for removing and if it's not - asks the user. In my case I keeped mozilla, openoffice, etc.  - they can be compiled with "-gnome -gtk -gtk2" later. Addedd packages are checked also if any other packages are depending on them. If the user choose to keep the application the script remembers it and will not ask again for the same name.
  At the end the cript produces two files: "output" contains the package names from the input file plus the names, that the user choose during execution. They can be unmerged wint something like "emerge --unmerge `cat output`" ; and the second file produced is "pkg_to_reemerge" - contains names of packages that user choosed to keep. They should be reemerged with apropriate USE flags - in my case "-gnome -gtk -gtk2".
Comment 1 Mladen Stefanov 2006-05-03 04:53:58 UTC
Created attachment 86066 [details]
recursive uninstaler
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-05-03 05:03:24 UTC
Well, I'm really unsure what are you requesting here. If you want to see this in portage, you'd need to make an ebuild for this. Otherwise, forums.g.o. or is probably a better place for such scripts.