Bug 1370520

Summary: libsolv dependency gets wrong version of provided package.
Product: [Fedora] Fedora Reporter: Piotr Gbyliczek <peemhq>
Component: libsolvAssignee: rpm-software-management
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 23CC: ignatenko, mls, mluscon, peemhq, pnemade, rpm-software-management, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-29 11:25:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
debugdata none

Description Piotr Gbyliczek 2016-08-26 14:33:00 UTC
Description of problem:

Ii seems that dependency resolver in F23 is doing poor job on epoch : 

Error: package kde-workspace-3:4.11.22-13.fc23.x86_64 obsoletes kdeplasma-addons >= 5.0 provided by kdeplasma-addons-3:4.14.3-7.fc23.x86_64

This should not be the case, as the package does not provide such version : 

# rpmspec -q --provides SPECS/kdeplasma-addons.spec 

kdeplasma-addons = 3:4.14.3-7.fc23
kdeplasma-addons(x86-64) = 3:4.14.3-7.fc23
plasma-dataengine-comic = 4.14.3-7.fc23
plasma-dataengine-microblog = 4.14.3-7.fc23
plasma-dataengine-ocs = 4.14.3-7.fc23
plasma-dataengine-potd = 4.14.3-7.fc23
plasma-icontasks = 1.0
plasma-runner-events = 0.3.0-100
kdeplasma-addons-libs = 3:4.14.3-7.fc23
kdeplasma-addons-libs(x86-64) = 3:4.14.3-7.fc23
kdeplasma-addons-devel = 3:4.14.3-7.fc23
kdeplasma-addons-devel(x86-64) = 3:4.14.3-7.fc23
plasma-applet-kimpanel = 3:4.14.3-7.fc23
plasma-applet-kimpanel(x86-64) = 3:4.14.3-7.fc23
plasma-wallpaper-marble = 3:4.14.3-7.fc23
plasma-wallpaper-marble(x86-64) = 3:4.14.3-7.fc23
kdeplasma-addons-debuginfo = 3:4.14.3-7.fc23
kdeplasma-addons-debuginfo(x86-64) = 3:4.14.3-7.fc23

specs available here : 

https://bitbucket.org/peemhq/kde4-fedora


How reproducible:
Always

Steps to Reproduce:
1. Install minimal Fedora 23
2. Install "KDE Plasma Workspaces" group
3. Enable copr repository (peem/kde4/fedora)
4. Attempt to install kde-workspace and kdeplasma-addons (with --allowerasing --best).

Actual results:
packages not installed

Expected results:
packages installed

Additional info:

Comment 1 Igor Gnatenko 2016-08-26 15:42:41 UTC
provide debugdata generated by dnf using --debugsolver option.

Comment 2 Piotr Gbyliczek 2016-08-26 16:33:41 UTC
kde-workspace.spec : 

  Obsoletes: kdeplasma-addons >= 5.0


This seems to be the issue, but I'm having hard time to understand why kdeplasma-addons = 3:4.14.3-7.fc23 is seen as higher version than 5.0

Comment 3 Piotr Gbyliczek 2016-08-26 16:37:46 UTC
Created attachment 1194416 [details]
debugdata

