Bug 479889

Summary: RFE: Change yum obsoletes behaviour to take a single obsoleter
Product: [Fedora] Fedora Reporter: Bill Nottingham <notting>
Component: yumAssignee: Seth Vidal <skvidal>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: ffesti, james.antill, katzj, pmatilai, rvokal, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-09 21:47:27 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:

Description Bill Nottingham 2009-01-13 20:53:13 UTC
yum-3.2.20-5.fc10.noarch
PackageKit-yum-0.3.12-1.fc10.x86_64

I have installed (and in my local repo): 

redhat-logos-5.9-1.fc10 (a custom package)

It provides: 
P: system-logos = 10

It obsoletes:

O: fedora-logos (unversioned)

I have in my repo:

fedora-logos-10.0.1-2.fc10

P: system-logos-10.0.1-2.fc10
P: redhat-logos-10.0.1-2.fc10
O: redhat-logos

and also:

generic-logos-10.0.2-1.fc10

P: system-logos-10.0.2-1.fc10
P: redhat-logos-10.0.2-1.fc10
O: redhat-logos

I do a yum upgrade:

...
"blacklist" plugin is disabled
"whiteout" plugin is disabled
Loaded plugins: refresh-packagekit
Repository 'foo' is missing name in configuration, using id
Yum Version: 3.2.20
COMMAND: yum -d5 upgrade 
Installroot: /
Setting up Package Sacks
Reading Local RPMDB
Setting up Upgrade Process
Building updates object
Updating Everything
Resolving Dependencies
--> Running transaction check
---> Package fedora-logos.noarch 0:10.0.1-2.fc10 set to be updated
Checking deps for fedora-logos.noarch 0-10.0.1-2.fc10 - u
looking for (u'/bin/sh', None, (None, None, None)) as a requirement of fedora-logos.noarch 0-10.0.1-2.fc10 - u
looking for (u'coreutils', None, (None, None, None)) as a requirement of fedora-logos.noarch 0-10.0.1-2.fc10 - u
Checking deps for redhat-logos.noarch 0-5.9-1.fc10 - None
---> Package generic-logos.noarch 0:10.0.2-1.fc10 set to be updated
Checking deps for generic-logos.noarch 0-10.0.2-1.fc10 - u
--> Processing Conflict: generic-logos conflicts fedora-logos
generic-logos conflicts with fedora-logos
--> Finished Dependency Resolution
Dependency Process ending
generic-logos-10.0.2-1.fc10.noarch from updates has depsolving problems
  --> generic-logos conflicts with fedora-logos
Depsolve time: 1.334
Error: generic-logos conflicts with fedora-logos

So, I decided to skip broken, and:

Yum Version: 3.2.20
COMMAND: yum -d5 --skip-broken upgrade 
Installroot: /
Setting up Package Sacks
pkgsack time: 0.004
Reading Local RPMDB
rpmdb time: 0.000
Setting up Upgrade Process
Building updates object
up:Obs Init time: 0.466
up:simple updates time: 0.204
up:obs time: 0.005
up:condense time: 0.000
updates time: 2.251
Updating Everything
Resolving Dependencies
--> Running transaction check
---> Package fedora-logos.noarch 0:10.0.1-2.fc10 set to be updated
Checking deps for fedora-logos.noarch 0-10.0.1-2.fc10 - u
looking for (u'/bin/sh', None, (None, None, None)) as a requirement of fedora-logos.noarch 0-10.0.1-2.fc10 - u
looking for (u'coreutils', None, (None, None, None)) as a requirement of fedora-logos.noarch 0-10.0.1-2.fc10 - u
Checking deps for redhat-logos.noarch 0-5.9-1.fc10 - None
---> Package generic-logos.noarch 0:10.0.2-1.fc10 set to be updated
Checking deps for generic-logos.noarch 0-10.0.2-1.fc10 - u
--> Processing Conflict: generic-logos conflicts fedora-logos
generic-logos conflicts with fedora-logos
--> Finished Dependency Resolution
Dependency Process ending
generic-logos-10.0.2-1.fc10.noarch from updates has depsolving problems
  --> generic-logos conflicts with fedora-logos
Skip-broken round 1
TSINFO: Current Transaction : 3 member(s) 
  obsoleted   : redhat-logos-5.9-1.fc10.noarch 
                   obsoletedby : fedora-logos-10.0.1-2.fc10.noarch
  obsoleting  : generic-logos-10.0.2-1.fc10.noarch 
                   obsoletes : redhat-logos-5.9-1.fc10.noarch
  obsoleting  : fedora-logos-10.0.1-2.fc10.noarch 
                   obsoletes : redhat-logos-5.9-1.fc10.noarch
