[nodejs] fix minor bugs in RPM magic

T.C. Hollingsworth patches at fedoraproject.org
Wed Jan 2 01:03:31 UTC 2013


commit db8a0a99d84af79882280cf769440d1c8ee02236
Author: T.C. Hollingsworth <tchollingsworth at gmail.com>
Date:   Tue Jan 1 17:46:31 2013 -0700

    fix minor bugs in RPM magic

 .gitignore          |    1 +
 macros.nodejs       |    2 +-
 nodejs-symlink-deps |    5 +++--
 nodejs.req          |    7 +------
 nodejs.spec         |    2 ++
 sources             |    1 +
 6 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 7974d9b..0589717 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 /node-v0.9.3.tar.gz
 /node-v0.9.4.tar.gz
+/node-v0.9.5.tar.gz
diff --git a/macros.nodejs b/macros.nodejs
index e6a1ff3..9507ada 100644
--- a/macros.nodejs
+++ b/macros.nodejs
@@ -9,4 +9,4 @@
 
 # symlink dependencies so `npm link` works
 # this should be run in every module's %%install section
-%nodejs_symlink_deps %{_rpmconfigdir}/nodejs_symlink_deps %{nodejs_sitelib}
\ No newline at end of file
+%nodejs_symlink_deps %{_rpmconfigdir}/nodejs-symlink-deps %{nodejs_sitelib}
\ No newline at end of file
diff --git a/nodejs-symlink-deps b/nodejs-symlink-deps
index 4850cab..f33375e 100755
--- a/nodejs-symlink-deps
+++ b/nodejs-symlink-deps
@@ -39,5 +39,6 @@ metadata = json.load(open('package.json'))
 
 os.chdir('node_modules')
 
-for dep in metadata['dependencies'].iterkeys():
-    os.symlink(os.path.join(sitelib, dep), dep)
+if 'dependencies' in metadata:
+    for dep in metadata['dependencies'].iterkeys():
+        os.symlink(os.path.join(sitelib, dep), dep)
diff --git a/nodejs.req b/nodejs.req
index 71c3cc6..fdb710f 100755
--- a/nodejs.req
+++ b/nodejs.req
@@ -71,7 +71,7 @@ def process_dep(req, version):
     #there's no way RPM can do anything like an OR dependency
     if '||' in version:
         sys.stderr.write("WARNING: The {0} dependency contains an ".format(req) +
-            "OR (||) dependency: '{0}.  Please manually include ".format(version) +
+            "OR (||) dependency: '{0}.\nPlease manually include ".format(version) +
             "a versioned dependency in your spec file if necessary")
         deps.append(req)
             
@@ -93,11 +93,6 @@ def process_dep(req, version):
                 if m:
                     deps += convert_dep(req, m.group(1), m.group(2))
         else:
-            #uh oh!
-            sys.stderr.write('WARNING: the automatic dependency generator ' +
-                'couldn\'t parse the entry for {0}. '.format(req) +
-                'Please check to see if the package.json is valid. If so, file ' +
-                'a bug against the nodejs package in bugzilla.')
             deps.append(req)
 
     return deps
diff --git a/nodejs.spec b/nodejs.spec
index 6466916..d22ff96 100644
--- a/nodejs.spec
+++ b/nodejs.spec
@@ -136,6 +136,8 @@ rm -f %{_defaultdocdir}/%{name}-docs-%{version}/html/nodejs.1
 %changelog
 * Tue Jan 01 2013 T.C. Hollingsworth <tchollingsworth at gmail.com> - 0.9.5-1
 - new upstream release 0.9.5
+- provide nodejs-devel for the moment
+- fix minor bugs in RPM magic
 
 * Wed Dec 26 2012 T.C. Hollingsworth <tchollingsworth at gmail.com> - 0.9.4-1
 - new upstream release 0.9.4
diff --git a/sources b/sources
index e69de29..07b2403 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+50f1c8bc2390b47e7f3b8a5d59c25909  node-v0.9.5.tar.gz


More information about the scm-commits mailing list