RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  j...@rpm5.org
  Module: rpm                              Date:   12-Oct-2014 23:20:00
  Branch: rpm-5_4                          Handle: 2014101221195900

  Modified files:           (Branch: rpm-5_4)
    rpm/lib                 rpmfc.c

  Log:
    - rpmfc: merge some PLD patches.

  Summary:
    Revision    Changes     Path
    1.75.2.23   +22 -1      rpm/lib/rpmfc.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmfc.c
  ============================================================================
  $ cvs diff -u -r1.75.2.22 -r1.75.2.23 rpmfc.c
  --- rpm/lib/rpmfc.c   10 Oct 2014 17:14:58 -0000      1.75.2.22
  +++ rpm/lib/rpmfc.c   12 Oct 2014 21:19:59 -0000      1.75.2.23
  @@ -1122,7 +1122,7 @@
       for (fc->ix = 0; fc->fn[fc->ix] != NULL; fc->ix++) {
   
        /* XXX Insure that /usr/lib{,64}/python files are marked RPMFC_PYTHON */
  -     /* XXX HACK: classification by path is intrinsically stupid. */
  +     /* XXX HACK: classification by path is intrinsically non-portable. */
        {   fn = strstr(fc->fn[fc->ix], "/usr/lib");
            if (fn) {
                fn += sizeof("/usr/lib")-1;
  @@ -1142,8 +1142,29 @@
                        fc->fcolor->vals[fc->ix] & RPMFC_LIBRARY)
                    fc->fcolor->vals[fc->ix] |= (RPMFC_MODULE|RPMFC_SCRIPT);
            }
  +/* XXX logic based on linux FHS paths is intrinsically non-portable */
  +#if defined(RPM_VENDOR_PLD)
  +         fn = strstr(fc->fn[fc->ix], "/usr/share");
  +         if (fn) {
  +             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)) {
  +                 fc->fcolor->vals[fc->ix] |= RPMFC_RUBY;
  +/* XXX specification/{*.gemspec,rpmconfig.rb} should use rpmGlob/fnmatch. */
  +                 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);
  +                 }
  +             }
  +         }
  +#endif
        }
   
  +/* XXX logic based on linux FHS paths is intrinsically non-portable */
          /* XXX ugly quick & dirty integration of haskell() dependencies */
          {   fn = strstr(fc->fn[fc->ix], "/usr/share/haskell-deps");
              if (fn)
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to