Bug 1486771

Summary: cannot install icu-debuginfo or webkitgtk4-debuginfo - file conflicts
Product: Red Hat Enterprise Linux 7 Reporter: Tomas Hudziec <thudziec>
Component: webkitgtk4Assignee: Tomas Popela <tpopela>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: james.antill, lmiksik, tpelka, tpopela
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: webkitgtk4-2.16.6-6.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 10:32:31 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:
Embargoed:
Attachments:
Description Flags
output from yum install none

Description Tomas Hudziec 2017-08-30 14:03:19 UTC
Created attachment 1320104 [details]
output from yum install

Description of problem:
Cannot install webkitgtk4-debuginfo or icu-debuginfo due to file conflicts between them.

Version-Release number of selected component (if applicable):
icu-debuginfo-50.1.2-15.el7.s390x
webkitgtk4-debuginfo-2.16.6-2.el7.s390x

How reproducible:
always

Steps to Reproduce:
1. sudo yum install webkitgtk4-debuginfo
2. sudo yum install icu-debuginfo
3.

Actual results:
errors:
file /usr/src/debug/icu/source/common/appendable.cpp from install of icu-debuginfo-50.1.2-15.el7.s390x conflicts with file from package webkitgtk4-debuginfo-2.16.6-2.el7.s390x
see whole log in attachment

Expected results:
smooth installation

Additional info:

Comment 2 Tomas Hudziec 2017-09-11 14:48:03 UTC
It is probably due to bundled icu within webkitgtk4.

Comment 3 Tomas Pelka 2017-09-12 07:58:15 UTC
Actually as tpopela pointed out this happen not only on s390 but on all supported arches.

Comment 4 Tomas Popela 2017-09-12 10:43:03 UTC
So we were thinking about possible solutions.

1. Add a conflict between webkitgtk4-debuginfo and icu-debuginfo, but that would not help that much as calling debuginfo-install webkitgtk4 would end with error as some packages will require icu-debuginfo (to satisfy i.e. glib2 debuginfo requirements) as well as webkitgtk4-debuginfo in one transaction - conflict. Basically this won't change anything.

2. Remove icu files from webkitgtk4-debuginfo. On paper the easiest solution, but I didn't found a way how to do so. Compiling the bundled icu with -g0 still includes the icu files in webkitgtk4-debuginfo package. I thought that they are some macros for filtering the included files (like for requires/provides filtering), but it looks like there is none.

3. Call this bug a "feature" until this is solved on the rpm/rpmbuild level. As I think that webkitgtk4 is not the only package that is bundling some library (more specifically the same library that is provided by the system, but newer version).  

I will change the component to rpm, as from the webkitgtk4 maintainer POV, there is nothing I can't do right now.

Comment 5 Tomas Popela 2017-09-13 07:18:30 UTC
OK, so here is a really ugly way how to achieve solution number 2.

diff --git a/webkitgtk4.spec b/webkitgtk4.spec
index 96aec16..235a9f0 100644
--- a/webkitgtk4.spec
+++ b/webkitgtk4.spec
@@ -212,6 +212,19 @@ Requires:       %{name} = %{version}-%{release}
 %description    plugin-process-gtk2
 Support for the GTK+ 2 based NPAPI plugins (such as Adobe Flash) for %{name}.

+%define debug_package %{nil}
+%global __debug_package 1
+
+%package debuginfo
+Summary: Debug information for package %{name}
+
+%description debuginfo
+This package provides debug information for package %{name}.
+Debug information is useful when developing applications that use this
+package or when debugging this package.
+
+%files debuginfo -f debugfiles.list
+
 %prep
 %if 0%{?bundle_icu}
 %setup -q -T -n icu -b 1
@@ -383,6 +396,10 @@ popd
 %add_to_license_files Source/WTF/wtf/dtoa/COPYING
 %add_to_license_files Source/WTF/wtf/dtoa/LICENSE

+%check
+sed -i '\!/usr/src/debug/icu!d' debugfiles.list
+rm -rf %{buildroot}/usr/src/debug/icu
+
 %post -p /sbin/ldconfig
 %postun -p /sbin/ldconfig
 %post jsc -p /sbin/ldconfig

But I really don't like it, nor I don't know if it's not causing some other problems, but the webkitgtk4-debuginfo does not contain the icu files anymore.

Comment 6 Tomas Popela 2017-11-07 12:45:52 UTC
There is another solution that is actually used by valgrind mentioned at
https://lists.fedoraproject.org/archives/list/devel%40lists.fedoraproject.org/message/RQEIXS6WDORE2AAAWHPUD6WGQVMCY6KW/

Comment 7 Tomas Popela 2017-11-08 08:49:10 UTC
In the end I implemented the solution mentioned in the comment 6.

Comment 12 errata-xmlrpc 2018-04-10 10:32:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0703