Comment 4 Igor Gnatenko 2016-08-26 17:45:15 UTC
(In reply to Piotr Gbyliczek from comment #2)
> kde-workspace.spec : 
> 
>   Obsoletes: kdeplasma-addons >= 5.0
> 
> 
> This seems to be the issue, but I'm having hard time to understand why
> kdeplasma-addons = 3:4.14.3-7.fc23 is seen as higher version than 5.0
3:4.14 > 5.0
3:4.14 < 3:5.0

Comment 5 Piotr Gbyliczek 2016-08-30 08:49:02 UTC
(In reply to Igor Gnatenko from comment #4)
> (In reply to Piotr Gbyliczek from comment #2)
> > kde-workspace.spec : 
> > 
> >   Obsoletes: kdeplasma-addons >= 5.0
> > 
> > 
> > This seems to be the issue, but I'm having hard time to understand why
> > kdeplasma-addons = 3:4.14.3-7.fc23 is seen as higher version than 5.0
> 3:4.14 > 5.0
> 3:4.14 < 3:5.0

So basically epoch is no longer the tool to override the versioning for those who need older version of a package ? 

Up until now epoch was working for me on version check, but not on Obsolete, which allowed the above. 

It has worked that way in F23 up until recently, and it is still working in F22, so why the change ? 

And what is the best way to achieve older version obsoleting newer ? 

Regards,
Piotr

Comment 6 Igor Gnatenko 2016-08-30 09:00:39 UTC
repo system 0 testtags <inline>
#>=Pkg: kdeplasma-addons 3:4.14.3 7 x86_64
repo available 0 testtags <inline>
#>=Pkg: kde-workspace 3:4.11.22 13 x86_64
#>=Obs: kdeplasma-addons >= 5.0
system x86_64 rpm system
poolflags implicitobsoleteusescolors
solverflags allowvendorchange keepexplicitobsoletes bestobeypolicy keeporphans yumobsoletes
job update all packages
result transaction

Transaction summary:

1 upgraded packages:
  - kdeplasma-addons-3:4.14.3-7.x86_64 -> kde-workspace-3:4.11.22-13.x86_64


So what's the problem?

Comment 7 Piotr Gbyliczek 2016-08-30 11:44:34 UTC
Hi, 

The problem is that kde-workspace 3:4.11.22 13 x86_64 package obsoletes parts of plasma 5+ to avoid conflicts, but now it as well obsoletes a required kdeplasma-addons-3:4.14.3-7.x86_64, because 3:4.14 > 5.0. 

Even when install kdeplasma-addons by hand, installing kde-workspace attempts to remove it. 

And I'm sure that arouns F23 release it was that the above equation was honoured only on upgrade, not on obsoletes, cause I've managed to build and install all packages from my repo.

So I'm trying to find out what is going on, and if it is not a bug, what would be right way to install both packages concurrently. 

Regards,
Piotr

Comment 8 Igor Gnatenko 2016-08-30 11:49:15 UTC
> obsoletes parts of plasma 5+ to avoid conflicts
there is Conflicts tag in RPM

I would recommend ask devel.o to get recommendations.

Comment 9 Piotr Gbyliczek 2016-08-30 12:48:45 UTC
Hi Igor, 

Conflicts does not solve my problem, as I need to uninstall a package that is most likely installed in the system (part of kde plasma, which my repo tries to replace with an older kde4 version).

If I understand it correctly, when I replace Obsoletes with Conflicts, then my package will be never installed, unless user removes all conflicting packages itself. Which is not something I would like to have user to go through. 

Anyway, I have reported it as a bug, because this behaviour is wrong in my opinion, and it was not the case earlier in F23. Since this is not seen as a bug by Fedora developers, we are running in circles now.

I'll try to get this working, with help on IRC hopefully, if not then I'll make install info to use remove command for all replaced packages. 

Thanks for your time. 

Regards,
Piotr

Comment 10 Igor Gnatenko 2016-08-30 12:50:32 UTC
(In reply to Piotr Gbyliczek from comment #9)
> Hi Igor, 
> 
> Conflicts does not solve my problem, as I need to uninstall a package that
> is most likely installed in the system (part of kde plasma, which my repo
> tries to replace with an older kde4 version).
> 
> If I understand it correctly, when I replace Obsoletes with Conflicts, then
> my package will be never installed, unless user removes all conflicting
> packages itself. Which is not something I would like to have user to go
> through. 
> 
> Anyway, I have reported it as a bug, because this behaviour is wrong in my
> opinion, and it was not the case earlier in F23. Since this is not seen as a
> bug by Fedora developers, we are running in circles now.
> 
> I'll try to get this working, with help on IRC hopefully, if not then I'll
> make install info to use remove command for all replaced packages. 
there is option --allowerasing in dnf.

Comment 11 Michael Schröder 2016-09-01 08:41:37 UTC
Regarding comment #5: libsolv has to do what rpm does, and rpm always considered the epoch when looking at obsoletes. Maybe yum had a bug in that regard.