Bug 1301306

Summary: DNF is treating an update from noarch to archful package incorrectly
Product: [Fedora] Fedora Reporter: Neal Gompa <ngompa13>
Component: dnfAssignee: rpm-software-management
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: low    
Version: 26CC: jmracek, kde-sig, mluscon, ngompa13, packaging-team-maint, pnemade, rdieter, vmukhame
Target Milestone: ---Keywords: EasyFix, Triaged, UserExperience
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-21 12:01: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
Debug solver data generated by DNF
none
Debug solver data generated by DNF after Rex's update to kaccount-providers none

Description Neal Gompa 2016-01-23 23:57:07 UTC
Created attachment 1117502 [details]
Debug solver data generated by DNF

Description of problem:
When performing my weekly "dnf --refresh update", I saw output indicating that it was going to update a noarch package (kaccounts-providers-15.08.2-1.fc23.noarch) to a 32-bit one (kaccounts-providers-15.12.1-1.fc23.i686). It also indicated it was skipping the update due to broken dependencies.

Version-Release number of selected component (if applicable):
1.1.5-1.fc23

How reproducible:
Always

Steps to Reproduce:
1. Have KDE installed (with KDE Applications 15.08 or older)
2. Try to update to KDE Applications 15.12.1

Actual results:
It attempts to update from the noarch one to the 32-bit one and winds up skipping it due to broken dependencies.

Expected results:
It should update from the noarch one to the 64-bit one successfully.

Comment 1 Rex Dieter 2016-01-24 00:41:35 UTC
Arg, this is actually a kaccounts-providers bug, I'll fix it (by fixing a typo in the package Obsoletes)

Comment 2 Rex Dieter 2016-01-24 01:04:46 UTC
OK, even with Obsoletes: in place, behavior seems to be the same.

$ sudo dnf update

Last metadata expiration check performed 2:15:10 ago on Sat Jan 23 16:48:52 2016.
Dependencies resolved.
=================================================================================================================================================================================
 Package                                           Arch                                 Version                                      Repository                             Size
=================================================================================================================================================================================
Upgrading:
 kaccounts-providers                               x86_64                               15.12.1-1.fc23                               updates                                38 k
Skipping packages with broken dependencies:
 kaccounts-providers                               i686                                 15.12.1-1.fc23                               updates                                39 k

Transaction Summary
=================================================================================================================================================================================
Upgrade  1 Package
Skip     1 Package

Comment 3 Neal Gompa 2016-01-24 16:43:26 UTC
Created attachment 1117635 [details]
Debug solver data generated by DNF after Rex's update to kaccount-providers

I've confirmed the behavior Rex saw after updating kaccount-providers and dumped the solver data again for analysis.

Comment 4 Honza Silhan 2016-01-25 13:19:47 UTC
The output from comment 2 is fine. What's the problem then?

Comment 5 Neal Gompa 2016-01-25 20:46:55 UTC
@Jan:

It shouldn't be attempting to pull in the 32-bit one. Or if the behavior is as intended, the visual output isn't necessarily obvious that everything is fine.

In the case of when a package becomes archful, it should automatically go from noarch to primary running arch. That is, it shouldn't attempt to install _all_ arches available to it.

Comment 6 Honza Silhan 2016-02-01 12:14:09 UTC
got it. Then it's visual issue.

Comment 7 Fedora Admin XMLRPC Client 2016-07-08 09:34:34 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Igor Gnatenko 2016-07-21 13:48:59 UTC
[brain@x1carbon debugdata]$ cat 1.t
repo system 0 testtags <inline>
#>=Pkg: foo 1 1 noarch
repo available 0 testtags <inline>
#>=Pkg: foo 2 1 x86_64
system x86_64 rpm system
poolflags implicitobsoleteusescolors
solverflags allowvendorchange allowuninstall keepexplicitobsoletes bestobeypolicy keeporphans yumobsoletes
job update all packages
[brain@x1carbon debugdata]$ testsolv 1.t
Transaction summary:

1 upgraded packages:
  - foo-1-1.noarch -> foo-2-1.x86_64

1 arch changes from noarch to x86_64:
    foo

from libsolv perspective everything is ok.

Can you still reproduce it?

Comment 9 Fedora End Of Life 2016-11-24 15:08:18 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Neal Gompa 2016-11-26 04:42:54 UTC
(In reply to Igor Gnatenko from comment #8)
> [brain@x1carbon debugdata]$ cat 1.t
> repo system 0 testtags <inline>
> #>=Pkg: foo 1 1 noarch
> repo available 0 testtags <inline>
> #>=Pkg: foo 2 1 x86_64
> system x86_64 rpm system
> poolflags implicitobsoleteusescolors
> solverflags allowvendorchange allowuninstall keepexplicitobsoletes
> bestobeypolicy keeporphans yumobsoletes
> job update all packages
> [brain@x1carbon debugdata]$ testsolv 1.t
> Transaction summary:
> 
> 1 upgraded packages:
>   - foo-1-1.noarch -> foo-2-1.x86_64
> 
> 1 arch changes from noarch to x86_64:
>     foo
> 
> from libsolv perspective everything is ok.
> 
> Can you still reproduce it?

The problem isn't in libsolv. The problem is that DNF doesn't show this correctly to the user.

That being said, I don't know if I can reproduce the issue at this time...

Comment 11 Fedora End Of Life 2017-02-28 09:53:04 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 12 Jaroslav Mracek 2017-07-21 12:01:08 UTC
It looks like that the problem was solved in dnf-2.6.2-1. It allows direct upgrade from noarch to x86_64 without any notest of i686 package (See below). 

TestA-0:1-1.noarch (installed)
TestA-0:2-1.i686 (obsoletes TestA < 2)
TestA-0:2-1.x86_64 (obsoletes TestA < 2)
[root@efdb33909b8f /]# dnf upgrade
Last metadata expiration check: 0:03:21 ago on Fri Jul 21 11:53:56 2017.
Dependencies resolved.
================================================================================
 Package           Arch               Version           Repository         Size
================================================================================
Upgrading:
 TestA             x86_64             2-1               base2             5.5 k

Transaction Summary
================================================================================
Upgrade  1 Package