Bug 1351007 - nodejs should provides npm and obsolete npm-3.5.4-5.fc24.noarch
Summary: nodejs should provides npm and obsolete npm-3.5.4-5.fc24.noarch
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: nodejs
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: NodeJS Packaging SIG
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1339284 (view as bug list)
Depends On: 1096506
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-29 02:49 UTC by Sergio Basto
Modified: 2017-04-18 06:46 UTC (History)
17 users (show)

Fixed In Version: nodejs-4.5.0-1.fc24 nodejs-6.4.0-102.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-24 13:50:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Sergio Basto 2016-06-29 02:49:09 UTC
Description of problem:
when rpm spec requires npm in a ock build I got 

error: package npm-3.5.4-5.fc24.noarch requires nodejs(engine), but none of the providers can be installed

reading npm last commit that nodejs bundle npm , seems to me , that nodejs rpm spec also should have [1]

Provides: oldpackagename = $provEVR
Obsoletes: oldpackagename < $obsEVR

[1] 
https://fedoraproject.org/wiki/Packaging:Guidelines#Renaming.2FReplacing_Existing_Packages


Version-Release number of selected component (if applicable):
nodejs-4.4.6-2.fc24

How reproducible:
add BuildRequires: npm in one .spec file .

Comment 1 Tom Hughes 2016-06-29 06:13:33 UTC
It already does:

bericote [~] % rpm -q --provides nodejs 
npm = 1:2.15.5
npm(npm) = 2.15.5
bericote [~] % rpm -q --obsoletes nodejs
npm < 0:3.5.4-6

Discussion of the actual problem is here:

https://lists.fedoraproject.org/archives/list/nodejs@lists.fedoraproject.org/thread/ZVMIY5LM5HXGWCP7FTZCLTAAEKPVHNMW/

Comment 2 Stephen Gallagher 2016-06-29 11:45:12 UTC
I suspect the problem may actually be the virtual 'Provides: npm(npm)' since we
had to drop the epoch on that for other reasons. Since that virtual Provides
went backwards and other packages in the transaction have explicit "Requires:
npm(npm) >= something" in them, DNF is trying to pull in the package that
satisfies the highest version of that virtual dependency available.

At this point, I think we have three choices:

1) Hope that the NPM bundled in Node.js eventually updates past 3.5.4 (unlikely).

2) Figure out how to fix the automatic dependency generation so that it's aware
and tolerant of epochs.

3) Drop the bundled NPM from Node.js in F24 only, create an updated NPM package
(bundled, to avoid the dependency nightmare) providing the version we're going
to have in Fedora 25 (and tracking it). Then when F25 rolls around, it will get dropped on upgrade. We will just have to make sure that the release field on F25 is always at least one higher than on F24 so we can bump the Obsoletes safely.

I think 3) is the best choice. People will get newer NPM features (and NPM is
backwards-compatible), and it still lets us kill off the separate NPM package in
F25.

Comment 3 Tom Hughes 2016-06-29 11:47:58 UTC
Sergio - can you clarify what your spec was requiring? Was it "npm" or "npm(npm)" that you were requiring?

Comment 4 Sergio Basto 2016-06-29 13:18:02 UTC
is "BuildRequires: npm" ,  it easy to reproduce : 


mock -r fedora-24-x86_64 --init
mock -r fedora-24-x86_64 --install nodejs npm

Error: package npm-3.5.4-5.fc24.noarch requires nodejs(engine), but none of the providers can be installed
(try to add '--allowerasing' to command line to replace conflicting packages)

