Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1510867 - Update fails due to file conflict
Summary: Update fails due to file conflict
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: mariadb-connector-c
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Michal Schorm
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-08 10:53 UTC by Mattias Ellert
Modified: 2017-11-08 14:23 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-08 11:04:01 UTC


Attachments (Terms of Use)

Description Mattias Ellert 2017-11-08 10:53:36 UTC
Description of problem:

Updating from mariadb-connector-c-3.0.2-11 to a later version fails due to a file conflict:

# rpm -q mariadb-connector-c mariadb-connector-c-devel
mariadb-connector-c-3.0.2-11.fc28.x86_64
mariadb-connector-c-devel-3.0.2-11.fc28.x86_64
# dnf update ./mariadb-connector-c-3.0.2-18.fc28.x86_64.rpm ./mariadb-connector-c-devel-3.0.2-18.fc28.x86_64.rpm
Last metadata expiration check: 1:10:13 ago on Wed Nov  8 10:29:35 2017.
Dependencies resolved.
================================================================================
 Package                      Arch      Version           Repository       Size
================================================================================
Upgrading:
 mariadb-connector-c          x86_64    3.0.2-18.fc28     @commandline    138 k
 mariadb-connector-c-devel    x86_64    3.0.2-18.fc28     @commandline     59 k

Transaction Summary
================================================================================
Upgrade  2 Packages

Total size: 198 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Error: Transaction check error:
  file /usr/lib64/mariadb from install of mariadb-connector-c-3.0.2-18.fc28.x86_64 conflicts with file from package mariadb-connector-c-devel-3.0.2-11.fc28.x86_64

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


The problem is that the the pretrans scriplet is in the wrong package. It is in mariadb-connector-c-devel but should be in mariadb-connector-c.

After rebuilding the package with the following change:

$ diff -u mariadb-connector-c.spec.orig mariadb-connector-c.spec
--- mariadb-connector-c.spec.orig	2017-11-02 00:44:17.000000000 +0100
+++ mariadb-connector-c.spec	2017-11-08 11:31:07.379769526 +0100
@@ -109,7 +109,7 @@
 
 
 # https://fedoraproject.org/wiki/Packaging:Directory_Replacement
-%pretrans -p <lua> devel
+%pretrans -p <lua>
 path = "%{_libdir}/mariadb"
 st = posix.stat(path)
 if st and st.type == "link" then

the update works as expected:

# dnf update ./mariadb-connector-c-3.0.2-18.fc28.x86_64.rpm ./mariadb-connector-c-devel-3.0.2-18.fc28.x86_64.rpm 
Last metadata expiration check: 1:10:29 ago on Wed Nov  8 10:29:35 2017.
Dependencies resolved.
================================================================================
 Package                      Arch      Version           Repository       Size
================================================================================
Upgrading:
 mariadb-connector-c          x86_64    3.0.2-18.fc28     @commandline    138 k
 mariadb-connector-c-devel    x86_64    3.0.2-18.fc28     @commandline     59 k

Transaction Summary
================================================================================
Upgrade  2 Packages

Total size: 197 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Running scriptlet: mariadb-connector-c-3.0.2-18.fc28.x86_64               1/1 
  Preparing        :                                                        1/1 
  Upgrading        : mariadb-connector-c-3.0.2-18.fc28.x86_64               1/4 
  Running scriptlet: mariadb-connector-c-3.0.2-18.fc28.x86_64               1/4 
  Upgrading        : mariadb-connector-c-devel-3.0.2-18.fc28.x86_64         2/4 
  Cleanup          : mariadb-connector-c-devel-3.0.2-11.fc28.x86_64         3/4 
  Cleanup          : mariadb-connector-c-3.0.2-11.fc28.x86_64               4/4 
  Running scriptlet: mariadb-connector-c-3.0.2-11.fc28.x86_64               4/4 
  Verifying        : mariadb-connector-c-3.0.2-18.fc28.x86_64               1/4 
  Verifying        : mariadb-connector-c-devel-3.0.2-18.fc28.x86_64         2/4 
  Verifying        : mariadb-connector-c-3.0.2-11.fc28.x86_64               3/4 
  Verifying        : mariadb-connector-c-devel-3.0.2-11.fc28.x86_64         4/4 

Upgraded:
  mariadb-connector-c.x86_64 3.0.2-18.fc28                                      
  mariadb-connector-c-devel.x86_64 3.0.2-18.fc28                                

Complete!


Version-Release number of selected component (if applicable):

mariadb-connector-c-3.0.2-12 to mariadb-connector-c-3.0.2-18

How reproducible:

Always

Steps to Reproduce:
1. See above

Actual results:

Update fails due to file conflict.

Expected results:

Successful update.

Comment 1 Michal Schorm 2017-11-08 11:04:01 UTC
Thanks for heads up!

Here it builds:
https://koji.fedoraproject.org/koji/taskinfo?taskID=22991817

I'm gonna fix it through all branches.


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