Bug 1936222

Summary: Confusing report of conflicting file during attempted upgrade of R-shiny
Product: [Fedora] Fedora Reporter: Bill Crawford <billcrawford1970>
Component: R-shinyAssignee: Elliott Sales de Andrade <quantum.analyst>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: dmach, edgar.hoch, jmracek, jrohel, mblaha, mhatina, packaging-team-maint, pkratoch, quantum.analyst, rpm-software-management, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-30 18:55:58 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:
Bug Depends On: 1936422    
Bug Blocks:    

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.

Comment 10 Ben Cotton 2021-11-04 13:53:03 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 11 Ben Cotton 2021-11-04 14:22:28 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Ben Cotton 2021-11-04 15:20:06 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 13 Ben Cotton 2021-11-30 18:55:58 UTC
Fedora 33 changed to end-of-life (EOL) status on 2021-11-30. Fedora 33 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.