[nodejs/el6] nodejs-symlink-deps: make it work when --check is used and just
T.C. Hollingsworth
patches at fedoraproject.org
Sat May 4 18:47:35 UTC 2013
commit bb3c74b71196a044a617399c439bbca1c07e6668
Author: T.C. Hollingsworth <tchollingsworth at gmail.com>
Date: Mon Apr 29 04:47:26 2013 -0700
nodejs-symlink-deps: make it work when --check is used and just
devDependencies exist
(cherry picked from commit e0f6b9832c326b7773704d1d984fe32224ba74a8)
nodejs-symlink-deps | 13 +++++++------
nodejs.spec | 6 +++++-
2 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/nodejs-symlink-deps b/nodejs-symlink-deps
index 44b0348..f7a872e 100755
--- a/nodejs-symlink-deps
+++ b/nodejs-symlink-deps
@@ -42,7 +42,7 @@ for path in modules:
os.chdir(path)
md = json.load(open('package.json'))
- if 'dependencies' in md:
+ if 'dependencies' in md or (check and 'devDependencies' in md):
try:
os.mkdir('node_modules')
except OSError:
@@ -51,11 +51,12 @@ for path in modules:
os.chdir('node_modules')
- for dep in md['dependencies'].iterkeys():
- target = os.path.join(sitelib, dep)
-
- if not check or os.path.exists(target):
- os.symlink(target, dep)
+ if 'dependencies' in md:
+ for dep in md['dependencies'].iterkeys():
+ target = os.path.join(sitelib, dep)
+
+ if not check or os.path.exists(target):
+ os.symlink(target, dep)
if check and '--no-devdeps' not in sys.argv and 'devDependencies' in md:
for dep in md['devDependencies']:
diff --git a/nodejs.spec b/nodejs.spec
index ee80ceb..5728144 100644
--- a/nodejs.spec
+++ b/nodejs.spec
@@ -1,6 +1,6 @@
Name: nodejs
Version: 0.10.5
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: JavaScript runtime
License: MIT and ASL 2.0 and ISC and BSD
Group: Development/Languages
@@ -186,6 +186,10 @@ cp -p common.gypi %{buildroot}%{_datadir}/node
%{_defaultdocdir}/%{name}-docs-%{version}
%changelog
+* Mon Apr 29 2013 T.C. Hollingsworth <tchollingsworth at gmail.com> - 0.10.5-2
+- nodejs-symlink-deps: make it work when --check is used and just
+ devDependencies exist
+
* Wed Apr 24 2013 T.C. Hollingsworth <tchollingsworth at gmail.com> - 0.10.5-1
- new upstream release 0.10.5
http://blog.nodejs.org/2013/04/23/node-v0-10-5-stable/
More information about the scm-commits
mailing list