Bug 1277697 - dnf puts multiple versions of the same package in the RPM database, leading to upgrade failures
Summary: dnf puts multiple versions of the same package in the RPM database, leading t...
Keywords:
Status: CLOSED DUPLICATE of bug 1284981
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 24
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-03 20:53 UTC by Ömer Fadıl Usta
Modified: 2016-08-22 11:38 UTC (History)
16 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-22 11:11:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ömer Fadıl Usta 2015-11-03 20:53:26 UTC
Error: Transaction check error:
  file /usr/share/doc/glibc/NEWS from install of glibc-2.22.90-13.fc24.i686 conflicts with file from package glibc-2.22.90-11.fc24.x86_64
  file /usr/share/doc/glibc/INSTALL from install of glibc-2.22.90-13.fc24.i686 conflicts with file from package glibc-2.22.90-11.fc24.x86_64

Comment 1 Ömer Fadıl Usta 2015-11-04 22:37:10 UTC
I need glibc both i686 and x86_64

Comment 2 Florian Weimer 2015-11-05 06:34:18 UTC
(In reply to Ömer Fadıl Usta from comment #0)
> Error: Transaction check error:
>   file /usr/share/doc/glibc/NEWS from install of glibc-2.22.90-13.fc24.i686
> conflicts with file from package glibc-2.22.90-11.fc24.x86_64
>   file /usr/share/doc/glibc/INSTALL from install of
> glibc-2.22.90-13.fc24.i686 conflicts with file from package
> glibc-2.22.90-11.fc24.x86_64

This does not seem to be a multilib conflict, but an incomplete upgrade.  Can you tell us the dnf command line you used, and show us the complete output?

Comment 3 Ömer Fadıl Usta 2015-11-05 12:49:21 UTC
sudo dnf install glibc.i686
Failed to synchronize cache for repo 'mongodb-org-3.0' from 'https://repo.mongodb.org/yum/redhat/24/mongodb-org/3.0/x86_64/': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried, disabling.
Last metadata expiration check performed 2:29:48 ago on Thu Nov  5 13:18:00 2015.
Dependencies resolved.
===============================================================================================================================
 Package                              Arch                   Version                           Repository                 Size
===============================================================================================================================
Installing:
 glibc                                i686                   2.22.90-13.fc24                   rawhide                   4.4 M
 nss-softokn-freebl                   i686                   3.20.1-1.fc24                     rawhide                   196 k

Transaction Summary
===============================================================================================================================
Install  2 Packages

Total size: 4.5 M
Installed size: 16 M
Is this ok [y/N]: y
Downloading Packages:
[SKIPPED] glibc-2.22.90-13.fc24.i686.rpm: Already downloaded                                                                  
[SKIPPED] nss-softokn-freebl-3.20.1-1.fc24.i686.rpm: Already downloaded                                                       
Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache till the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Transaction check error:
  file /usr/share/doc/glibc/INSTALL from install of glibc-2.22.90-13.fc24.i686 conflicts with file from package glibc-2.22.90-11.fc24.x86_64
  file /usr/share/doc/glibc/NEWS from install of glibc-2.22.90-13.fc24.i686 conflicts with file from package glibc-2.22.90-11.fc24.x86_64

Error Summary
-------------

Comment 4 Florian Weimer 2015-11-05 13:06:15 UTC
(In reply to Ömer Fadıl Usta from comment #3)
> sudo dnf install glibc.i686

Can you try upgrading glibc first?  I expect this will work.  If true, this would be a dnf UI issue.

Comment 5 Ömer Fadıl Usta 2015-11-05 20:06:21 UTC
What you mean upgrade ? glibc.i686 didn't installed before. So this is not a upgrade.
But i have found that 
glibc-common-2.22.90-11.fc24.x86_64
glibc-2.22.90-11.fc24.x86_64 
and 
glibc-common-2.22.90-13.fc24.x86_64
glibc-2.22.90-13.fc24.x86_64

Installed together. I don't know why glibc-2.22-90-13 didn't remove -10 to upgrade itself.


After i remove 
glibc-common-2.22.90-11.fc24.x86_64
glibc-2.22.90-11.fc24.x86_64 

I can install .i686 without any problem. I never guest it before it might be 2 different version of glibc x86 might be installed in same time.

So it looks like problem solved. If anyone hit same bug please check if 2 differen version of glibc installed or not

Result : Problem solved

Comment 6 Jan Kurik 2016-02-24 13:54:10 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 7 guoxiao 2016-08-22 04:36:32 UTC
Same problem here.

If glibc i686 and x86-64 are both installed, a conflict will occur while upgrading.

Error: Transaction check error:
  file /usr/share/doc/glibc/NEWS from install of glibc-2.23.1-10.fc24.i686 conflicts with file from package glibc-2.23.1-8.fc24.x86_64

We must remove glibc-2.23.1-8.fc24.x86_64 manually and retry upgrading to solve the problem.

Comment 8 Florian Weimer 2016-08-22 06:14:51 UTC
(In reply to guoxiao from comment #7)
> Same problem here.
> 
> If glibc i686 and x86-64 are both installed, a conflict will occur while
> upgrading.
> 
> Error: Transaction check error:
>   file /usr/share/doc/glibc/NEWS from install of glibc-2.23.1-10.fc24.i686
> conflicts with file from package glibc-2.23.1-8.fc24.x86_64
> 
> We must remove glibc-2.23.1-8.fc24.x86_64 manually and retry upgrading to
> solve the problem.

Do you use yum?

Comment 9 guoxiao 2016-08-22 06:36:47 UTC
(In reply to Florian Weimer from comment #8)
> (In reply to guoxiao from comment #7)
> > Same problem here.
> > 
> > If glibc i686 and x86-64 are both installed, a conflict will occur while
> > upgrading.
> > 
> > Error: Transaction check error:
> >   file /usr/share/doc/glibc/NEWS from install of glibc-2.23.1-10.fc24.i686
> > conflicts with file from package glibc-2.23.1-8.fc24.x86_64
> > 
> > We must remove glibc-2.23.1-8.fc24.x86_64 manually and retry upgrading to
> > solve the problem.
> 
> Do you use yum?

I used dnf in Fedora 24. The following is the full output:

% sudo dnf update glibc
Last metadata expiration check: 0:29:01 ago on Mon Aug 22 12:02:34 2016.
Dependencies resolved.
==================================================================================================================================
 Package                     Arch                       Version                               Repository                     Size
==================================================================================================================================
Upgrading:
 glibc                       i686                       2.23.1-10.fc24                        updates                       4.3 M

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

Total download size: 4.3 M
Is this ok [y/N]: y
Downloading Packages:
glibc-2.23.1-8.fc24_2.23.1-10.fc24.i686.drpm                                                      455 kB/s | 668 kB     00:01    
/var/cache/dnf/updates-c4f1c95f64c2b794/packages/glibc-2.23.1-8.fc24_2.23.1-10.fc24.i686.drpm: md5 mismatch of result
glibc-2.23.1-10.fc24.i686: Delta RPM rebuild failed
glibc-2.23.1-10.fc24.i686.rpm                                                                     2.4 MB/s | 4.3 MB     00:01    
----------------------------------------------------------------------------------------------------------------------------------
Total                                                                                             578 kB/s | 4.9 MB     00:08     
Delta RPMs reduced 4.3 MB of updates to 4.9 MB (-15.1% saved)
Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Transaction check error:
  file /usr/share/doc/glibc/NEWS from install of glibc-2.23.1-10.fc24.i686 conflicts with file from package glibc-2.23.1-8.fc24.x86_64

Error Summary
-------------

Comment 10 Florian Weimer 2016-08-22 06:46:47 UTC
Thanks.  What is the output from this command?

rpm -q glibc glibc-common

Comment 11 guoxiao 2016-08-22 06:48:33 UTC
(In reply to Florian Weimer from comment #10)
> Thanks.  What is the output from this command?
> 
> rpm -q glibc glibc-common

% rpm -q glibc glibc-common
glibc-2.23.1-10.fc24.x86_64
glibc-2.23.1-10.fc24.i686
glibc-common-2.23.1-10.fc24.x86_64

Comment 12 guoxiao 2016-08-22 06:51:47 UTC
(In reply to guoxiao from comment #11)
> (In reply to Florian Weimer from comment #10)
> > Thanks.  What is the output from this command?
> > 
> > rpm -q glibc glibc-common
> 
> % rpm -q glibc glibc-common
> glibc-2.23.1-10.fc24.x86_64
> glibc-2.23.1-10.fc24.i686
> glibc-common-2.23.1-10.fc24.x86_64

I manually removed glibc-2.23.1-8.fc24.x86_64 and successfully upgraded glibc. So there are only glibc-2.23.1-10 now on my machine.

Comment 13 Florian Weimer 2016-08-22 06:56:41 UTC
(In reply to Ömer Fadıl Usta from comment #5)
> What you mean upgrade ? glibc.i686 didn't installed before. So this is not a
> upgrade.
> But i have found that 
> glibc-common-2.22.90-11.fc24.x86_64
> glibc-2.22.90-11.fc24.x86_64 
> and 
> glibc-common-2.22.90-13.fc24.x86_64
> glibc-2.22.90-13.fc24.x86_64
> 
> Installed together. I don't know why glibc-2.22-90-13 didn't remove -10 to
> upgrade itself.

This happens if you hit Ctrl-C during an update, for instance.  dnf does not cope well with this situation.  Per comment 12, guoxiao's issue is the same.

dnf should not allow multiple installations of several versions of glibc, or explain the situation and offer the system administrator to recover.  Either way, this is a dnf bug.  Reassigning.

Comment 14 guoxiao 2016-08-22 07:02:13 UTC
(In reply to guoxiao from comment #12)
> (In reply to guoxiao from comment #11)
> > (In reply to Florian Weimer from comment #10)
> > > Thanks.  What is the output from this command?
> > > 
> > > rpm -q glibc glibc-common
> > 
> > % rpm -q glibc glibc-common
> > glibc-2.23.1-10.fc24.x86_64
> > glibc-2.23.1-10.fc24.i686
> > glibc-common-2.23.1-10.fc24.x86_64
> 
> I manually removed glibc-2.23.1-8.fc24.x86_64 and successfully upgraded
> glibc. So there are only glibc-2.23.1-10 now on my machine.

By running `dnf history info` I found the info of the failed transaction. glibc-2.23.1-8.fc24.x86_64 and glibc-2.23.1-8.fc24.x86_64 were both installed before upgrading.

Transaction ID : 834
Begin time     : Sat Aug 20 23:30:19 2016
Begin rpmdb    : 3024:bfdf051d04ee8fc06b7a926318026815c293ac64
User           : admin <admin>
Return-Code    : ** Aborted **
Command Line   : update
Transaction performed with:
    Downgraded    dnf-1.1.9-2.fc24.noarch         @updates-testing
    Installed     rpm-4.13.0-0.rc1.27.fc24.x86_64 @updates-testing
Packages Altered:
 ** Upgrade  dnf-1.1.10-1.fc24.noarch                                        @updates
 ** Upgraded dnf-1.1.9-2.fc24.noarch                                         @updates-testing
 ** Upgrade  dnf-automatic-1.1.10-1.fc24.noarch                              @updates
 ** Upgraded dnf-automatic-1.1.9-2.fc24.noarch                               @updates-testing
 ** Upgrade  dnf-conf-1.1.10-1.fc24.noarch                                   @updates
 ** Upgraded dnf-conf-1.1.9-2.fc24.noarch                                    @updates-testing
 ** Upgraded dnf-plugins-core-0.1.21-2.fc24.noarch                           @updates-testing
 ** Upgrade                   0.1.21-3.fc24.noarch                           @updates
 ** Upgrade  dnf-yum-1.1.10-1.fc24.noarch                                    @updates
 ** Upgraded dnf-yum-1.1.9-2.fc24.noarch                                     @updates-testing
 ** Upgraded firewalld-0.4.3.2-1.fc24.noarch                                 @updates
 ** Upgrade            0.4.3.3-1.fc24.noarch                                 @updates
 ** Upgraded firewalld-filesystem-0.4.3.2-1.fc24.noarch                      @updates
 ** Upgrade                       0.4.3.3-1.fc24.noarch                      @updates
 ** Upgrade  glibc-2.23.1-10.fc24.i686                                       @updates
    Upgrade  glibc-2.23.1-10.fc24.x86_64                                     @updates
 ** Upgraded glibc-2.23.1-8.fc24.i686                                        @updates
 ** Upgraded glibc-2.23.1-8.fc24.x86_64                                      @updates
    Upgrade  glibc-all-langpacks-2.23.1-10.fc24.x86_64                       (unknown)
 ** Upgraded glibc-all-langpacks-2.23.1-8.fc24.x86_64                        @updates
    Upgrade  glibc-common-2.23.1-10.fc24.x86_64                              @updates
 ** Upgraded glibc-common-2.23.1-8.fc24.x86_64                               @updates
 ** Upgrade  glibc-devel-2.23.1-10.fc24.x86_64                               @updates
 ** Upgraded glibc-devel-2.23.1-8.fc24.x86_64                                @updates
 ** Upgrade  glibc-headers-2.23.1-10.fc24.x86_64                             @updates
 ** Upgraded glibc-headers-2.23.1-8.fc24.x86_64                              @updates
 ** Upgrade  glibc-static-2.23.1-10.fc24.x86_64                              @updates
 ** Upgraded glibc-static-2.23.1-8.fc24.x86_64                               @updates
 ** Upgraded google-chrome-unstable-54.0.2824.0-1.x86_64                     @google-chrome
 ** Upgrade                         54.0.2832.2-1.x86_64                     @google-chrome
 ** Upgraded nss-3.25.0-1.2.fc24.x86_64                                      @updates
 ** Upgrade      3.26.0-1.0.fc24.x86_64                                      @updates
 ** Upgraded nss-softokn-3.25.0-1.0.fc24.x86_64                              @updates
 ** Upgrade              3.26.0-1.0.fc24.x86_64                              @updates
 ** Upgraded nss-softokn-freebl-3.25.0-1.0.fc24.i686                         @updates
 ** Upgraded nss-softokn-freebl-3.25.0-1.0.fc24.x86_64                       @updates
 ** Upgrade                     3.26.0-1.0.fc24.i686                         @updates
    Upgrade                     3.26.0-1.0.fc24.x86_64                       (unknown)
 ** Upgraded nss-sysinit-3.25.0-1.2.fc24.x86_64                              @updates
 ** Upgrade              3.26.0-1.0.fc24.x86_64                              @updates
 ** Upgraded nss-tools-3.25.0-1.2.fc24.x86_64                                @updates
 ** Upgrade            3.26.0-1.0.fc24.x86_64                                @updates
 ** Upgraded nss-util-3.25.0-1.0.fc24.x86_64                                 @updates
    Upgrade           3.26.0-1.0.fc24.x86_64                                 (unknown)
 ** Upgrade  python3-dnf-1.1.10-1.fc24.noarch                                @updates
 ** Upgraded python3-dnf-1.1.9-2.fc24.noarch                                 @updates-testing
 ** Upgraded python3-dnf-plugins-core-0.1.21-2.fc24.noarch                   @updates-testing
 ** Upgrade                           0.1.21-3.fc24.noarch                   @updates
 ** Upgraded python3-firewall-0.4.3.2-1.fc24.noarch                          @updates
 ** Upgrade                   0.4.3.3-1.fc24.noarch                          @updates
 ** Upgraded systemd-229-12.fc24.x86_64                                      @updates
 ** Upgrade          229-13.fc24.x86_64                                      (unknown)
 ** Upgraded systemd-compat-libs-229-12.fc24.x86_64                          @updates
 ** Upgrade                      229-13.fc24.x86_64                          @updates
 ** Upgraded systemd-container-229-12.fc24.x86_64                            @updates
 ** Upgrade                    229-13.fc24.x86_64                            @updates
 ** Upgraded systemd-devel-229-12.fc24.x86_64                                @updates
 ** Upgrade                229-13.fc24.x86_64                                @updates
 ** Upgraded systemd-libs-229-12.fc24.x86_64                                 @updates
    Upgrade               229-13.fc24.x86_64                                 (unknown)
 ** Upgraded systemd-udev-229-12.fc24.x86_64                                 @updates
 ** Upgrade               229-13.fc24.x86_64                                 @updates
 ** Upgraded NetworkManager-1:1.2.2-2.fc24.x86_64                            @updates
 ** Upgrade                 1:1.2.4-2.fc24.x86_64                            @updates
 ** Upgraded NetworkManager-adsl-1:1.2.2-2.fc24.x86_64                       @updates
 ** Upgrade                      1:1.2.4-2.fc24.x86_64                       @updates
 ** Upgraded NetworkManager-bluetooth-1:1.2.2-2.fc24.x86_64                  @updates
 ** Upgrade                           1:1.2.4-2.fc24.x86_64                  @updates
 ** Upgraded NetworkManager-config-connectivity-fedora-1:1.2.2-2.fc24.x86_64 @updates
 ** Upgrade                                            1:1.2.4-2.fc24.x86_64 @updates
 ** Upgraded NetworkManager-glib-1:1.2.2-2.fc24.x86_64                       @updates
 ** Upgrade                      1:1.2.4-2.fc24.x86_64                       @updates
 ** Upgraded NetworkManager-libnm-1:1.2.2-2.fc24.x86_64                      @updates
 ** Upgrade                       1:1.2.4-2.fc24.x86_64                      @updates
 ** Upgraded NetworkManager-team-1:1.2.2-2.fc24.x86_64                       @updates
 ** Upgrade                      1:1.2.4-2.fc24.x86_64                       @updates
 ** Upgraded NetworkManager-wifi-1:1.2.2-2.fc24.x86_64                       @updates
 ** Upgrade                      1:1.2.4-2.fc24.x86_64                       @updates
 ** Upgraded NetworkManager-wwan-1:1.2.2-2.fc24.x86_64                       @updates
 ** Upgrade                      1:1.2.4-2.fc24.x86_64                       @updates

Comment 15 Ömer Fadıl Usta 2016-08-22 07:08:29 UTC
(In reply to Florian Weimer from comment #13)

> This happens if you hit Ctrl-C during an update, for instance.  dnf does not
> cope well with this situation.  Per comment 12, guoxiao's issue is the same.
> 
> dnf should not allow multiple installations of several versions of glibc, or
> explain the situation and offer the system administrator to recover.  Either
> way, this is a dnf bug.  Reassigning.



For the record i never interrupt any installation or update/upgrade operation either with ctrl-c/d/x nor with with any electricity issue.

The interesting thing is that only glibc package caused these problems in all of installed packages.


I don't have any fedora installed box right now so i couldn't reproduce same or simular bug again.


[btw sorry about my english]

Comment 16 Igor Gnatenko 2016-08-22 11:11:48 UTC

*** This bug has been marked as a duplicate of bug 1284981 ***

Comment 17 Florian Weimer 2016-08-22 11:38:20 UTC
(In reply to Igor Gnatenko from comment #16)
> 
> *** This bug has been marked as a duplicate of bug 1284981 ***

I'm not sure if this is appropriate.  Even if the “restore” plugin existed, the user would not know it is needed in this situation.


Note You need to log in before you can comment on or make changes to this bug.