mirror of
https://src.fedoraproject.org/rpms/nodejs18.git
synced 2024-11-28 11:06:08 +00:00
Fix NPM pretrans scriptlet
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
This commit is contained in:
parent
46cd672b99
commit
29f2860fc3
1 changed files with 5 additions and 3 deletions
|
@ -27,7 +27,7 @@
|
|||
%global nodejs_patch 0
|
||||
%global nodejs_abi %{nodejs_major}.%{nodejs_minor}
|
||||
%global nodejs_version %{nodejs_major}.%{nodejs_minor}.%{nodejs_patch}
|
||||
%global nodejs_release 1
|
||||
%global nodejs_release 2
|
||||
|
||||
# == Bundled Dependency Versions ==
|
||||
# v8 - from deps/v8/include/v8-version.h
|
||||
|
@ -419,16 +419,18 @@ rm -f %{buildroot}/%{_defaultdocdir}/node/lldb_commands.py \
|
|||
NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules:%{buildroot}%{_prefix}/lib/node_modules/npm/node_modules %{buildroot}/%{_bindir}/node -e "require(\"assert\").equal(require(\"npm\").version, '%{npm_version}')"
|
||||
|
||||
|
||||
%pretrans -p <lua>
|
||||
%pretrans -n npm -p <lua>
|
||||
-- Remove all of the symlinks from the bundled npm node_modules directory
|
||||
-- This scriptlet can be removed in Fedora 31
|
||||
for f in posix.files("%{_prefix}/lib/node_modules/npm/node_modules/") do
|
||||
st = posix.stat(f)
|
||||
path = "%{_prefix}/lib/node_modules/npm/node_modules/"..f
|
||||
st = posix.stat(path)
|
||||
if st and st.type == "link" then
|
||||
os.remove(path)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
%files
|
||||
%{_bindir}/node
|
||||
%dir %{_prefix}/lib/node_modules
|
||||
|
|
Loading…
Reference in a new issue