[Yum] proposed updates to yum docs/man page?
Robert P. J. Day
rpjday at mindspring.com
Sun Dec 28 16:36:05 UTC 2003
collecting some of my previous submissions, i'm willing to generate some
patches to the man page for yum to bring it up to date, but first, i just
want to make sure that i have all the details down. the patches would be
based on missing or unclear parts of the man page, so here's what i
understand so far, feel free to correct me if i'm way off base.
first, i found it useful to draw the distinction between packages for
which you already have a version on your system, and those for which you
don't. in normal RPM parlance, this would mean the difference between
upgrading (an already-installed RPM) and installing (a new RPM). based on
this, i chose to describe packages at a repository as either "new" or
"newer", relative to your system, the difference being fairly obvious,
right? i'm drawing this dictinction since there are a number of "yum"
variations that work differently (and sometimes confusingly) based on
whether you've already got an earlier version or not.
the second general issue is how often "yum" has to consult the
repositories. you'll see what i mean when this situation arises.
and the third general issue is, when can you use, as an argument, a
specific package name or glob pattern, and when can you not? there are
times when this is confusingly inconsistent.
there are a number of "yum list" variations, whose documentation in the
man page doesn't seem to match their actual behaviour. first, there are
three variations of listing what's "available" at a repository:
$ yum list # what's either new or newer?
$ yum list available # what's strictly new?
$ yum list updates # what's strictly newer?
(obviously, all of these require querying the repositories, so no
complaints on that score.) now, for which of these can you add either
specific package names or glob patterns? with the basic "list", you
can add a packagename or glob pattern:
$ yum list <package|glob> # works fine
but this doesn't work with either of "list updates" or "list
available". any reason why not? it would just make these variations
work more consistently, no? and it would certainly be useful, yes?
$ yum list installed
queries all of the repositories, despite the fact that all you're asking
for is a list of what's on your local host. (in this case, the "-C"
behaviour would seem to make sense as the default.)
in addition, it would be useful if the "list installed" variation also
accepted package names or globs, as does "rpm -qa 'glob'". yes, i know
you can pipe it to grep, but still ... :-)
there is, it seems, some inconsistency in what you should be allowed to
"install" and what you should be allowed to "update" -- should this
depend on whether the package is either "new" or "newer"?
if i try to "update" a package for which i don't even have a version on
my system, yum will take the time to consult all of the repositories, only
to give up afterwards with:
# yum update ogle
... much repository consulting here ...
Finding updated packages
Downloading needed headers
Cannot find any package matching ogle available to be updated.
No actions to take
based on this, i'm assuming that you can't technically "update" to a "new"
RPM, but if so, yum could have saved me the time of consulting the
repositories and deduced right away that this update was doomed to
failure, no? so i can't (by default) "update" to a new RPM.
however, apparently, i *can* "install" a newer RPM:
# yum install vnc
Downloading needed headers
I will do the following:
[update: vnc 4.0-0.beta4.3.2.i386]
Is this ok [y/N]:
note that, since i already have a version of vnc installed, at least yum
is asking if i want to "update". fair enough, but if yum is going to be
interactive here, then to be consistent, perhaps i should also be allowed
to say that, yes, i want to "update" a non-installed RPM earlier.
(based on the above, it's not clear what should happen if i choose to
update or install using a glob pattern, for which i have only *some* of
the available packages that match that glob already installed. thinking
about that makes my head hurt.)
last topic -- what does it mean to say
# yum clean oldheaders
From the man page, "Eliminate the old headers that yum no longer needs
to determine the remote availablility of packages."
sorry, i'm sure i'm being clueless, but what does this mean?
More information about the Yum