Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1936222 - Confusing report of conflicting file during attempted upgrade of R-shiny
Summary: Confusing report of conflicting file during attempted upgrade of R-shiny
Keywords:
Status: ON_QA
Alias: None
Product: Fedora
Classification: Fedora
Component: R-shiny
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Elliott Sales de Andrade
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1936422
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-07 18:43 UTC by Bill Crawford
Modified: 2021-06-29 01:29 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Bill Crawford 2021-03-07 18:43:14 UTC
Description of problem:
Multiple reports of a "file ... from install of ... conflicts with from package ..." where the conflict is either with the older version of the package, or an unrelated (afaik) package which has similar files but in a different location (which thus should not be "conflicting" at all).

Version-Release number of selected component (if applicable):
4.6.1-1.fc33.noarch

Affected / involved packages:
R-shiny-1.5.0-1.fc33~bootstrap.noarch
R-shiny-1.5.0-3.fc33~bootstrap.noarch
xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch

How reproducible:
Try to apply all updates (dnf upgrade).

Steps to Reproduce:
1. Try to run dnf --refresh upgrade --allowerasing
2. ... strange error message ...
3. Confusion.

Actual results:

Error: Transaction test error:
  file /usr/share/R/library/shiny/www/shared/jqueryui/images/ui-icons_444444_256x240.png from install of R-shiny-1.5.0-3.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/images/ui-icons_555555_256x240.png from install of R-shiny-1.5.0-3.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/images/ui-icons_777620_256x240.png from install of R-shiny-1.5.0-3.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/images/ui-icons_777777_256x240.png from install of R-shiny-1.5.0-3.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/images/ui-icons_cc0000_256x240.png from install of R-shiny-1.5.0-3.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/images/ui-icons_ffffff_256x240.png from install of R-shiny-1.5.0-3.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/jquery-ui.css from install of R-shiny-1.5.0-3.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/jquery-ui.js from install of R-shiny-1.5.0-3.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/jquery-ui.min.css from install of R-shiny-1.5.0-3.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/jquery-ui.min.js from install of R-shiny-1.5.0-3.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/jquery-ui.structure.css from install of R-shiny-1.5.0-3.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/jquery-ui.structure.min.css from install of R-shiny-1.5.0-3.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/jquery-ui.theme.css from install of R-shiny-1.5.0-3.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/jquery-ui.theme.min.css from install of R-shiny-1.5.0-3.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui from install of R-shiny-1.5.0-3.fc33~bootstrap.noarch conflicts with file from package R-shiny-1.5.0-1.fc33~bootstrap.noarch


Expected results:


Additional info:

Comment 1 Bill Crawford 2021-03-07 18:51:06 UTC
1. I ran ```rpm --rebuilddb``` to check the problem wasn't something corrupted in there.

2. I had run ```dnf clean all``` shortly before this, so there should be no contribution from corrupted files in /var/cache/dnf.

3. The problem persists after a ```dnf reinstall``` of both xstatic-jquery-ui-common and R-shiny.

Comment 2 Marek Blaha 2021-03-08 08:08:46 UTC
I briefly looked into it and it looks like:

1. R-shiny-1.5.0-1.fc33~bootstrap.noarch used to have dependency on xstatic-jquery-ui-common
2. during the installation R-shide does "unbundling things" - in this case replacing /usr/share/R/library/shiny/www/shared/jqueryui with a symlink to /usr/share/javascript/jquery_ui
3. the xstatic-jquery-ui-common requirement has been dropped in R-shiny-1.5.0-3.fc33~bootstrap.noarch

So R-shine is trying to replace a symlink with directory during upgrade from version 1.5.0-1 to 1.5.0-3 which is complicated - see https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/

I'm going to re-assign the issue to R-shine to deal with the problem. As a workaround - removal of the xstatic-jquery-ui-common and R-shiny packages and installing R-shiny-1.5.0-3.fc33~bootstrap.noarch from updates repo should work.

Comment 3 Bill Crawford 2021-03-08 08:59:15 UTC
Yes, I worked around it by removing the package then installing the new version (along with all the packages that depend on it :)).

The document solution (pre-trans lua scriptlet) should work fine.

Comment 4 Elliott Sales de Andrade 2021-05-19 09:15:30 UTC
I'm sorry, I have no idea how to fix this.

I followed the Directory replacement guidelines, and added the following scriptlet:

