]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm-pld-autodep.patch
- typo
[packages/rpm.git] / rpm-pld-autodep.patch
index 780bc2ec02aca3ba9f17d6b65be8f3aaeca9c1fc..d39cad1d301d43db51aefa9ee0ab2d543fc16578 100644 (file)
@@ -1,6 +1,14 @@
---- rpm-4.4.3/build/rpmfc.h.orig       2005-11-18 23:08:14.231293000 +0100
-+++ rpm-4.4.3/build/rpmfc.h    2005-11-18 23:55:16.694214392 +0100
-@@ -44,6 +44,11 @@
+--- rpm-4.4.8/lib/rpmfc.h.orig 2005-11-18 23:08:14.231293000 +0100
++++ rpm-4.4.8/lib/rpmfc.h      2005-11-18 23:55:16.694214392 +0100
+@@ -1,6 +1,7 @@
+ #ifndef _H_RPMFC_
+ #define _H_RPMFC_
++#include <regex.h>
+ #undef        FILE_RCSID
+ #include "magic.h"
+@@ -44,6 +45,11 @@
      StringBuf sb_python;/*!< concatenated list of python colored files. */
      StringBuf sb_php;   /*!< concatenated list of php colored files. */
  
  };
  
  /**
---- rpm-4.4.3/build/rpmfc.c.orig       2005-11-18 23:08:14.332278624 +0100
-+++ rpm-4.4.3/build/rpmfc.c    2005-11-19 00:15:40.643145872 +0100
-@@ -1,6 +1,7 @@
- #include "system.h"
- #include <signal.h>   /* getOutputFrom() */
-+#include <regex.h>
- #include <rpmbuild.h>
- #include <argv.h>
-@@ -9,6 +10,8 @@
+--- rpm-4.4.8/lib/rpmfc.c.orig 2007-04-08 18:54:35.134367044 +0200
++++ rpm-4.4.8/lib/rpmfc.c      2007-04-08 19:10:18.196109070 +0200
+@@ -11,6 +11,8 @@
  #define       _RPMDS_INTERNAL
  #include <rpmds.h>
  #include <rpmfi.h>
@@ -31,7 +31,7 @@
  
  #include "debug.h"
  
-@@ -299,14 +302,83 @@
+@@ -305,14 +307,83 @@
      return buf;
  };
  
        /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
        /*@modifies fc, rpmGlobalMacroContext, fileSystem, internalState @*/
  {
-@@ -392,6 +464,8 @@
+@@ -398,6 +469,8 @@
            }
  /*@=branchstate@*/
  
  
            /* Add tracking dependency for versioned Provides: */
            if (!fc->tracked && deptype == 'P' && *EVR != '\0') {
-@@ -703,7 +777,7 @@
+@@ -710,7 +783,7 @@
        *se = '\0';
        se++;
  
            /* Add to package requires. */
            ds = rpmdsSingle(RPMTAG_REQUIRENAME, s, "", RPMSENSE_FIND_REQUIRES);
            xx = rpmdsMerge(&fc->requires, ds);
-@@ -731,42 +805,50 @@
+@@ -738,43 +811,51 @@
      (void) fclose(fp);
  
      if (fc->fcolor->vals[fc->ix] & RPMFC_PERL) {
 -          xx = rpmfcHelper(fc, 'R', "executable");
 +      if (fc->findreq && is_executable)
 +          xx = rpmfcHelper(fc, 'R', "executable", fc->noautoreq, fc->noautoreq_c);
-     }
+     } else
      if (fc->fcolor->vals[fc->ix] & RPMFC_PHP) {
--              xx = rpmfcHelper(fc, 'P', "php");
+-      xx = rpmfcHelper(fc, 'P', "php");
++      if (fc->findprov)
++      xx = rpmfcHelper(fc, 'P', "php", fc->noautoprov, fc->noautoprov_c);
+       /* not only executable, files run by httpd usually are not */
 -          xx = rpmfcHelper(fc, 'R', "php");
-+          if (fc->findprov)
-+              xx = rpmfcHelper(fc, 'P', "php", fc->noautoprov, fc->noautoprov_c);
-+          if (fc->findreq)
++      if (fc->findreq)
 +          xx = rpmfcHelper(fc, 'R', "php", fc->noautoreq, fc->noautoreq_c);
-       }
+     }
  
      return 0;
-@@ -794,14 +876,18 @@
+@@ -802,20 +883,26 @@
      default:
        break;
      case RPMTAG_PROVIDENAME:
-+      if (fc->findprov && !rpmfcMatchRegexps(fc->noautoprov, fc->noautoprov_c, ds->N[0])) {
++      if (fc->findprov && !rpmfcMatchRegexps(fc->noautoprov, fc->noautoprov_c, ds->N[0], 'P')) {
        /* Add to package provides. */
        rc = rpmdsMerge(&fc->provides, ds);
  
 +              rc = 0;
        break;
      case RPMTAG_REQUIRENAME:
-+      if (fc->findreq && !rpmfcMatchRegexps(fc->noautoreq, fc->noautoreq_c, ds->N[0])) {
++      if (fc->findreq && !rpmfcMatchRegexps(fc->noautoreq, fc->noautoreq_c, ds->N[0], 'R')) {
        /* Add to package requires. */
        rc = rpmdsMerge(&fc->requires, ds);
  
-@@ -848,6 +934,109 @@
+       /* Add to file dependencies. */
+       buf[0] = '\0';
+       rc = rpmfcSaveArg(&fc->ddict, rpmfcFileDep(buf, fc->ix, ds));
++      } else
++              rc = 0;
+       break;
+     }
+     return rc;
+@@ -856,6 +943,109 @@
      { NULL, 0 }
  };
  
 +        }
 +        hdr=rpmdbNextIterator(it);
 +        assert(hdr!=NULL);
