[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Dependencies a little excessive?



Toshio Kuratomi wrote:

On Thu, 2006-08-10 at 15:04 -0400, seth vidal wrote:

okay - then here are a couple of more situations I want to make sure are
understood:

yum remove foo*

it should remove all packages starting with foo of EVERY arch or just of
the primary arch in the biarch set?

yum update foo*

ditto of above? What should it default to act on

This is interesting.  In my mind I've been thinking of globs as broken
because they pull in everything.  Then I start using them when I remove
something and it works as I expect!  Woohoo!  Next time I use it to
install something and it's still "broken"....

Now that we've had this discussion I realize this isn't broken but a
design decision.  But even though I now realize it is consistent, I
still think it is unexpected.

Here's why:
yum install vim*
installs vim-common.x86_64 vim-enhanced.x86_64 vim-minimal.x86_64

yum install xfsprogs*
installs xfsprogs.x86_64 xfsprogs.i386 xfsprogs-devel.x86_64
xfsprogs-devel.i386

Why should xfsprogs install i386 packages when vim doesn't?

-Toshio
Just a suspicion.  And a suggestion, perhaps something for the FAQ.

It seems to me that
  yum install foo*
is a command line.  If typed to the bash interpretter, bash will
notice the "*" in foo and attempt filename expansion.

If there happens to be some files named, say, foo1, foo2, foo3 in
the current directory, then typing
  yum install foo*
will be expanded by bash into
  yum install foo1 foo2 foo3
which will likely result in the error messages about foo1, foo2, and
foo3 being nonexistent packages.

If, on the other hand, there are no files starting with foo in the
current directory, then foo* will be passed to yum, resulting
effectively in the command
  yum install foo*
and yum will hae an opportunity to expand the wildcard.

This variation in behaviour of a command, depending on the contents
of the current directory, has often confused students here; and
often baffled the instructor (me) until it occurred to me to ask
what was in the current directory. ;0(

It seems to me, in the interest of not misleading the uninitiated to
the intricacies of bash (particularly if we are recruiting users
from M$s products which always hand the wildcards to the applications)
we might promote typing things like this as
  yum install 'foo*'
to make sure that the wildcard gets to yum, if I understand correctly
that it expands the "*" using rpm names (not filenames in the current
directory, as bash will do).

I hope that the above suggestion is clearly stated.  My explanations
are not always clear.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]