[packages/rpm/nodejs: 4/5] do not use basename, it resolves to xpg_basename which modifies it's argument
glen
glen at pld-linux.org
Sun Apr 28 23:07:06 CEST 2013
commit 78233d25a884d5502c57d8980231465207be689e
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun Apr 28 23:53:38 2013 +0300
do not use basename, it resolves to xpg_basename which modifies it's argument
nodejs-autodeps.patch | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/nodejs-autodeps.patch b/nodejs-autodeps.patch
index 1fc90e4..d88a112 100644
--- a/nodejs-autodeps.patch
+++ b/nodejs-autodeps.patch
@@ -51,22 +51,13 @@
#if defined(RPM_VENDOR_MANDRIVA)
{ rpmfcSYMLINK, RPMFC_SYMLINK },
#endif
-@@ -1096,6 +1107,7 @@
- char * se;
- rpmds ds;
- const char * fn;
-+ char * bn;
- const char * N;
- const char * EVR;
- evrFlags Flags;
-@@ -1152,6 +1164,12 @@
+@@ -1152,6 +1164,11 @@
fn += 2;
if (!strncmp(fn, "/python", sizeof("/python")-1))
fc->fcolor->vals[fc->ix] |= RPMFC_PYTHON;
+ else if (!strncmp(fn, "/node", sizeof("/node")-1) || !strncmp(fn, "/node_modules", sizeof("/node_modules")-1)) {
+ fc->fcolor->vals[fc->ix] |= RPMFC_NODEJS;
-+ bn = basename(fn);
-+ if (!strcmp(bn, "package.json")) {
++ if (!strcmp(fn, "/package.json")) {
+ fc->fcolor->vals[fc->ix] |= RPMFC_MODULE;
+ }
else if (!strncmp(fn, "/ruby", sizeof("/ruby")-1)) {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/a6170955991f542eaf1cf303a5912538f85374ed
More information about the pld-cvs-commit
mailing list