yum update

Aaron Konstam akonstam at sbcglobal.net
Fri Aug 3 21:27:13 UTC 2007


On Fri, 2007-08-03 at 14:43 -0400, Tony Nelson wrote:
> At 11:31 AM -0700 8/3/07, Les wrote:
> >On Fri, 2007-08-03 at 15:41 +0100, Timothy Murphy wrote:
> >> Aaron Konstam wrote:
> >>
> >> >> Use the --exclude=[package] option like
> >> >> # yum update --exclude=kernel*
> >>
> >> > The above will not work since the * will be expanded by the shell not
> >> > yum.
> >>
> >> Are you sure?
> >> My impression is that it is only expanded if you happen to have
> >> a file called kernel* in the current directory.
> >> If it doesn't find anything yum does expand the argument, I think?
> >>
> >> However, I always say: yum update --exclude=kernel\*
> >>
> >In most expansion cases, the backslash is the escape character, so your
> >commands are the same, I think.
> 
> No, the backslash is the escape character, so "kernel*" acts differently
> than "kernel\*".  The former will be expanded by the shell if it can, and
> left alone otherwise.  The latter will be left alone by the shell.  When
> yum gets the command, if it finds a name with "*" in it, it will expand it
> appropriately, in this case as the name of a package.  If the shell already
> managed to expand the name, the resulting exclude won't match any package
> and won't work.
We have some confusion here.
--exclude=kernel\* and --exclude="kernel*" are the same. Both keep the
shell from expanding the *
--
=======================================================================
"There is nothing so deadly as not to hold up to people the opportunity
to do great and wonderful things, if we wish to stimulate them in an
active way." - Dr. Harold Urey, Nobel Laureate in chemistry
=======================================================================
Aaron Konstam telephone: (210) 656-0355 e-mail: akonstam at sbcglobal.net




More information about the users mailing list