man yum.conf question. was: Re: [Yum] Yum error question

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

 



On 24 Feb 2003, seth vidal wrote:

> > 2) If yum is doing the correct thing what incantation do I need in the
> > config file to get it to ignore the kernel rpms?
> 
> exclude=kernel* will exclude the kernel but I'd like to hear more about
> what caused this problem.


What is that "*" doing there?


I was asked this question across the weekend, and did not know 
the answer.  I thought yum was matching on exact package name, 
based on the code in presence of an exact match in 'conf.excludes'

What globbing/regex convention __is__ being used here?  In
grepping the code, I do not see glob expansion happening here,
so it must be happening outside in an included module:

[herrold@oldnews yum-0.9.3]$ grep exclude *
ChangeLog:      remove client-side excludes todo item
ChangeLog:      shouldn't program this early.  yum.conf.5 - add exclude option
ChangeLog:      clientStuff - add support for client-side excludes from
ChangeLog:      updates/installs config.py - add support for exclude option
ChangeLog:      excludes are a space separated list of pkgs to exclude - it is in
clientStuff.py:        if name not in conf.excludes:
config.py:        self.excludes=[]
config.py:        if self._getoption('main','exclude') != None:
config.py:            self.excludes=string.split(self._getoption('main','exclude'), ' ')
Binary file config.pyc matches
Binary file config.pyo matches
COPYING:countries not thus excluded.  In such case, this License incorporates
nevral.py:                                    if reqname in conf.excludes:
nevral.py:                                        errors.append('package %s needs %s that has been excluded' % (name, reqname))
nevral.py:                                        if reqname in conf.excludes:
nevral.py:                                            errors.append('package %s needs %s that has been excluded' % (name, reqname))
nevral.py:                                if reqname in conf.excludes:
nevral.py:errors.append('package %s needs %s that has been excluded' % (name, reqname))
TODO: - Implement pkg excludes on the server side
TODO:- Make it possible to have an http-accesible global conf file for excludes and
[herrold@oldnews yum-0.9.3]$


Three conflicting approaches come to mind:

exclude = kerne* 

might be: 

A. grep style: exclude everything containing with "kern" 
immediately followed by zero or more  "e"s

-or- it could be:

B.  shell style: exclude everything starting with "kerne"

-or- what I had thought:

C.  exact package name match

------------------

The man yum.conf page says IFS is 'space' 

------------------

[herrold@oldnews herrold]$ rpm -qa | grep [k][e][r][n][e]
kernel-2.4.18-24.8.0
[herrold@oldnews herrold]$ rpm -qa | grep [k][e][r][n][e].
kernel-2.4.18-24.8.0
[herrold@oldnews herrold]$ rpm -qa | grep [k][e][r][n][e]*
glibc-kernheaders-2.4-7.20
kernel-2.4.18-24.8.0
[herrold@oldnews herrold]$

-------------------

Interpretation A will catch:

    glibc-kernheaders

Interpretation B would not.

Interpretation C finds no matches.  

(explanation: there is no package
'kernel*-%{version}-%{release}.%{arch}.rpm', although it is a
'legal' package name; "*: is simply a presently unused
character [it may be prohibited, but I do not recall from 
memory] -- see similarly, e.g.,

[herrold@oldnews yum-0.9.3]$ rpm -qa | grep [\+]
compat-gcc-c++-7.3-2.96.110
libstdc++-devel-3.2-7
timidity++-2.11.3-4
gcc-c++-3.2-7
gtk+-1.2.10-22
gtk+-devel-1.2.10-22
compat-libstdc++-devel-7.3-2.96.110
libstdc++-3.2-7
compat-libstdc++-7.3-2.96.110
[herrold@oldnews yum-0.9.3]$ rpm -qa | grep [\*]
[herrold@oldnews yum-0.9.3]$
	)

-------------------

The geek in me would like A -- particularly if it carries the 
anchor "^"  -- but C is what I think it is.

Could the man page answer this question, please?

-- Russ Herrold




[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux