mirror of
https://src.fedoraproject.org/rpms/nodejs18.git
synced 2024-11-24 09:42:43 +00:00
Fix issue with NPM docs being replaced with a symlink
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
This commit is contained in:
parent
d6b10f9a6b
commit
83b7eb4ea0
1 changed files with 34 additions and 2 deletions
36
nodejs.spec
36
nodejs.spec
|
@ -8,7 +8,7 @@
|
|||
# This is used by both the nodejs package and the npm subpackage thar
|
||||
# has a separate version - the name is special so that rpmdev-bumpspec
|
||||
# will bump this rather than adding .1 to the end.
|
||||
%global baserelease 3
|
||||
%global baserelease 5
|
||||
|
||||
%{?!_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
||||
|
||||
|
@ -553,6 +553,38 @@ if st and st.type == "directory" then
|
|||
end
|
||||
end
|
||||
|
||||
-- Replace the npm HTML docs directory with a symlink
|
||||
-- Drop this scriptlet when F31 is EOL
|
||||
path = "%{_prefix}/lib/node_modules/npm/html"
|
||||
st = posix.stat(path)
|
||||
if st and st.type == "directory" then
|
||||
status = os.rename(path, path .. ".rpmmoved")
|
||||
if not status then
|
||||
suffix = 0
|
||||
while not status do
|
||||
suffix = suffix + 1
|
||||
status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix)
|
||||
end
|
||||
os.rename(path, path .. ".rpmmoved")
|
||||
end
|
||||
end
|
||||
|
||||
-- Replace the npm HTML man directory with a symlink
|
||||
-- Drop this scriptlet when F31 is EOL
|
||||
path = "%{_prefix}/lib/node_modules/npm/man"
|
||||
st = posix.stat(path)
|
||||
if st and st.type == "directory" then
|
||||
status = os.rename(path, path .. ".rpmmoved")
|
||||
if not status then
|
||||
suffix = 0
|
||||
while not status do
|
||||
suffix = suffix + 1
|
||||
status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix)
|
||||
end
|
||||
os.rename(path, path .. ".rpmmoved")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
%pretrans -n v8-devel -p <lua>
|
||||
-- Replace the v8 libplatform include directory with a symlink
|
||||
|
@ -646,7 +678,7 @@ end
|
|||
%{_pkgdocdir}/npm/doc
|
||||
|
||||
%changelog
|
||||
* Tue Oct 29 2019 Stephen Gallagher <sgallagh@redhat.com> - 1:12.13.0-3
|
||||
* Tue Oct 29 2019 Stephen Gallagher <sgallagh@redhat.com> - 1:12.13.0-5
|
||||
- Fix issue with NPM docs being replaced with a symlink
|
||||
|
||||
* Mon Oct 28 2019 Stephen Gallagher <sgallagh@redhat.com> - 1:12.13.0-2
|
||||
|
|
Loading…
Reference in a new issue