[nodejs/f19] nodejs-symlink-deps: only create symlink if target exists

T.C. Hollingsworth patches at fedoraproject.org
Wed Apr 3 21:38:55 UTC 2013


commit 5a2667dfb1f927ccf1dcb233d95092c85bbbfd29
Author: T.C. Hollingsworth <tchollingsworth at gmail.com>
Date:   Wed Apr 3 14:05:10 2013 -0700

    nodejs-symlink-deps: only create symlink if target exists

 nodejs-symlink-deps |    5 ++++-
 nodejs.spec         |    1 +
 2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/nodejs-symlink-deps b/nodejs-symlink-deps
index e53e8e5..6259c9b 100755
--- a/nodejs-symlink-deps
+++ b/nodejs-symlink-deps
@@ -52,4 +52,7 @@ for path in modules:
         os.chdir('node_modules')
 
         for dep in md['dependencies'].iterkeys():
-            os.symlink(os.path.join(sitelib, dep), dep)
+            target = os.path.join(sitelib, dep)
+            
+            if os.path.exists(target):
+                os.symlink(target, dep)
diff --git a/nodejs.spec b/nodejs.spec
index 7234424..bed8157 100644
--- a/nodejs.spec
+++ b/nodejs.spec
@@ -191,6 +191,7 @@ cp -p common.gypi %{buildroot}%{_datadir}/node
 * Wed Apr 03 2013 T.C. Hollingsworth <tchollingsworth at gmail.com> - 0.10.3-1
 - new upstream release 0.10.3
   http://blog.nodejs.org/2013/04/03/node-v0-10-3-stable/
+- nodejs-symlink-deps: only create symlink if target exists
 
 * Sun Mar 31 2013 T.C. Hollingsworth <tchollingsworth at gmail.com> - 0.10.2-1
 - new upstream release 0.10.2


More information about the scm-commits mailing list