Fix npm upgrade scriptlet

Fix unexpected trailing .1 in npm release field

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
This commit is contained in:
Stephen Gallagher 2018-07-20 13:15:26 -04:00
parent 3a8cc3a04b
commit 273c4600f6
No known key found for this signature in database
GPG key ID: 7A25556236BAA3A3

View file

@ -24,7 +24,7 @@
%global nodejs_patch 0 %global nodejs_patch 0
%global nodejs_abi %{nodejs_major}.%{nodejs_minor} %global nodejs_abi %{nodejs_major}.%{nodejs_minor}
%global nodejs_version %{nodejs_major}.%{nodejs_minor}.%{nodejs_patch} %global nodejs_version %{nodejs_major}.%{nodejs_minor}.%{nodejs_patch}
%global nodejs_release 3 %global nodejs_release 4
# == Bundled Dependency Versions == # == Bundled Dependency Versions ==
# v8 - from deps/v8/include/v8-version.h # v8 - from deps/v8/include/v8-version.h
@ -239,7 +239,7 @@ Development headers for the Node.js JavaScript runtime.
Summary: Node.js Package Manager Summary: Node.js Package Manager
Epoch: %{npm_epoch} Epoch: %{npm_epoch}
Version: %{npm_version} Version: %{npm_version}
Release: %{npm_release}%{?dist}.1 Release: %{npm_release}%{?dist}
# We used to ship npm separately, but it is so tightly integrated with Node.js # We used to ship npm separately, but it is so tightly integrated with Node.js
# (and expected to be present on all Node.js systems) that we ship it bundled # (and expected to be present on all Node.js systems) that we ship it bundled
@ -419,14 +419,17 @@ NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules:%{buildroot}%{_prefix}/lib/nod
%pretrans -n npm -p <lua> %pretrans -n npm -p <lua>
-- Remove all of the symlinks from the bundled npm node_modules directory -- Remove all of the symlinks from the bundled npm node_modules directory
-- This scriptlet can be removed in Fedora 31 -- This scriptlet can be removed in Fedora 31
for f in posix.files("%{_prefix}/lib/node_modules/npm/node_modules/") do base_path = "%{_prefix}/lib/node_modules/npm/node_modules/"
path = "%{_prefix}/lib/node_modules/npm/node_modules/"..f d_st = posix.stat(base_path)
if d_st then
for f in posix.files(base_path) do
path = base_path..f
st = posix.stat(path) st = posix.stat(path)
if st and st.type == "link" then if st and st.type == "link" then
os.remove(path) os.remove(path)
end end
end end
end
%files %files
%{_bindir}/node %{_bindir}/node
@ -481,6 +484,10 @@ end
%{_pkgdocdir}/npm/doc %{_pkgdocdir}/npm/doc
%changelog %changelog
* Fri Jul 20 2018 Stephen Gallagher <sgallagh@redhat.com> - 1:10.7.0-4
- Fix npm upgrade scriptlet
- Fix unexpected trailing .1 in npm release field
* Fri Jul 20 2018 Stephen Gallagher <sgallagh@redhat.com> - 1:10.7.0-3 * Fri Jul 20 2018 Stephen Gallagher <sgallagh@redhat.com> - 1:10.7.0-3
- Restore annotations to binaries - Restore annotations to binaries
- Fix unexpected trailing .1 in release field - Fix unexpected trailing .1 in release field