LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   List non-mandatory leaf packages [CentOS 5.4] (https://www.linuxquestions.org/questions/red-hat-31/list-non-mandatory-leaf-packages-%5Bcentos-5-4%5D-790353/)

carbonfiber 02-20-2010 04:54 AM

List non-mandatory leaf packages [CentOS 5.4]
 
Hello.

I am searching for a program which may be used in order to display a list of "leaf" packages (i.e. installed packages upon which no other installed packages depend), but only those "leaf" packages which are not marked as being mandatory packages belonging to some installed group.

For example, assume we have package group "Example" which comprises the following packages:
  • core-package-one [ MANDATORY; installed; ]
  • core-package-two [ MANDATORY; installed; ]
  • extra-package-alpha [ OPTIONAL; installed; not required by any other package; ]
  • extra-package-beta [ OPTIONAL; installed; required by extra-package-alpha; ]
  • extra-package-delta [ OPTIONAL; not installed; ]

Format: <package name> [ <group priority>; <install status>; <leaf status> ]

The tool, when run, should only display "extra-package-alpha" from the "Example" group, because:
  • core-package-one: do not list because it is a MANDATORY package part of installed group "Example"
  • core-package-two: do not list because it is is a MANDATORY package part of installed group "Example"
  • extra-package-alpha: list because it is an OPTIONAL, installed, leaf package belonging to group "Example"
  • extra-package-beta: do not list because it is an OPTIONAL, installed, but not leaf package (extra-package-alpha requires it) belonging to group "Example"
  • extra-package-delta: do not list because it is an OPTIONAL, but not installed package belonging to group "Example"

If such a tool does not exist, I would like to create it. However, I am new to RPM-based systems, and, as such, I am having difficulties finding the necessary documentation. Should I be reading the yum source code? Is there some sort of document describing the package database on RH/CentOS/etc. systems and how 3rd party applications are supposed to work with this database?

unSpawn 02-21-2010 03:15 AM

Maybe rpmorphan?

rpmorphan finds "orphaned" packages on your system. It determines which packages have no other packages depending on their installation, and shows you a list of these packages.

(http://rpmorphan.sourceforge.net)

carbonfiber 02-21-2010 03:39 AM

Thank you very much.


All times are GMT -5. The time now is 04:49 PM.