Bug 234761

Summary: yum shell 'config exclude' does not work
Product: [Fedora] Fedora Reporter: Carl Roth <roth>
Component: yumAssignee: James Antill <james.antill>
Status: CLOSED CANTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6Keywords: Reopened
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 3.0.6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-08-03 19:33:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
command output from 'yum shell'
none
command output from 'yum shell' none

Description Carl Roth 2007-04-01 16:53:23 UTC
Description of problem:

The 'config exclude' command in the yum shell does not behave the same as the
'--exclude' command-line option to yum.  It appears to be excluding too much of
the transaction set (usually all of it).  Attached is output from a shell
session to illustrate.

Version-Release number of selected component (if applicable):

yum-3.0.5-1.fc6
(this is the latest version that includes a fix for my other 'config exclude' bug)

How reproducible:


Steps to Reproduce:
1. run 'yum shell'
2. type 'upgrade'
3. type 'config exclude XXX'
4. type 'upgrade'

Actual results:

Too many (usually, all) packages are excluded.

Expected results:


Additional info:

Comment 1 Carl Roth 2007-04-01 16:53:23 UTC
Created attachment 151391 [details]
command output from 'yum shell'

Comment 2 Jeremy Katz 2007-04-25 18:05:28 UTC
This seems to work better with yum 3.0.6

Comment 3 Carl Roth 2007-04-25 21:02:51 UTC
Created attachment 153458 [details]
command output from 'yum shell'

Comment 4 Carl Roth 2007-04-25 21:04:57 UTC
How do you define "better" here?  I upgrade to the latest yum-3.0.6-1.fc6, and
the behavior is essentially the same.  See the attached command log (153458).

Comment 5 Seth Vidal 2007-04-25 21:54:19 UTC
I can't replicate this on 3.0.X from cvs and the changes from there to 3.0.6 are
pretty small.

is there anything else at play here? Are you sure you only have one version of
yum installed and nothing in your python lookup paths.

Comment 6 Carl Roth 2007-04-26 18:16:11 UTC
This was an interesting bug to track down.  I scrubbed my yum environment and
isolated the issue to the particular way I have my yum.conf and yum repositories
configured w.r.t the 'exclude' option.

* I set 'reposdir' in yum.conf to point to multiple directories of repo files. 
I do this so that I can maintain a directory of dynamic repository config files
(to support laptop roaming etc. and other userland edits)

  [main]
  ...
  reposdir=/etc/yum.repos.d, /srv/yum/repos.d
  ...

* I list the same YUM channel ('updates' in this case) in multiple repository
files spread across multiple directories.  for example:

  /etc/yum/fedora-updates.repo
  /srv/yum/repos.d/updates.repo

  Both files refer to the 'updates' channel; the second 'updates.repo' file
contains incremental configuration options ('enabled', 'exclude', 'proxy',
etc.).  Yum is supposed to scour each of the directories and overlay the
repository settings, and this works for the most part.

* I list the 'exclude' option in each copy of the 'updates' channel definition.
 My goal here was to specify an updated 'exclude' list in a repository config
file that's sourced later in the process, so that I could override any previous
settings.

To make a long story short, listing the 'exclude' setting multiple times seems
to mess with the yum shell.  If I use the same 'exclude' list, the 'config
exclude' shell command works:

  In /etc/yum.repos.d/fedora-updates.repo:
  [updates]
  ...
  exclude=kernel-* qemu-*
  ...

  In /srv/yum/repos.d/updates.repo:
  [updates]
  ...
  exclude=kernel-* qemu-*

If I try to override the 'exclude' setting, it doesn't work:

  In /etc/yum.repos.d/fedora-updates.repo:
  [updates]
  ...
  exclude=kernel-* qemu-*
  ...

  In /srv/yum/repos.d/updates.repo:
  [updates]
  ...
  exclude=any-package-name

Can some one comment on the expected behavior of using 'reposdir' to overlay
repository settings?  Is this supposed to work?  Is the 'updates' tag handled
differently?


Comment 7 Seth Vidal 2007-08-03 19:33:56 UTC
mulitiple repos with the same [name] are not allowed and the results will be
erratic, at best. this is a cantfix,