]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm-5.4.7-fix-generation-of-ruby-abi-provides.patch
- release 48 (by relup.sh)
[packages/rpm.git] / rpm-5.4.7-fix-generation-of-ruby-abi-provides.patch
index 59b840976fb563e63df7c5206b400ec9496333d1..da95f37c17209da11de3e1fc7121bdc87d661b29 100644 (file)
@@ -1,7 +1,7 @@
---- rpm-5.4.7/lib/rpmfc.c.rubyabi_prov~        2012-03-10 21:50:02.143073469 +0100
-+++ rpm-5.4.7/lib/rpmfc.c      2012-03-10 21:57:13.898394232 +0100
-@@ -1204,9 +1204,13 @@ assert(fc->fn != NULL);
-               }
+--- rpm-5.4.15/lib/rpmfc.c     2014-12-08 16:52:23.628067323 +0200
++++ rpm-5.4.15.orig/lib/rpmfc.c        2014-12-08 16:23:46.377110108 +0200
+@@ -1155,9 +1155,13 @@
+                   fc->fcolor->vals[fc->ix] |= RPMFC_PYTHON;
                else if (!strncmp(fn, "/ruby", sizeof("/ruby")-1)) {
                    fc->fcolor->vals[fc->ix] |= RPMFC_RUBY;
 -                  if ((fn = strstr(fn, "/specifications/")) &&
                }
                /* XXX: lacking better, more generic classifier... */
                else if (!strncmp(fn, "/gstreamer", sizeof("/gstreamer")-1) &&
+@@ -1177,6 +1181,15 @@
+               fn += sizeof("/usr/share")-1;
+               if (!strncmp(fn, "/python", sizeof("/python")-1))
+                   fc->fcolor->vals[fc->ix] |= RPMFC_PYTHON;
++              else if (!strncmp(fn, "/ruby", sizeof("/ruby")-1) || !strncmp(fn, "/gems/specifications", sizeof("/gems/specifications")-1)) {
++                  fc->fcolor->vals[fc->ix] |= RPMFC_RUBY;
++                  if ((strstr(fn, ".gemspec") || strstr(fn, "rbconfig.rb"))) {
++                      miRE mire = mireNew(RPMMIRE_REGEX, RPMTAG_FILEPATHS);
++                      if (!mireRegcomp(mire, ".*/(specifications/.*\\.gemspec|rbconfig\\.rb)$"))
++                          if (mireRegexec(mire, fc->fn[fc->ix], (size_t) 0) >= 0)
++                              fc->fcolor->vals[fc->ix] |= RPMFC_MODULE;
++                      mire = mireFree(mire);
++                  }
+               }
+           }
+       }
This page took 0.026993 seconds and 4 git commands to generate.