Comment 5 Stephen Gallagher 2016-06-29 13:53:29 UTC
(In reply to Sergio Monteiro Basto from comment #4)
> is "BuildRequires: npm" ,  it easy to reproduce : 
> 
> 
> mock -r fedora-24-x86_64 --init
> mock -r fedora-24-x86_64 --install nodejs npm
> 
> Error: package npm-3.5.4-5.fc24.noarch requires nodejs(engine), but none of
> the providers can be installed
> (try to add '--allowerasing' to command line to replace conflicting packages)

That at least looks like we're hitting https://bugzilla.redhat.com/show_bug.cgi?id=1096506 which is about DNF's Obsoletes handling not dealing properly with a new Provides: packagename while the old one is also in the enabled repositories.

I'm linking this bug to that one.

Comment 6 Tom Hughes 2016-07-09 06:47:25 UTC
*** Bug 1339284 has been marked as a duplicate of this bug. ***

Comment 7 Satoshi Yagi 2016-07-09 20:22:55 UTC
Why can't we kill off the NPM rpm from F24?  Node.js RPM already provides npm that installs cleanly, no?

Comment 8 Tom Hughes 2016-07-09 23:01:28 UTC
Packages can't be retired from released versions.

Comment 9 Satoshi Yagi 2016-07-10 03:35:44 UTC
In that case, I agree that the option 3 suggested by Stephen Gallagher is the best option going forward.

Comment 10 Sergio Basto 2016-07-10 03:49:09 UTC
(In reply to Stephen Gallagher from comment #2)
> I suspect the problem may actually be the virtual 'Provides: npm(npm)' since
> we had to drop the epoch on that for other reasons. 

https://pkgs.fedoraproject.org/cgit/rpms/nodejs.git/tree/nodejs.spec?h=f24 
says:

# Do not add epoch to the virtual NPM provides or it will break
# the automatic dependency-generation script.
Provides: npm(npm) = %{npm_version}

why or how Provides: npm(npm) = %{epoch}:%{npm_version} breaks things ? I'm not seeing the problem

Comment 11 Satoshi Yagi 2016-07-10 06:10:39 UTC
> why or how Provides: npm(npm) = %{epoch}:%{npm_version} breaks things ? I'm
> not seeing the problem

I don't think it does.  The real issue here is more of this:

> bericote [~] % rpm -q --obsoletes nodejs
> npm < 0:3.5.4-6

As of this writing, my attempt to install npm tries 0:3.5.4-5, which is obsoleted by the spec above.  I wonder what happens when npm RPM gets past 0:3.5.4-6 and it would no longer be obsoleted by nodejs.

In any event, npm being provided by two packages is confusing and I'd still suggest npm be ripped out of nodejs RPM so that nodejs and npm RPMs can both be installed side-by-side.

Comment 12 Fedora Update System 2016-08-10 18:51:47 UTC
nodejs-4.4.7-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-4bdfc3814d

Comment 13 Fedora Update System 2016-08-10 19:08:54 UTC
nodejs-6.3.1-100.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-4c2ba7374b

Comment 14 Fedora Update System 2016-08-11 16:56:57 UTC
nodejs-6.3.1-100.fc25 has been pushed to the Fedora 25 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-2016-4c2ba7374b

Comment 15 Fedora Update System 2016-08-12 03:03:27 UTC
nodejs-4.4.7-3.fc24 has been pushed to the Fedora 24 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-2016-4bdfc3814d

Comment 16 Fedora Update System 2016-08-16 19:05:52 UTC
nodejs-6.3.1-101.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-1dbf4ecb44

Comment 17 Fedora Update System 2016-08-16 19:06:14 UTC
nodejs-4.4.7-4.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-320d68efc7

Comment 18 Fedora Update System 2016-08-17 19:54:14 UTC
nodejs-6.3.1-101.fc25 has been pushed to the Fedora 25 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-2016-1dbf4ecb44

Comment 19 Fedora Update System 2016-08-18 01:52:28 UTC
nodejs-4.4.7-4.fc24 has been pushed to the Fedora 24 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-2016-320d68efc7

Comment 20 Fedora Update System 2016-08-18 13:39:48 UTC
nodejs-4.5.0-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-d77212291e

Comment 21 Fedora Update System 2016-08-18 14:00:50 UTC
nodejs-6.4.0-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-3e93f6e67a

Comment 22 Fedora Update System 2016-08-18 16:53:52 UTC
nodejs-6.4.0-1.fc25 has been pushed to the Fedora 25 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-2016-3e93f6e67a

Comment 23 Fedora Update System 2016-08-19 00:59:04 UTC
nodejs-4.5.0-1.fc24 has been pushed to the Fedora 24 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-2016-d77212291e

Comment 24 Fedora Update System 2016-08-24 06:44:47 UTC
nodejs-6.4.0-102.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-da53dbccd6

Comment 25 Fedora Update System 2016-08-24 07:53:33 UTC
nodejs-6.4.0-102.fc25 has been pushed to the Fedora 25 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-2016-da53dbccd6

Comment 26 Fedora Update System 2016-08-24 13:50:28 UTC
nodejs-4.5.0-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 27 Fedora Update System 2016-08-30 18:18:46 UTC
nodejs-6.4.0-102.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, 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.