Bug 1787079

Summary: python3-notebook fails on upgrade, replacing symbolic link with directory, recommended scriptlet doesn't work
Product: [Fedora] Fedora Reporter: George R. Goffe <grgoffe>
Component: python-notebookAssignee: Miro Hrončok <mhroncok>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 32CC: igor.raits, mhroncok, mjw, packaging-team-maint, pmatilai, pmoravco, pviktori, python-sig, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: fedora-obsolete-packages-32-41, python-notebook-6.0.2-4.fc32 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-17 01:44:36 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:

Description George R. Goffe 2019-12-30 20:03:37 UTC
Description of problem: Attempting to upgrade this system produced conflict messages for python3-notebook. There is NO category for this "package" in the bugzilla.


Version-Release number of selected component (if applicable):
python3-notebook-6.0.2-1.fc32.noarch

How reproducible:
always

Steps to Reproduce:
1.dnf upgrade --best --allowerasing
2.
3.

Actual results:
see below

Expected results:
clean and successful system upgrade

Additional info:
Error: Transaction test error:
file /usr/lib/python3.8/site-packages/notebook/static/components/moment/min/locales.js from install of python3-notebook-6.0.2-2.fc32.noarchconflicts with file from package js-moment-2.18.1-6.fc30.noarch
file /usr/lib/python3.8/site-packages/notebook/static/components/moment/min/moment-with-locales.js from install of python3-notebook-6.0.2-2.fc32.noarch conflicts with file from package js-moment-2.18.1-6.fc30.noarch
file /usr/lib/python3.8/site-packages/notebook/static/components/moment/moment.js from install of python3-notebook-6.0.2-2.fc32.noarch conflicts with file from package js-moment-2.18.1-6.fc30.noarch
file /usr/lib/python3.8/site-packages/notebook/static/components/moment from install of python3-notebook-6.0.2-2.fc32.noarch conflicts withfile from package python3-notebook-6.0.2-1.fc32.noarch

Comment 1 Miro Hrončok 2019-12-31 09:56:13 UTC
Oh my. I know what this is. It is https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/

Comment 3 Ben Cotton 2020-02-11 17:38:40 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 4 Petr Viktorin (pviktori) 2020-02-19 13:27:18 UTC
Hello RPM maintainers,
Could you look at the list thread, and see if you can help explain what's happening? https://lists.fedoraproject.org/archives/list/packaging@lists.fedoraproject.org/thread/YWJWLXKLF6DGT7LITBC766QW7RY7OOPM/

Comment 5 Miro Hrončok 2020-03-07 00:57:30 UTC
Please, help us get this fixed. Is this a bug in RPM?

Comment 6 George R. Goffe 2020-03-07 09:08:54 UTC
Miro,

I don't see js-moment in the repos for FC33. Has It been dropped? Am I missing something?

It's not on my system either.

George...

Comment 7 Miro Hrončok 2020-03-07 10:09:14 UTC
Yes, retired. You can grab it form Koji to simulate the problem.

Install js-moment from https://koji.fedoraproject.org/koji/buildinfo?buildID=1193942
Install python3-notebook <= 6.0.2-1

Try to upgrade to https://src.fedoraproject.org/rpms/python-notebook/pull-request/17

Comment 8 Panu Matilainen 2020-03-12 13:46:01 UTC
The catch here is that the offending js-moment package isn't being removed in the transaction, so in my view rpm has a fair reason to complain: it's one thing to allow replacing content from a package that's being removed, and quite something else when it's not. Obsolete js-moment and the pretrans scriptlet will start working.

Comment 9 Miro Hrončok 2020-03-12 13:56:03 UTC
Oh well. Will test. Thanks.

Comment 10 Panu Matilainen 2020-03-12 13:59:19 UTC
Oh and BTW, I'm the first to agree there's an unhealthy amount of magic involved in all this. 

The fact that yum/dnf does an extra test transaction is what makes things so complicated: the conflict needs to be eliminated before the transaction can proceed, but obviously a test-transaction cannot run the script which would do so. So there's a funky heuristic that lets the conflict be ignored on test-transactions when the moon is full and the stars are aligned just so to let this case through.

Comment 11 Miro Hrončok 2020-03-12 14:27:15 UTC
> Will test.

It gets the job done. Thanks.

Comment 12 George R. Goffe 2020-03-12 20:47:55 UTC
Miro,

I have been having system problems and just got back online last night. Apparently my post was lost in the explosion. Sigh.

I got all the pkgs that I think that I need to test this.

-rw-r--r--. 1 root root  119956 Feb  1  2019 js-moment-2.18.1-6.fc30.noarch.rpm === installed ok
-rw-r--r--. 1 root root   21772 Feb  1  2019 nodejs-moment-2.18.1-6.fc30.noarch.rpm === installed ok
-rw-r--r--. 1 root root 2008423 Jul 26  2019 python3-notebook-5.7.8-2.fc31.noarch.rpm === will not install on fc33
-rw-r--r--. 1 root root 2329448 Jan 30 05:43 python3-notebook-6.0.2-3.fc32.noarch.rpm

rpm -q js-moment nodejs-moment
js-moment-2.18.1-6.fc30.noarch
nodejs-moment-2.18.1-6.fc30.noarch


I couldn't find a FC32 directory in archives.fedoraproject.org so I couldn't find the rpm  for python3-notebook referenced above. Do you know where I can find that? I have found a Live system at FC32. Do you think that rpm would be there?

Are there instructions on how to run this test by any chance? Otherwise I think I'm ready to go.

Best regards,

George...

Comment 13 Miro Hrončok 2020-03-12 21:05:40 UTC
The update where this i fixed is at https://bodhi.fedoraproject.org/updates/FEDORA-2020-395c85562a

Comment 14 George R. Goffe 2020-03-12 21:31:00 UTC
Miro,

So, you no longer need me to test this?

George...

Comment 15 Miro Hrončok 2020-03-12 21:38:48 UTC
You can test the update in updates-testing and provide karma. But other than that, no. Thank you.

Comment 16 Fedora Update System 2020-03-13 18:33:17 UTC
fedora-obsolete-packages-32-41, python-notebook-6.0.2-4.fc32 has been pushed to the Fedora 32 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-395c85562a

Comment 17 Fedora Update System 2020-03-17 01:44:36 UTC
fedora-obsolete-packages-32-41, python-notebook-6.0.2-4.fc32 has been pushed to the Fedora 32 stable repository. If problems still persist, please make note of it in this bug report.