]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-5.4.7-fix-generation-of-ruby-abi-provides.patch
- db_buffer_small patch is needed with db6.0 too (up to 3 retries needed:
[packages/rpm.git] / rpm-5.4.7-fix-generation-of-ruby-abi-provides.patch
1 --- rpm-5.4.7/lib/rpmfc.c.rubyabi_prov~ 2012-03-10 21:50:02.143073469 +0100
2 +++ rpm-5.4.7/lib/rpmfc.c       2012-03-10 21:57:13.898394232 +0100
3 @@ -1204,9 +1204,13 @@ assert(fc->fn != NULL);
4                 }
5                 else if (!strncmp(fn, "/ruby", sizeof("/ruby")-1)) {
6                     fc->fcolor->vals[fc->ix] |= RPMFC_RUBY;
7 -                   if ((fn = strstr(fn, "/specifications/")) &&
8 -                       (fn = strrchr(fn, '.')) && !strcmp(fn, ".gemspec"))
9 -                       fc->fcolor->vals[fc->ix] |= RPMFC_MODULE;
10 +                   if ((strstr(fn, ".gemspec") || strstr(fn, "rbconfig.rb"))) {
11 +                       miRE mire = mireNew(RPMMIRE_REGEX, RPMTAG_FILEPATHS);
12 +                       if (!mireRegcomp(mire, ".*/(specifications/.*\\.gemspec|rbconfig\\.rb)$"))
13 +                           if (mireRegexec(mire, fc->fn[fc->ix], (size_t) 0) >= 0)
14 +                               fc->fcolor->vals[fc->ix] |= RPMFC_MODULE;
15 +                       mire = mireFree(mire);
16 +                   }
17                 }
18                 /* XXX: lacking better, more generic classifier... */
19                 else if (!strncmp(fn, "/gstreamer", sizeof("/gstreamer")-1) &&
20 --- rpm-5.4.7/scripts/rubygems.rb.rubyabi_prov~ 2012-03-10 21:50:15.637085059 +0100
21 +++ rpm-5.4.7/scripts/rubygems.rb       2012-03-10 21:50:23.928092180 +0100
22 @@ -36,7 +36,12 @@ ruby_versioned = false
23  abi_provide = false
24  
25  for path in $stdin.readlines
26 -  if path.match(specpatt)
27 +  # way fugly, but we make the assumption that if the package has
28 +  # this file, the package is the current ruby version, and should
29 +  # therefore provide ruby(abi) = version
30 +  if provides and path.match(RbConfig::CONFIG["archdir"] + "/rbconfig.rb")
31 +     abi_provide = true
32 +  elsif path.match(specpatt)
33      ruby_versioned = true
34      gems.push(path.chomp)
35    # this is quite ugly and lame, but the assumption made is that if any files
36 @@ -46,12 +51,6 @@ for path in $stdin.readlines
37    elsif not ruby_versioned
38      if path.match(RbConfig::CONFIG["rubylibdir"])
39        ruby_versioned = true
40 -      # even more fugly, but we make the assumption that if the package has
41 -      # this file, the package is the current ruby version, and should
42 -      # therefore provide ruby(abi) = version
43 -      if provides and path.match(RbConfig::CONFIG["rubylibdir"] + "/Env.rb")
44 -       abi_provide = true
45 -      end
46      elsif path.match(RbConfig::CONFIG["sitelibdir"])
47        ruby_versioned = true
48      elsif path.match(RbConfig::CONFIG["vendorlibdir"])
This page took 0.02634 seconds and 3 git commands to generate.