Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

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
Task Type Feature Request
Category
Status Closed
Assigned To Judd Vinet (judd)
Architecture not specified
Severity Medium
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

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.
   removeorphans.diff (10.5 KiB)
This task depends upon

Closed by  Judd Vinet (judd)
Saturday, 18 September 2004, 07:52 GMT
Reason for closing:  Implemented
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.

Loading...