yum update

Tony Nelson tonynelson at georgeanelson.com
Fri Aug 3 18:43:25 UTC 2007


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.
-- 
____________________________________________________________________
TonyN.:'                       <mailto:tonynelson at georgeanelson.com>
      '                              <http://www.georgeanelson.com/>




More information about the users mailing list