FS#1348 - [PATCH] Remove orphans not explicitly installed
Attached to Project:
Pacman
Opened by Jake Brownson (jbNet) - Monday, 30 August 2004, 05:02 GMT
Last edited by Judd Vinet (judd) - Monday, 30 August 2004, 17:50 GMT
Opened by Jake Brownson (jbNet) - Monday, 30 August 2004, 05:02 GMT
Last edited by Judd Vinet (judd) - Monday, 30 August 2004, 17:50 GMT
|
Details
I've created a patch against pacman-2.8.4 that implements
removal of packages that were not explicitly installed. A
package is marked explicitly installed if it is listed on
the command line when installed, or part of a group listed
on the command line. This information is stored in the
database as %INSTALLTYPE% When a package(s) is removed, the
patch recursively checks for any packages that depend on and
only on that package(s) and weren't installed explicitly.
Packages without an %INSTALLTYPE% field are treated as
explicit so using the patch with old databases will not
cause unexpected removal of packages. I have also added a
--noremorphs option that when activated disables the
detection and removal of orphan dependencies.
Other Changes: I added a quick list_rem function to remove items from a list, and I changed the is_in function to return the address of the item if found, rather than a simple 1. I made one change to the code to remove a warning caused by this change. Let me know if you'd like anything added, like a command line option, or config file option, etc. |
This task depends upon
Comment by Judd Vinet (judd) -
Saturday, 18 September 2004, 07:52 GMT
It's a good idea. I didn't use your patch, but I've added the
similar functionality to -Rs, so I can keep the normal -R behavior
the same as it is now. -Rs will remove all dependencies that were
not explicitly installed and won't break other packages.
removeorphans.diff