SKIPBROKEN: removing generic-logos-10.0.2-1.fc10.noarch from pkgSack & updates
SKIPBROKEN: removing redhat-logos-5.9-1.fc10.noarch from transaction
SKIPBROKEN: removing generic-logos-10.0.2-1.fc10.noarch from transaction
--> Running transaction check
---> Package fedora-logos.noarch 0:10.0.1-2.fc10 set to be updated
Checking deps for fedora-logos.noarch 0-10.0.1-2.fc10 - u
looking for (u'/bin/sh', None, (None, None, None)) as a requirement of fedora-logos.noarch 0-10.0.1-2.fc10 - u
looking for (u'coreutils', None, (None, None, None)) as a requirement of fedora-logos.noarch 0-10.0.1-2.fc10 - u
--> Processing Conflict: redhat-logos conflicts fedora-logos
Package: fedora-logos-10.0.1-2.fc10.noarch  - already in transaction set
--> Restarting Dependency Resolution with new changes.
---> Loop Number: 3
Restarting Loop
--> Running transaction check
Checking deps for redhat-logos.noarch 0-5.9-1.fc10 - None
--> Finished Dependency Resolution
Dependency Process ending
SKIPBROKEN: sanity check the current transaction
--> Running transaction check
Checking deps for redhat-logos.noarch 0-5.9-1.fc10 - None
---> Package fedora-logos.noarch 0:10.0.1-2.fc10 set to be updated
Checking deps for fedora-logos.noarch 0-10.0.1-2.fc10 - u
looking for (u'/bin/sh', None, (None, None, None)) as a requirement of fedora-logos.noarch 0-10.0.1-2.fc10 - u
looking for (u'coreutils', None, (None, None, None)) as a requirement of fedora-logos.noarch 0-10.0.1-2.fc10 - u
--> Finished Dependency Resolution
Dependency Process ending
Skip-broken took 1 rounds 

Packages skipped because of dependency problems:
    generic-logos-10.0.2-1.fc10.noarch from updates
TSINFO: Current Transaction : 2 member(s) 
  obsoleted   : redhat-logos-5.9-1.fc10.noarch 
                   obsoletedby : fedora-logos-10.0.1-2.fc10.noarch
  obsoleting  : fedora-logos-10.0.1-2.fc10.noarch 
                   obsoletes : redhat-logos-5.9-1.fc10.noarch
Skip-Broken time: 1.621
Depsolve time: 2.957

Dependencies Resolved

================================================================================
 Package              Arch          Version                Repository      Size
================================================================================
Installing:
 fedora-logos         noarch        10.0.1-2.fc10          fedora         1.8 M
     replacing  redhat-logos.noarch 5.9-1.fc10

Skipped (dependency problems):
 generic-logos        noarch        10.0.2-1.fc10          updates        1.0 M

Transaction Summary
================================================================================
Install      1 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         

Total download size: 1.8 M

If I accept this, fedora-logos is installed, and the next yum upgrade will install redhat-logos back over top of it.

If I try to upgrade via PackageKit, I get:

...
Packages are not compatible

Multiple packages exist that are not compatible with each other. This is usually due to mixing packages from different software sources.

ERROR with rpm_check_debug vs depsolve:
fedora-logos conflicts with generic-logos-10.0.2-1.fc10.noarch
Please report this error at http://yum.baseurl.org/report
...

which is weird, since it should either error out at the first depcheck, or succeed.

Comment 1 Bill Nottingham 2009-01-13 20:53:43 UTC
The assumption is that the obsoletes/provides in redhat-logos is wrong. However, I'm still not sure why yum is trying to replace it with *both* conflicting packages.

Comment 2 James Antill 2009-01-13 22:23:06 UTC
I've added an upstream test case, and yeh ... both things that obsolete get installed currently, which I'm pretty sure isn't what we want (so testcase is failing atm.). But I'm not 100% sure on that (pulling extra stuff in is usually N1 obsoletes O and requires N2 ... but I'm not sure that we don't have N1 and N2 obsolete O as well).

Comment 3 James Antill 2009-01-13 22:40:02 UTC
Seth is pretty confident that we should allow two things to obsolete 1 (and thus. bring both in). So a nicer error message would probably be nice, but I'm not sure how easy that'll be.

Comment 4 seth vidal 2009-01-13 22:48:38 UTC
B/c I like making you crazy.

I can look at it from a different perspective.

Multiple obsoleters of a single pkg is just like multiple providers of a single dep.

so we throw the pkgs at compare_providers and take the result.


I know, I'm sorry.

Comment 5 James Antill 2009-01-19 20:49:40 UTC
yes, this BZ is impossible to search for in my email :p

Comment 6 James Antill 2009-01-19 20:52:43 UTC
So things I've seen today which depend on the old behaviour:

liberation-fonts (meta. pkg and sub pkg both obsolete old normal pkg)
tcp_wrappers (tcp_wrappers, *-devel, and *-libs all obsolete old tcp_wrappers -- yes, it obsoletes an old version of itself).

Comment 7 James Antill 2009-06-09 21:47:27 UTC
Pretty sure this is a WONTFIX, at least atm.