Bug 1277697 - dnf puts multiple versions of the same package in the RPM database, leading to upgrade failures
dnf puts multiple versions of the same package in the RPM database, leading t...
Status: CLOSED DUPLICATE of bug 1284981
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
24
Unspecified Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: rpm-software-management
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-03 15:53 EST by Ömer Fadıl Usta
Modified: 2016-08-22 07:38 EDT (History)
16 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-22 07:11:48 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ömer Fadıl Usta 2015-11-03 15:53:26 EST
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 17:37:10 EST
I need glibc both i686 and x86_64
Comment 2 Florian Weimer 2015-11-05 01:34:18 EST
(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 07:49:21 EST
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 08:06:15 EST
(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 15:06:21 EST
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 08:54:10 EST
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 00:36:32 EDT
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 02:14:51 EDT
(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 02:36:47 EDT
(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 02:46:47 EDT
Thanks.  What is the output from this command?

rpm -q glibc glibc-common
Comment 11 guoxiao 2016-08-22 02:48:33 EDT
(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 02:51:47 EDT
(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 02:56:41 EDT
(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 03:02:13 EDT
(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 03:08:29 EDT
(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 07:11:48 EDT

*** This bug has been marked as a duplicate of bug 1284981 ***
Comment 17 Florian Weimer 2016-08-22 07:38:20 EDT
(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.