[Yum] Listing packages in multiple locations

Aaron Luchko aaron at luchko.ca
Tue Oct 31 04:24:26 UTC 2006


When I do a yum search and included among the results are packages I've
already installed yum reports both the version from the repository and
installed version separately. For instance for a program 'foo' at
version 1 available from the repository 'rep' I get

foo	1.0	rep
Program Description

Then comes a long listing of other packages containing the word foo
followed by.

foo	1.0	installed
Program Description

The problem is that it is very difficult to tell if foo is installed
when looking at the copy from rep since the information that it is
installed doesn't appear until the very end (along with an arbitrary
number of other packages). One essentially needs to memorize the entire
list of installed packages and mentally exclude those from the list of
uninstalled packages. 

>From reading the man page I can't seem to find any functionality to help
with this. Not knowing precisely how yum works in retrieving the the
package information there are two possible ways I can think of to help
with this information.

1) Add an option such as --excludeInstalled to search, this function
would prevent any installed packages from being returned in the search
(ie the copies of foo in both rep and installed would be excluded).

2) When a package is shown check if it is installed on the local system,
if it is display that information, either through
(*) foo	1.0	rep
or
foo	1.0	rep,installed

The second version has the advantage of potentially being extended to
cases where multiple repos contain the same package, ie

foo	1.0	rep,rep2, installed

though I can see a number of issues with that in general.

Of course both 1 and 2 assume that it is possible for yum to determine
if the package from the repository is the same as the one installed on
the system. 

I was hoping someone would have some feedback on the usability or the
feasibility of these ideas (or whether functionality that solves this
issue already exists).

thank you,
Aaron




More information about the Yum mailing list