X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rpm-5.4.7-fix-generation-of-ruby-abi-provides.patch;h=da95f37c17209da11de3e1fc7121bdc87d661b29;hb=000793b8790f12d832e8032f19ff1ed3faaffc7b;hp=ae983230626e66c2f3b59e3fbb1688437055c305;hpb=1e847c3cc66e2f1380555d101958aab0684453b6;p=packages%2Frpm.git diff --git a/rpm-5.4.7-fix-generation-of-ruby-abi-provides.patch b/rpm-5.4.7-fix-generation-of-ruby-abi-provides.patch index ae98323..da95f37 100644 --- a/rpm-5.4.7-fix-generation-of-ruby-abi-provides.patch +++ b/rpm-5.4.7-fix-generation-of-ruby-abi-provides.patch @@ -1,11 +1,12 @@ ---- rpm-5.4.15/lib/rpmfc.c~ 2014-12-08 16:25:43.000000000 +0200 -+++ rpm-5.4.15/lib/rpmfc.c 2014-12-08 16:41:11.900465719 +0200 -@@ -1181,6 +1181,15 @@ - fn += sizeof("/usr/share")-1; - if (!strncmp(fn, "/python", sizeof("/python")-1)) +--- 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; + else if (!strncmp(fn, "/ruby", sizeof("/ruby")-1)) { + fc->fcolor->vals[fc->ix] |= RPMFC_RUBY; +- if ((fn = strstr(fn, "/specifications/")) && +- (fn = strrchr(fn, '.')) && !strcmp(fn, ".gemspec")) +- fc->fcolor->vals[fc->ix] |= RPMFC_MODULE; + if ((strstr(fn, ".gemspec") || strstr(fn, "rbconfig.rb"))) { + miRE mire = mireNew(RPMMIRE_REGEX, RPMTAG_FILEPATHS); + if (!mireRegcomp(mire, ".*/(specifications/.*\\.gemspec|rbconfig\\.rb)$")) @@ -14,18 +15,14 @@ + mire = mireFree(mire); + } } - } - } - ---- 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); - } - else if (!strncmp(fn, "/ruby", sizeof("/ruby")-1)) { - fc->fcolor->vals[fc->ix] |= RPMFC_RUBY; -- if ((fn = strstr(fn, "/specifications/")) && -- (fn = strrchr(fn, '.')) && !strcmp(fn, ".gemspec")) -- fc->fcolor->vals[fc->ix] |= RPMFC_MODULE; + /* 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)$")) @@ -34,5 +31,5 @@ + mire = mireFree(mire); + } } - /* XXX: lacking better, more generic classifier... */ - else if (!strncmp(fn, "/gstreamer", sizeof("/gstreamer")-1) && + } + }