From e0f6b9832c326b7773704d1d984fe32224ba74a8 Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Mon, 29 Apr 2013 04:47:26 -0700 Subject: [PATCH] nodejs-symlink-deps: make it work when --check is used and just devDependencies exist --- 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 eefe21b..a1e4995 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 @@ -188,6 +188,10 @@ cp -p common.gypi %{buildroot}%{_datadir}/node %{_defaultdocdir}/%{name}-docs-%{version} %changelog +* Mon Apr 29 2013 T.C. Hollingsworth - 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 - 0.10.5-1 - new upstream release 0.10.5 http://blog.nodejs.org/2013/04/23/node-v0-10-5-stable/