-+        r=rpmHeaderGetEntry(hdr,RPMTAG_NAME,NULL,(void **)&hname, NULL);
++        r=headerGetEntry(hdr,RPMTAG_NAME,NULL,(void **)&hname, NULL);
 +        assert(r<2);
 +        if (!strcmp(hname,N)) {
 +            rpmMessage(RPMMESS_DEBUG, _("%s -> %s (skipping)\n"),N,hname);
  int rpmfcApply(rpmfc fc)
  {
      rpmfcApplyTbl fcat;
-@@ -865,6 +1054,26 @@
-     int ix;
+@@ -874,6 +1064,26 @@
      int i;
      int xx;
+     int skipping;
 +    int j;
 +    regex_t *noautoprovfiles = NULL;
 +    int noautoprovfiles_c;
  
      /* Generate package and per-file dependencies. */
      for (fc->ix = 0; fc->fn[fc->ix] != NULL; fc->ix++) {
-@@ -885,10 +1094,43 @@
+@@ -894,9 +1104,43 @@
        for (fcat = rpmfcApplyTable; fcat->func != NULL; fcat++) {
            if (!(fc->fcolor->vals[fc->ix] & fcat->colormask))
                /*@innercontinue@*/ continue;
 +          fc->findprov = 1;
 +          fc->findreq = 1;
 +          if (strncmp(fc->fn[fc->ix],buildroot,buildroot_l)==0) {/* sanity check */
-+              for(j = 0; j < noautoprovfiles_c; j++) {
-+                  if (!regexec(&noautoprovfiles[j],
-+                          fc->fn[fc->ix] + buildroot_l, 0, NULL, 0)) {
-+                      rpmMessage(RPMMESS_NORMAL,
-+                              _("skipping %s provides detection"
-+                              " (matches noautoprovfiles pattern #%i)\n"),
-+                              fc->fn[fc->ix], j);
-+                      fc->findprov = 0;
-+                      break;
++                  for(j = 0; j < noautoprovfiles_c; j++) {
++                          if (!regexec(&noautoprovfiles[j],
++                                                  fc->fn[fc->ix] + buildroot_l, 0, NULL, 0)) {
++                                  rpmMessage(RPMMESS_NORMAL,
++                                                  _("skipping %s provides detection"
++                                                          " (matches noautoprovfiles pattern #%i)\n"),
++                                                  fc->fn[fc->ix], j);
++                                  fc->findprov = 0;
++                                  break;
++                          }
 +                  }
-+              }
-+              for(j = 0; j < noautoreqfiles_c; j++) {
-+                  if (!regexec(&noautoreqfiles[j],
-+                          fc->fn[fc->ix] + buildroot_l, 0, NULL, 0)) {
-+                      rpmMessage(RPMMESS_NORMAL,
-+                              _("skipping %s requires detection"
-+                              " (matches noautoreqfiles pattern #%i)\n"),
-+                              fc->fn[fc->ix], j);
-+                      fc->findreq = 0;
-+                      break;
++                  for(j = 0; j < noautoreqfiles_c; j++) {
++                          if (!regexec(&noautoreqfiles[j],
++                                                  fc->fn[fc->ix] + buildroot_l, 0, NULL, 0)) {
++                                  rpmMessage(RPMMESS_NORMAL,
++                                                  _("skipping %s requires detection"
++                                                          " (matches noautoreqfiles pattern #%i)\n"),
++                                                  fc->fn[fc->ix], j);
++                                  fc->findreq = 0;
++                                  break;
++                          }
 +                  }
-+              }
 +          }
++
            xx = (*fcat->func) (fc);
        }
      }
 +    noautoprovfiles = rpmfcFreeRegexps(noautoprovfiles, noautoprovfiles_c);
 +    noautoreqfiles = rpmfcFreeRegexps(noautoreqfiles, noautoreqfiles_c);
 +    fc->noautoprov = rpmfcFreeRegexps(fc->noautoprov, fc->noautoprov_c);
 +#ifdef AUTODEP_PKGNAMES /* define to use package names in R */
 +    rpmfcFindRequiredPackages(fc);
 +#endif
  /*@-boundswrite@*/
      /* Generate per-file indices into package dependencies. */
-     nddict = argvCount(fc->ddict);
 --- rpm-4.3/po/POTFILES.in.orig        2004-01-04 03:13:02.000000000 +0100
 +++ rpm-4.3/po/POTFILES.in     2004-02-01 21:05:50.567248776 +0100
 @@ -22,6 +22,7 @@
  build/parseSpec.c
  build/poptBT.c
  build/reqprov.c
-+build/rpmfc.c
++lib/rpmfc.c
  build/spec.c
  lib/cpio.c
  lib/depends.c
This page took 0.052532 seconds and 4 git commands to generate.