# Necessary to re-bundle jQuery UI, which was in an orphaned package. The
# symlink must be explicitly deleted to become a directory.
%pretrans -p <lua> -n R-%{packname}
path = "%{rlibdir}/%{packname}/www/shared/jqueryui"
st = posix.stat(path)
print(path)
print(st)
print(st.type)
if st and st.type == "link" then
  os.remove(path)
end

and I can see it is attached to the rpm:

$ rpm -q --scripts -p ./R-shiny-1.5.0-4.fc33~bootstrap.noarch.rpm
pretrans scriptlet (using <lua>):
path = "/usr/share/R/library/shiny/www/shared/jqueryui"
st = posix.stat(path)
print(path)
print(st)
print(st.type)
if st and st.type == "link" then
  os.remove(path)
end

but when I run it in mock, the scriptlet does not trigger before the transaction:

Dependencies resolved:
=======================================================================================================================================
 Package                            Architecture            Version                 Repository               Size
=======================================================================================================================================
Upgrading:
 R-shiny                            noarch                  1.5.0-4.fc33~bootstrap  @commandline             4.2 M

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

Total size: 4.2 M
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Error: Transaction test error:
  file /usr/share/R/library/shiny/www/shared/jqueryui/images/ui-icons_444444_256x240.png from install of R-shiny-1.5.0-4.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/images/ui-icons_555555_256x240.png from install of R-shiny-1.5.0-4.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/images/ui-icons_777620_256x240.png from install of R-shiny-1.5.0-4.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/images/ui-icons_777777_256x240.png from install of R-shiny-1.5.0-4.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/images/ui-icons_cc0000_256x240.png from install of R-shiny-1.5.0-4.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/images/ui-icons_ffffff_256x240.png from install of R-shiny-1.5.0-4.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/jquery-ui.css from install of R-shiny-1.5.0-4.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/jquery-ui.js from install of R-shiny-1.5.0-4.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/jquery-ui.min.css from install of R-shiny-1.5.0-4.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/jquery-ui.min.js from install of R-shiny-1.5.0-4.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/jquery-ui.structure.css from install of R-shiny-1.5.0-4.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/jquery-ui.structure.min.css from install of R-shiny-1.5.0-4.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/jquery-ui.theme.css from install of R-shiny-1.5.0-4.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch
  file /usr/share/R/library/shiny/www/shared/jqueryui/jquery-ui.theme.min.css from install of R-shiny-1.5.0-4.fc33~bootstrap.noarch conflicts with file from package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch

Comment 5 Edgar Hoch 2021-05-19 14:31:01 UTC
I think you should distinct between Fedora 33 and Fedora 34.

On Fedora 34, package python-XStatic-jquery-ui is orphaned and is not found in the repositories. So there should be no conflicts.

On Fedora 33, package xstatic-jquery-ui-common-1.12.0.1-12.fc33.noarch is in the release repository. It may be installed on Fedora 33 systems, and it is still installable.

I think, a solution might be to distinguish in the spec file whether building for Fedora 33 or Fedora 34 (with an if-then-else condition).
If the package is to be built for Fedora 33 or before, then the old code from R-shiny-1.5.0-1.fc33~bootstrap should be active in the spec file.
If the package is to be built for Fedora 34 or newer, then the new code from R-shiny-1.5.0-3.fc33~bootstrap should be active in the spec file.

You can do this by creating an update to R-shiny (e.g. version 1.5.0-4). Fedora 34 will get a new package, which contains the same files as the package before. Fedora 33 is effectively reverted to version 1.5.0-1 but with a higher version number.

%if (0%{?fedora} && 0%{?fedora} < 34)
... (old part)
%else
... (new part)
%endif

Comment 6 Elliott Sales de Andrade 2021-06-20 00:11:38 UTC
Unfortunately, I don't think that will help. If 1.5.0-3.fc33 -> 1.5.0-4.fc33 switches directories to symlinks, then I need a scriptlet to do that for people who installed -3, but that seems to be broken. And then for F34, I'll need to add the symlink->directory scriptlet, or that upgrade will not work. So some part of the upgrade will be broken somewhere.

I believe this is actually a problem in rpm itself, see bug 1936422.

Comment 7 Fedora Update System 2021-06-20 09:12:30 UTC
FEDORA-2021-dc90973959 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-dc90973959

Comment 8 Fedora Update System 2021-06-21 01:04:38 UTC
FEDORA-2021-dc90973959 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-dc90973959`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-dc90973959

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2021-06-29 01:29:31 UTC
FEDORA-2021-dc90973959 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.


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