]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
rename rpm rules to pkg rules
authorMichael Schroeder <mls@suse.de>
Mon, 29 Sep 2014 09:29:20 +0000 (11:29 +0200)
committerMichael Schroeder <mls@suse.de>
Mon, 29 Sep 2014 09:29:20 +0000 (11:29 +0200)
Long overdue as we support debian/haiku/arch since a long time now.
No ABI change, as we have legacy defines.

bindings/solv.i
doc/libsolv-bindings.3
doc/libsolv-bindings.txt
src/problems.c
src/rules.c
src/rules.h
src/solver.c
src/solver.h

index e8acd35985b8c0e87a709ba6c430542fb6b3311a..20facc5b6d83bca1da5b91669852153942120143 100644 (file)
@@ -2720,16 +2720,16 @@ rb_eval_string(
 
 %extend Solver {
   static const int SOLVER_RULE_UNKNOWN = SOLVER_RULE_UNKNOWN;
-  static const int SOLVER_RULE_RPM = SOLVER_RULE_RPM;
-  static const int SOLVER_RULE_RPM_NOT_INSTALLABLE = SOLVER_RULE_RPM_NOT_INSTALLABLE;
-  static const int SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP = SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP;
-  static const int SOLVER_RULE_RPM_PACKAGE_REQUIRES = SOLVER_RULE_RPM_PACKAGE_REQUIRES;
-  static const int SOLVER_RULE_RPM_SELF_CONFLICT = SOLVER_RULE_RPM_SELF_CONFLICT;
-  static const int SOLVER_RULE_RPM_PACKAGE_CONFLICT = SOLVER_RULE_RPM_PACKAGE_CONFLICT;
-  static const int SOLVER_RULE_RPM_SAME_NAME = SOLVER_RULE_RPM_SAME_NAME;
-  static const int SOLVER_RULE_RPM_PACKAGE_OBSOLETES = SOLVER_RULE_RPM_PACKAGE_OBSOLETES;
-  static const int SOLVER_RULE_RPM_IMPLICIT_OBSOLETES = SOLVER_RULE_RPM_IMPLICIT_OBSOLETES;
-  static const int SOLVER_RULE_RPM_INSTALLEDPKG_OBSOLETES = SOLVER_RULE_RPM_INSTALLEDPKG_OBSOLETES;
+  static const int SOLVER_RULE_PKG = SOLVER_RULE_PKG;
+  static const int SOLVER_RULE_PKG_NOT_INSTALLABLE = SOLVER_RULE_PKG_NOT_INSTALLABLE;
+  static const int SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP = SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP;
+  static const int SOLVER_RULE_PKG_REQUIRES = SOLVER_RULE_PKG_REQUIRES;
+  static const int SOLVER_RULE_PKG_SELF_CONFLICT = SOLVER_RULE_PKG_SELF_CONFLICT;
+  static const int SOLVER_RULE_PKG_CONFLICTS = SOLVER_RULE_PKG_CONFLICTS;
+  static const int SOLVER_RULE_PKG_SAME_NAME = SOLVER_RULE_PKG_SAME_NAME;
+  static const int SOLVER_RULE_PKG_OBSOLETES = SOLVER_RULE_PKG_OBSOLETES;
+  static const int SOLVER_RULE_PKG_IMPLICIT_OBSOLETES = SOLVER_RULE_PKG_IMPLICIT_OBSOLETES;
+  static const int SOLVER_RULE_PKG_INSTALLED_OBSOLETES = SOLVER_RULE_PKG_INSTALLED_OBSOLETES;
   static const int SOLVER_RULE_UPDATE = SOLVER_RULE_UPDATE;
   static const int SOLVER_RULE_FEATURE = SOLVER_RULE_FEATURE;
   static const int SOLVER_RULE_JOB = SOLVER_RULE_JOB;
@@ -2792,6 +2792,9 @@ rb_eval_string(
   static const int SOLVER_REASON_RECOMMENDED = SOLVER_REASON_RECOMMENDED;
   static const int SOLVER_REASON_SUPPLEMENTED = SOLVER_REASON_SUPPLEMENTED;
 
+  /* legacy */
+  static const int SOLVER_RULE_RPM = SOLVER_RULE_RPM;
+
   ~Solver() {
     solver_free($self);
   }
index e0e0be68458133c30e4f1f52fb6e4bd086512efa..1f52285162061f1782eb640d9f51c95c5d37d686 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: Libsolv-Bindings
 .\"    Author: [see the "Author" section]
 .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
-.\"      Date: 09/24/2014
+.\"      Date: 09/29/2014
 .\"    Manual: LIBSOLV
 .\"    Source: libsolv
 .\"  Language: English
 .\"
-.TH "LIBSOLV\-BINDINGS" "3" "09/24/2014" "libsolv" "LIBSOLV"
+.TH "LIBSOLV\-BINDINGS" "3" "09/29/2014" "libsolv" "LIBSOLV"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -3458,9 +3458,9 @@ Basic rule types:
 A rule of an unknown class\&. You should never encounter those\&.
 .RE
 .PP
-\fBSOLVER_RULE_RPM\fR
+\fBSOLVER_RULE_PKG\fR
 .RS 4
-A package dependency rule, called rpm rule for historical reasons\&.
+A package dependency rule\&.
 .RE
 .PP
 \fBSOLVER_RULE_UPDATE\fR
@@ -3500,47 +3500,47 @@ These rules are generated by the solver to keep it from running into the same pr
 .sp
 Special dependency rule types:
 .PP
-\fBSOLVER_RULE_RPM_NOT_INSTALLABLE\fR
+\fBSOLVER_RULE_PKG_NOT_INSTALLABLE\fR
 .RS 4
 This rule was added to prevent the installation of a package of an architecture that does not work on the system\&.
 .RE
 .PP
-\fBSOLVER_RULE_RPM_NOTHING_PROVIDES_DEP\fR
+\fBSOLVER_RULE_PKG_NOTHING_PROVIDES_DEP\fR
 .RS 4
 The package contains a required dependency which was not provided by any package\&.
 .RE
 .PP
-\fBSOLVER_RULE_RPM_PACKAGE_REQUIRES\fR
+\fBSOLVER_RULE_PKG_REQUIRES\fR
 .RS 4
-Similar to SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP, but in this case some packages provided the dependency but none of them could be installed due to other dependency issues\&.
+Similar to SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP, but in this case some packages provided the dependency but none of them could be installed due to other dependency issues\&.
 .RE
 .PP
-\fBSOLVER_RULE_RPM_SELF_CONFLICT\fR
+\fBSOLVER_RULE_PKG_SELF_CONFLICT\fR
 .RS 4
 The package conflicts with itself\&. This is not allowed by older rpm versions\&.
 .RE
 .PP
-\fBSOLVER_RULE_RPM_PACKAGE_CONFLICT\fR
+\fBSOLVER_RULE_PKG_CONFLICTS\fR
 .RS 4
 To fulfill the dependencies two packages need to be installed, but one of the packages contains a conflict with the other one\&.
 .RE
 .PP
-\fBSOLVER_RULE_RPM_SAME_NAME\fR
+\fBSOLVER_RULE_PKG_SAME_NAME\fR
 .RS 4
 The dependencies can only be fulfilled by multiple versions of a package, but installing multiple versions of the same package is not allowed\&.
 .RE
 .PP
-\fBSOLVER_RULE_RPM_PACKAGE_OBSOLETES\fR
+\fBSOLVER_RULE_PKG_OBSOLETES\fR
 .RS 4
 To fulfill the dependencies two packages need to be installed, but one of the packages obsoletes the other one\&.
 .RE
 .PP
-\fBSOLVER_RULE_RPM_IMPLICIT_OBSOLETES\fR
+\fBSOLVER_RULE_PKG_IMPLICIT_OBSOLETES\fR
 .RS 4
 To fulfill the dependencies two packages need to be installed, but one of the packages has provides a dependency that is obsoleted by the other one\&. See the POOL_FLAG_IMPLICITOBSOLETEUSESPROVIDES flag\&.
 .RE
 .PP
-\fBSOLVER_RULE_RPM_INSTALLEDPKG_OBSOLETES\fR
+\fBSOLVER_RULE_PKG_INSTALLED_OBSOLETES\fR
 .RS 4
 To fulfill the dependencies a package needs to be installed that is obsoleted by an installed package\&. See the POOL_FLAG_NOINSTALLEDOBSOLETES flag\&.
 .RE
index ae7d4685ed0b12939b5ec8c9ce4f1ed4b8e8d3f2..2b5163516bba5e6fc7f0636a82042d829d7d67af 100644 (file)
@@ -2101,8 +2101,8 @@ Basic rule types:
 *SOLVER_RULE_UNKNOWN*::
 A rule of an unknown class. You should never encounter those.
 
-*SOLVER_RULE_RPM*::
-A package dependency rule, called rpm rule for historical reasons.
+*SOLVER_RULE_PKG*::
+A package dependency rule.
 
 *SOLVER_RULE_UPDATE*::
 A rule to implement the update policy of installed packages. Every
@@ -2142,43 +2142,43 @@ implementations.
 
 Special dependency rule types:
 
-*SOLVER_RULE_RPM_NOT_INSTALLABLE*::
+*SOLVER_RULE_PKG_NOT_INSTALLABLE*::
 This rule was added to prevent the installation of a package of an
 architecture that does not work on the system.
 
-*SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP*::
+*SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP*::
 The package contains a required dependency which was not provided by
 any package.
 
-*SOLVER_RULE_RPM_PACKAGE_REQUIRES*::
-Similar to SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP, but in this case
+*SOLVER_RULE_PKG_REQUIRES*::
+Similar to SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP, but in this case
 some packages provided the dependency but none of them could be
 installed due to other dependency issues.
 
-*SOLVER_RULE_RPM_SELF_CONFLICT*::
+*SOLVER_RULE_PKG_SELF_CONFLICT*::
 The package conflicts with itself. This is not allowed by older rpm
 versions.
 
-*SOLVER_RULE_RPM_PACKAGE_CONFLICT*::
+*SOLVER_RULE_PKG_CONFLICTS*::
 To fulfill the dependencies two packages need to be installed, but
 one of the packages contains a conflict with the other one.
 
-*SOLVER_RULE_RPM_SAME_NAME*::
+*SOLVER_RULE_PKG_SAME_NAME*::
 The dependencies can only be fulfilled by multiple versions of
 a package, but installing multiple versions of the same package
 is not allowed.
 
-*SOLVER_RULE_RPM_PACKAGE_OBSOLETES*::
+*SOLVER_RULE_PKG_OBSOLETES*::
 To fulfill the dependencies two packages need to be installed, but
 one of the packages obsoletes the other one.
 
-*SOLVER_RULE_RPM_IMPLICIT_OBSOLETES*::
+*SOLVER_RULE_PKG_IMPLICIT_OBSOLETES*::
 To fulfill the dependencies two packages need to be installed, but
 one of the packages has provides a dependency that is obsoleted
 by the other one. See the POOL_FLAG_IMPLICITOBSOLETEUSESPROVIDES
 flag.
 
-*SOLVER_RULE_RPM_INSTALLEDPKG_OBSOLETES*::
+*SOLVER_RULE_PKG_INSTALLED_OBSOLETES*::
 To fulfill the dependencies a package needs to be installed that is
 obsoleted by an installed package. See the POOL_FLAG_NOINSTALLEDOBSOLETES
 flag.
index b2063a5d1d041482f98558203f89bc4ab7fc5932..c82baa8660ea85aa9308754ca73d7e8f8b7a2319 100644 (file)
@@ -930,7 +930,7 @@ findproblemrule_internal(Solver *solv, Id idx, Id *reqrp, Id *conrp, Id *sysrp,
        }
       else
        {
-         assert(rid < solv->rpmrules_end);
+         assert(rid < solv->pkgrules_end);
          r = solv->rules + rid;
          d = r->d < 0 ? -r->d - 1 : r->d;
          if (!d && r->w2 < 0)
@@ -1103,40 +1103,40 @@ solver_problemruleinfo2str(Solver *solv, SolverRuleinfo type, Id source, Id targ
       return pool_tmpjoin(pool, "package ", pool_dep2str(pool, dep), " does not exist");
     case SOLVER_RULE_JOB_PROVIDED_BY_SYSTEM:
       return pool_tmpjoin(pool, pool_dep2str(pool, dep), " is provided by the system", 0);
-    case SOLVER_RULE_RPM:
+    case SOLVER_RULE_PKG:
       return "some dependency problem";
     case SOLVER_RULE_BEST:
       if (source > 0)
         return pool_tmpjoin(pool, "cannot install the best update candidate for package ", pool_solvid2str(pool, source), 0);
      return "cannot install the best candidate for the job";
-    case SOLVER_RULE_RPM_NOT_INSTALLABLE:
+    case SOLVER_RULE_PKG_NOT_INSTALLABLE:
       return pool_tmpjoin(pool, "package ", pool_solvid2str(pool, source), " is not installable");
-    case SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP:
+    case SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP:
       s = pool_tmpjoin(pool, "nothing provides ", pool_dep2str(pool, dep), 0);
       return pool_tmpappend(pool, s, " needed by ", pool_solvid2str(pool, source));
-    case SOLVER_RULE_RPM_SAME_NAME:
+    case SOLVER_RULE_PKG_SAME_NAME:
       s = pool_tmpjoin(pool, "cannot install both ", pool_solvid2str(pool, source), 0);
       return pool_tmpappend(pool, s, " and ", pool_solvid2str(pool, target));
-    case SOLVER_RULE_RPM_PACKAGE_CONFLICT:
+    case SOLVER_RULE_PKG_CONFLICTS:
       s = pool_tmpjoin(pool, "package ", pool_solvid2str(pool, source), 0);
       s = pool_tmpappend(pool, s, " conflicts with ", pool_dep2str(pool, dep));
       return pool_tmpappend(pool, s, " provided by ", pool_solvid2str(pool, target));
-    case SOLVER_RULE_RPM_PACKAGE_OBSOLETES:
+    case SOLVER_RULE_PKG_OBSOLETES:
       s = pool_tmpjoin(pool, "package ", pool_solvid2str(pool, source), 0);
       s = pool_tmpappend(pool, s, " obsoletes ", pool_dep2str(pool, dep));
       return pool_tmpappend(pool, s, " provided by ", pool_solvid2str(pool, target));
-    case SOLVER_RULE_RPM_INSTALLEDPKG_OBSOLETES:
+    case SOLVER_RULE_PKG_INSTALLED_OBSOLETES:
       s = pool_tmpjoin(pool, "installed package ", pool_solvid2str(pool, source), 0);
       s = pool_tmpappend(pool, s, " obsoletes ", pool_dep2str(pool, dep));
       return pool_tmpappend(pool, s, " provided by ", pool_solvid2str(pool, target));
-    case SOLVER_RULE_RPM_IMPLICIT_OBSOLETES:
+    case SOLVER_RULE_PKG_IMPLICIT_OBSOLETES:
       s = pool_tmpjoin(pool, "package ", pool_solvid2str(pool, source), 0);
       s = pool_tmpappend(pool, s, " implicitly obsoletes ", pool_dep2str(pool, dep));
       return pool_tmpappend(pool, s, " provided by ", pool_solvid2str(pool, target));
-    case SOLVER_RULE_RPM_PACKAGE_REQUIRES:
+    case SOLVER_RULE_PKG_REQUIRES:
       s = pool_tmpjoin(pool, "package ", pool_solvid2str(pool, source), " requires ");
       return pool_tmpappend(pool, s, pool_dep2str(pool, dep), ", but none of the providers can be installed");
-    case SOLVER_RULE_RPM_SELF_CONFLICT:
+    case SOLVER_RULE_PKG_SELF_CONFLICT:
       s = pool_tmpjoin(pool, "package ", pool_solvid2str(pool, source), " conflicts with ");
       return pool_tmpappend(pool, s, pool_dep2str(pool, dep), " provided by itself");
     case SOLVER_RULE_YUMOBS:
index 922b9d02763f2b9ef9004c436974be8ce404d295..048cd998b4536ed7a59dd940947b44c3c1b87522 100644 (file)
 
 #define RULES_BLOCK 63
 
-static void addrpmruleinfo(Solver *solv, Id p, Id d, int type, Id dep);
+static void addpkgruleinfo(Solver *solv, Id p, Id d, int type, Id dep);
 static void solver_createcleandepsmap(Solver *solv, Map *cleandepsmap, int unneeded);
 
 /*-------------------------------------------------------------------
  * Check if dependency is possible
  *
  * mirrors solver_dep_fulfilled but uses map m instead of the decisionmap.
- * used in solver_addrpmrulesforweak and solver_createcleandepsmap.
+ * used in solver_addpkgrulesforweak and solver_createcleandepsmap.
  */
 
 static inline int
@@ -243,7 +243,7 @@ hashrule(Solver *solv, Id p, Id d, int n)
 
 /*
  * add rule
- *  p = direct literal; always < 0 for installed rpm rules
+ *  p = direct literal; always < 0 for installed pkg rules
  *  d, if < 0 direct literal, if > 0 offset into whatprovides, if == 0 rule is assertion (look at p only)
  *
  *
@@ -273,7 +273,7 @@ hashrule(Solver *solv, Id p, Id d, int n)
  *   Binary rule: p = first literal, d = 0, w2 = second literal, w1 = p
  *   every other : w1 = p, w2 = whatprovidesdata[d];
  *
- *   always returns a rule for non-rpm rules
+ *   always returns a rule for non-pkg rules
  */
 
 Rule *
@@ -289,11 +289,11 @@ solver_addrule(Solver *solv, Id p, Id d)
                                          >1 = multi-literal rule
                                        */
 
-  /* it often happenes that requires lead to adding the same rpm rule
+  /* it often happenes that requires lead to adding the same pkg rule
    * multiple times, so we prune those duplicates right away to make
    * the work for unifyrules a bit easier */
 
-  if (!solv->rpmrules_end)             /* we add rpm rules */
+  if (!solv->pkgrules_end)             /* we add pkg rules */
     {
       r = solv->rules + solv->nrules - 1;      /* get the last added rule */
       if (r->p == p && r->d == d && (d != 0 || !r->w2))
@@ -319,7 +319,7 @@ solver_addrule(Solver *solv, Id p, Id d)
        d = dp[-1];
     }
 
-  if (n == 1 && p > d && !solv->rpmrules_end)
+  if (n == 1 && p > d && !solv->pkgrules_end)
     {
       /* put smallest literal first so we can find dups */
       n = p; p = d; d = n;             /* p <-> d */
@@ -327,7 +327,7 @@ solver_addrule(Solver *solv, Id p, Id d)
     }
 
   /*
-   * check for duplicate (r is only set if we're adding rpm rules)
+   * check for duplicate (r is only set if we're adding pkg rules)
    */
   if (r)
     {
@@ -398,7 +398,7 @@ solver_shrinkrules(Solver *solv, int nrules)
 
 /******************************************************************************
  ***
- *** rpm rule part: create rules representing the package dependencies
+ *** pkg rule part: create rules representing the package dependencies
  ***
  ***/
 
@@ -442,12 +442,12 @@ makemultiversionconflict(Solver *solv, Id n, Id con)
 }
 
 static inline void
-addrpmrule(Solver *solv, Id p, Id d, int type, Id dep)
+addpkgrule(Solver *solv, Id p, Id d, int type, Id dep)
 {
   if (!solv->ruleinfoq)
     solver_addrule(solv, p, d);
   else
-    addrpmruleinfo(solv, p, d, type, dep);
+    addpkgruleinfo(solv, p, d, type, dep);
 }
 
 #ifdef ENABLE_LINKED_PKGS
@@ -469,22 +469,22 @@ addlinks(Solver *solv, Solvable *s, Id req, Queue *qr, Id prv, Queue *qp, Map *m
 #endif
 
   if (qr->count == 1)
-    addrpmrule(solv, qr->elements[0], -(s - pool->solvables), SOLVER_RULE_RPM_PACKAGE_REQUIRES, req);
+    addpkgrule(solv, qr->elements[0], -(s - pool->solvables), SOLVER_RULE_PKG_REQUIRES, req);
   else
-    addrpmrule(solv, -(s - pool->solvables), pool_queuetowhatprovides(pool, qr), SOLVER_RULE_RPM_PACKAGE_REQUIRES, req);
+    addpkgrule(solv, -(s - pool->solvables), pool_queuetowhatprovides(pool, qr), SOLVER_RULE_PKG_REQUIRES, req);
   if (qp->count > 1)
     {
       Id d = pool_queuetowhatprovides(pool, qp);
       for (i = 0; i < qr->count; i++)
-       addrpmrule(solv, -qr->elements[i], d, SOLVER_RULE_RPM_PACKAGE_REQUIRES, prv);
+       addpkgrule(solv, -qr->elements[i], d, SOLVER_RULE_PKG_REQUIRES, prv);
     }
   else if (qp->count)
     {
       for (i = 0; i < qr->count; i++)
-       addrpmrule(solv, qp->elements[0], -qr->elements[i], SOLVER_RULE_RPM_PACKAGE_REQUIRES, prv);
+       addpkgrule(solv, qp->elements[0], -qr->elements[i], SOLVER_RULE_PKG_REQUIRES, prv);
     }
   if (!m)
-    return;    /* nothing more to do if called from getrpmruleinfos() */
+    return;    /* nothing more to do if called from getpkgruleinfos() */
   for (i = 0; i < qr->count; i++)
     if (!MAPTST(m, qr->elements[i]))
       queue_push(workq, qr->elements[i]);
@@ -541,7 +541,7 @@ add_complex_deprules(Solver *solv, Id p, Id dep, int type, int dontfix, Queue *w
   queue_init(&bq);
 
   /* CNF expansion for requires, DNF + INVERT expansion for conflicts */
-  i = pool_normalize_complex_dep(pool, dep, &bq, type == SOLVER_RULE_RPM_PACKAGE_REQUIRES ? 0 : (CPLXDEPS_TODNF | CPLXDEPS_EXPAND | CPLXDEPS_INVERT));
+  i = pool_normalize_complex_dep(pool, dep, &bq, type == SOLVER_RULE_DEP_PACKAGE_REQUIRES ? 0 : (CPLXDEPS_TODNF | CPLXDEPS_EXPAND | CPLXDEPS_INVERT));
   /* handle special cases */
   if (i == 0)
     {
@@ -552,7 +552,7 @@ add_complex_deprules(Solver *solv, Id p, Id dep, int type, int dontfix, Queue *w
       else
        {
          POOL_DEBUG(SOLV_DEBUG_RULE_CREATION, "package %s [%d] is not installable (%s)\n", pool_solvid2str(pool, p), p, pool_dep2str(pool, dep));
-         addrpmrule(solv, -p, 0, type == SOLVER_RULE_RPM_PACKAGE_REQUIRES ? SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP : type, dep);
+         addpkgrule(solv, -p, 0, type == SOLVER_RULE_PKG_REQUIRES ? SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP : type, dep);
        }
       queue_free(&bq);
       return;
@@ -588,10 +588,10 @@ add_complex_deprules(Solver *solv, Id p, Id dep, int type, int dontfix, Queue *w
            {
              /* nothing provides req! */
              POOL_DEBUG(SOLV_DEBUG_RULE_CREATION, "package %s [%d] is not installable (%s)\n", pool_solvid2str(pool, p), p, pool_dep2str(pool, dep));
-             addrpmrule(solv, -p, 0, SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP, dep);
+             addpkgrule(solv, -p, 0, SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP, dep);
              continue;
            }
-         addrpmrule(solv, -p, dp - pool->whatprovidesdata, SOLVER_RULE_RPM_PACKAGE_REQUIRES, dep);
+         addpkgrule(solv, -p, dp - pool->whatprovidesdata, SOLVER_RULE_PKG_REQUIRES, dep);
          /* push all non-visited providers on the work queue */
          if (m)
            for (; *dp; dp++)
@@ -611,19 +611,19 @@ add_complex_deprules(Solver *solv, Id p, Id dep, int type, int dontfix, Queue *w
            continue;
          if (-p == p2)
            {
-             if (type == SOLVER_RULE_RPM_PACKAGE_CONFLICT)
+             if (type == SOLVER_RULE_PKG_CONFLICTS)
                {
                  if (pool->forbidselfconflicts && !is_otherproviders_dep(pool, dep))
-                   addrpmrule(solv, -p, 0, SOLVER_RULE_RPM_SELF_CONFLICT, dep);
+                   addpkgrule(solv, -p, 0, SOLVER_RULE_PKG_SELF_CONFLICT, dep);
                  continue;
                }
-             addrpmrule(solv, -p, 0, type, dep);
+             addpkgrule(solv, -p, 0, type, dep);
              continue;
            }
          if (p2 > 0)
-           addrpmrule(solv, p2, -p, type, dep);        /* hack so that we don't need pool_queuetowhatprovides */
+           addpkgrule(solv, p2, -p, type, dep);        /* hack so that we don't need pool_queuetowhatprovides */
          else
-           addrpmrule(solv, -p, p2, type, dep);
+           addpkgrule(solv, -p, p2, type, dep);
          if (m && p2 > 0 && !MAPTST(m, p2))
            queue_push(workq, p2);
        }
@@ -674,7 +674,7 @@ add_complex_deprules(Solver *solv, Id p, Id dep, int type, int dontfix, Queue *w
              memset(&q, 0, sizeof(q));
              q.count = qcnt - 1;
              q.elements = qele + 1;
-             addrpmrule(solv, qele[0], pool_queuetowhatprovides(pool, &q), type, dep);
+             addpkgrule(solv, qele[0], pool_queuetowhatprovides(pool, &q), type, dep);
              if (m)
                for (j = 0; j < qcnt; j++)
                  if (qele[j] > 0 && !MAPTST(m, qele[j]))
@@ -708,7 +708,7 @@ add_complex_deprules(Solver *solv, Id p, Id dep, int type, int dontfix, Queue *w
  */
 
 void
-solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
+solver_addpkgrulesforsolvable(Solver *solv, Solvable *s, Map *m)
 {
   Pool *pool = solv->pool;
   Repo *installed = solv->installed;
@@ -751,10 +751,10 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
       dontfix = 0;
       if (installed                    /* Installed system available */
          && s->repo == installed       /* solvable is installed */
-         && !solv->fixmap_all          /* NOT repair errors in rpm dependency graph */
+         && !solv->fixmap_all          /* NOT repair errors in dependency graph */
          && !(solv->fixmap.size && MAPTST(&solv->fixmap, n - installed->start)))
         {
-         dontfix = 1;                  /* dont care about broken rpm deps */
+         dontfix = 1;                  /* dont care about broken deps */
         }
 
       if (!dontfix)
@@ -764,7 +764,7 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
                : !pool_installable(pool, s))
            {
              POOL_DEBUG(SOLV_DEBUG_RULE_CREATION, "package %s [%d] is not installable\n", pool_solvid2str(pool, n), n);
-             addrpmrule(solv, -n, 0, SOLVER_RULE_RPM_NOT_INSTALLABLE, 0);
+             addpkgrule(solv, -n, 0, SOLVER_RULE_PKG_NOT_INSTALLABLE, 0);
            }
        }
 
@@ -790,7 +790,7 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
              if (pool_is_complex_dep(pool, req))
                {
                  /* we have AND/COND deps, normalize */
-                 add_complex_deprules(solv, n, req, SOLVER_RULE_RPM_PACKAGE_REQUIRES, dontfix, &workq, m);
+                 add_complex_deprules(solv, n, req, SOLVER_RULE_PKG_REQUIRES, dontfix, &workq, m);
                  continue;
                }
 #endif
@@ -821,7 +821,7 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
              if (!*dp)
                {
                  POOL_DEBUG(SOLV_DEBUG_RULE_CREATION, "package %s [%d] is not installable (%s)\n", pool_solvid2str(pool, n), n, pool_dep2str(pool, req));
-                 addrpmrule(solv, -n, 0, SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP, req);
+                 addpkgrule(solv, -n, 0, SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP, req);
                  continue;
                }
 
@@ -834,7 +834,7 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
 
              /* add 'requires' dependency */
               /* rule: (-requestor|provider1|provider2|...|providerN) */
-             addrpmrule(solv, -n, dp - pool->whatprovidesdata, SOLVER_RULE_RPM_PACKAGE_REQUIRES, req);
+             addpkgrule(solv, -n, dp - pool->whatprovidesdata, SOLVER_RULE_PKG_REQUIRES, req);
 
              /* push all non-visited providers on the work queue */
              if (m)
@@ -872,7 +872,7 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
              if (!ispatch && pool_is_complex_dep(pool, con))
                {
                  /* we have AND/COND deps, normalize */
-                 add_complex_deprules(solv, n, con, SOLVER_RULE_RPM_PACKAGE_CONFLICT, dontfix, &workq, m);
+                 add_complex_deprules(solv, n, con, SOLVER_RULE_PKG_CONFLICTS, dontfix, &workq, m);
                  continue;
                }
 #endif
@@ -888,7 +888,7 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
                    {
                      if (!pool->forbidselfconflicts || is_otherproviders_dep(pool, con))
                        continue;
-                     addrpmrule(solv, -n, 0, SOLVER_RULE_RPM_SELF_CONFLICT, con);
+                     addpkgrule(solv, -n, 0, SOLVER_RULE_PKG_SELF_CONFLICT, con);
                      continue;
                    }
                  if (ispatch && solv->multiversion.size && MAPTST(&solv->multiversion, p) && ISRELDEP(con))
@@ -897,7 +897,7 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
                      p = -makemultiversionconflict(solv, p, con);
                    }
                   /* rule: -n|-p: either solvable _or_ provider of conflict */
-                 addrpmrule(solv, -n, p == SYSTEMSOLVABLE ? 0 : -p, SOLVER_RULE_RPM_PACKAGE_CONFLICT, con);
+                 addpkgrule(solv, -n, p == SYSTEMSOLVABLE ? 0 : -p, SOLVER_RULE_PKG_CONFLICTS, con);
                }
            }
        }
@@ -931,9 +931,9 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
                      if (pool->obsoleteusescolors && !pool_colormatch(pool, s, ps))
                        continue;
                      if (!isinstalled)
-                       addrpmrule(solv, -n, -p, SOLVER_RULE_RPM_PACKAGE_OBSOLETES, obs);
+                       addpkgrule(solv, -n, -p, SOLVER_RULE_PKG_OBSOLETES, obs);
                      else
-                       addrpmrule(solv, -n, -p, SOLVER_RULE_RPM_INSTALLEDPKG_OBSOLETES, obs);
+                       addpkgrule(solv, -n, -p, SOLVER_RULE_PKG_INSTALLED_OBSOLETES, obs);
                    }
                }
            }
@@ -960,9 +960,9 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
                  if (pool->implicitobsoleteusescolors && !pool_colormatch(pool, s, ps))
                    continue;
                  if (s->name == ps->name)
-                   addrpmrule(solv, -n, -p, SOLVER_RULE_RPM_SAME_NAME, 0);
+                   addpkgrule(solv, -n, -p, SOLVER_RULE_PKG_SAME_NAME, 0);
                  else
-                   addrpmrule(solv, -n, -p, SOLVER_RULE_RPM_IMPLICIT_OBSOLETES, s->name);
+                   addpkgrule(solv, -n, -p, SOLVER_RULE_PKG_IMPLICIT_OBSOLETES, s->name);
                }
            }
        }
@@ -1011,7 +1011,7 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
 
 #ifdef ENABLE_LINKED_PKGS
 void
-solver_addrpmrulesforlinked(Solver *solv, Map *m)
+solver_addpkgrulesforlinked(Solver *solv, Map *m)
 {
   Pool *pool = solv->pool;
   Solvable *s;
@@ -1036,7 +1036,7 @@ solver_addrpmrulesforlinked(Solver *solv, Map *m)
          for (j = 0; j < qr.count; j++)
            if (MAPTST(m, qr.elements[j]))
              {
-               solver_addrpmrulesforsolvable(solv, s, m);
+               solver_addpkgrulesforsolvable(solv, s, m);
                break;
              }
          queue_empty(&qr);
@@ -1054,7 +1054,7 @@ solver_addrpmrulesforlinked(Solver *solv, Map *m)
  */
 
 void
-solver_addrpmrulesforweak(Solver *solv, Map *m)
+solver_addpkgrulesforweak(Solver *solv, Map *m)
 {
   Pool *pool = solv->pool;
   Solvable *s;
@@ -1096,7 +1096,7 @@ solver_addrpmrulesforweak(Solver *solv, Map *m)
       /* if nothing found, goto next solvables */
       if (!sup)
        continue;
-      solver_addrpmrulesforsolvable(solv, s, m);
+      solver_addpkgrulesforsolvable(solv, s, m);
       n = 0;                   /* check all solvables again because we added solvables to m */
     }
 }
@@ -1112,7 +1112,7 @@ solver_addrpmrulesforweak(Solver *solv, Map *m)
  */
 
 void
-solver_addrpmrulesforupdaters(Solver *solv, Solvable *s, Map *m, int allow_all)
+solver_addpkgrulesforupdaters(Solver *solv, Solvable *s, Map *m, int allow_all)
 {
   Pool *pool = solv->pool;
   int i;
@@ -1125,11 +1125,11 @@ solver_addrpmrulesforupdaters(Solver *solv, Solvable *s, Map *m, int allow_all)
   policy_findupdatepackages(solv, s, &qs, allow_all);
     /* add rule for 's' if not already done */
   if (!MAPTST(m, s - pool->solvables))
-    solver_addrpmrulesforsolvable(solv, s, m);
+    solver_addpkgrulesforsolvable(solv, s, m);
     /* foreach update candidate, add rule if not already done */
   for (i = 0; i < qs.count; i++)
     if (!MAPTST(m, qs.elements[i]))
-      solver_addrpmrulesforsolvable(solv, pool->solvables + qs.elements[i], m);
+      solver_addpkgrulesforsolvable(solv, pool->solvables + qs.elements[i], m);
   queue_free(&qs);
 }
 
@@ -2374,7 +2374,7 @@ solver_reenablepolicyrules_cleandeps(Solver *solv, Id pkg)
  ***/
 
 static void
-addrpmruleinfo(Solver *solv, Id p, Id d, int type, Id dep)
+addpkgruleinfo(Solver *solv, Id p, Id d, int type, Id dep)
 {
   Pool *pool = solv->pool;
   Rule *r;
@@ -2437,12 +2437,12 @@ addrpmruleinfo(Solver *solv, Id p, Id d, int type, Id dep)
            return;
        }
       /* should use a different type instead */
-      if (type == SOLVER_RULE_RPM_PACKAGE_CONFLICT && !w2)
+      if (type == SOLVER_RULE_PKG_CONFLICTS && !w2)
        w2 = -SYSTEMSOLVABLE;
     }
   /* yep, rule matches. record info */
   queue_push(solv->ruleinfoq, type);
-  if (type == SOLVER_RULE_RPM_SAME_NAME)
+  if (type == SOLVER_RULE_PKG_SAME_NAME)
     {
       /* we normalize same name order */
       queue_push(solv->ruleinfoq, op < 0 ? -op : 0);
@@ -2478,7 +2478,7 @@ solver_allruleinfos_cmp(const void *ap, const void *bp, void *dp)
 }
 
 static void
-getrpmruleinfos(Solver *solv, Rule *r, Queue *rq)
+getpkgruleinfos(Solver *solv, Rule *r, Queue *rq)
 {
   Pool *pool = solv->pool;
   Id l, pp;
@@ -2490,7 +2490,7 @@ getrpmruleinfos(Solver *solv, Rule *r, Queue *rq)
     {
       if (l >= 0)
        break;
-      solver_addrpmrulesforsolvable(solv, pool->solvables - l, 0);
+      solver_addpkgrulesforsolvable(solv, pool->solvables - l, 0);
     }
 #ifdef ENABLE_LINKED_PKGS
   FOR_RULELITERALS(l, pp, r)
@@ -2517,7 +2517,7 @@ solver_allruleinfos(Solver *solv, Id rid, Queue *rq)
   int i, j;
 
   queue_empty(rq);
-  if (rid <= 0 || rid >= solv->rpmrules_end)
+  if (rid <= 0 || rid >= solv->pkgrules_end)
     {
       Id type, from, to, dep;
       type = solver_ruleinfo(solv, rid, &from, &to, &dep);
@@ -2527,7 +2527,7 @@ solver_allruleinfos(Solver *solv, Id rid, Queue *rq)
       queue_push(rq, dep);
       return 1;
     }
-  getrpmruleinfos(solv, r, rq);
+  getpkgruleinfos(solv, r, rq);
   /* now sort & unify em */
   if (!rq->count)
     return 0;
@@ -2565,18 +2565,18 @@ solver_ruleinfo(Solver *solv, Id rid, Id *fromp, Id *top, Id *depp)
     *top = 0;
   if (depp)
     *depp = 0;
-  if (rid > 0 && rid < solv->rpmrules_end)
+  if (rid > 0 && rid < solv->pkgrules_end)
     {
       Queue rq;
       int i;
 
       if (r->p >= 0)
-       return SOLVER_RULE_RPM;
+       return SOLVER_RULE_PKG;
       if (fromp)
        *fromp = -r->p;
       queue_init(&rq);
-      getrpmruleinfos(solv, r, &rq);
-      type = SOLVER_RULE_RPM;
+      getpkgruleinfos(solv, r, &rq);
+      type = SOLVER_RULE_PKG;
       for (i = 0; i < rq.count; i += 4)
        {
          Id qt, qo, qp, qd;
@@ -2584,7 +2584,7 @@ solver_ruleinfo(Solver *solv, Id rid, Id *fromp, Id *top, Id *depp)
          qp = rq.elements[i + 1];
          qo = rq.elements[i + 2];
          qd = rq.elements[i + 3];
-         if (type == SOLVER_RULE_RPM || type > qt)
+         if (type == SOLVER_RULE_PKG || type > qt)
            {
              type = qt;
              if (fromp)
@@ -2688,8 +2688,8 @@ solver_ruleclass(Solver *solv, Id rid)
 {
   if (rid <= 0)
     return SOLVER_RULE_UNKNOWN;
-  if (rid > 0 && rid < solv->rpmrules_end)
-    return SOLVER_RULE_RPM;
+  if (rid > 0 && rid < solv->pkgrules_end)
+    return SOLVER_RULE_PKG;
   if (rid >= solv->jobrules && rid < solv->jobrules_end)
     return SOLVER_RULE_JOB;
   if (rid >= solv->updaterules && rid < solv->updaterules_end)
@@ -2872,7 +2872,7 @@ solver_addchoicerules(Solver *solv)
       return;
     }
   now = solv_timems(0);
-  solv->choicerules_ref = solv_calloc(solv->rpmrules_end, sizeof(Id));
+  solv->choicerules_ref = solv_calloc(solv->pkgrules_end, sizeof(Id));
   queue_init(&q);
   queue_init(&qi);
   map_init(&m, pool->nsolvables);
@@ -2887,7 +2887,7 @@ solver_addchoicerules(Solver *solv)
   lastaddedp = 0;
   lastaddedd = 0;
   lastaddedcnt = 0;
-  for (rid = 1; rid < solv->rpmrules_end ; rid++)
+  for (rid = 1; rid < solv->pkgrules_end ; rid++)
     {
       r = solv->rules + rid;
       if (r->p >= 0 || ((r->d == 0 || r->d == -1) && r->w2 <= 0))
@@ -4598,7 +4598,7 @@ solver_breakorphans(Solver *solv)
        continue;
       MAPSET(&m, p - installed->start);
     }
-  for (rid = 1; rid < solv->rpmrules_end ; rid++)
+  for (rid = 1; rid < solv->pkgrules_end ; rid++)
     {
       Id p, *dp;
       Rule *r = solv->rules + rid;
index 3be3ea1e7a528815e783d9d1014636b9989c9780..83a26794104ffd77ae50b2a20425484c2376d6e1 100644 (file)
@@ -48,16 +48,16 @@ typedef struct _Rule {
 
 typedef enum {
   SOLVER_RULE_UNKNOWN = 0,
-  SOLVER_RULE_RPM = 0x100,
-  SOLVER_RULE_RPM_NOT_INSTALLABLE,
-  SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP,
-  SOLVER_RULE_RPM_PACKAGE_REQUIRES,
-  SOLVER_RULE_RPM_SELF_CONFLICT,
-  SOLVER_RULE_RPM_PACKAGE_CONFLICT,
-  SOLVER_RULE_RPM_SAME_NAME,
-  SOLVER_RULE_RPM_PACKAGE_OBSOLETES,
-  SOLVER_RULE_RPM_IMPLICIT_OBSOLETES,
-  SOLVER_RULE_RPM_INSTALLEDPKG_OBSOLETES,
+  SOLVER_RULE_PKG = 0x100,
+  SOLVER_RULE_PKG_NOT_INSTALLABLE,
+  SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP,
+  SOLVER_RULE_PKG_REQUIRES,
+  SOLVER_RULE_PKG_SELF_CONFLICT,
+  SOLVER_RULE_PKG_CONFLICTS,
+  SOLVER_RULE_PKG_SAME_NAME,
+  SOLVER_RULE_PKG_OBSOLETES,
+  SOLVER_RULE_PKG_IMPLICIT_OBSOLETES,
+  SOLVER_RULE_PKG_INSTALLED_OBSOLETES,
   SOLVER_RULE_UPDATE = 0x200,
   SOLVER_RULE_FEATURE = 0x300,
   SOLVER_RULE_JOB = 0x400,
@@ -104,11 +104,11 @@ extern void solver_unifyrules(struct _Solver *solv);
 extern int solver_rulecmp(struct _Solver *solv, Rule *r1, Rule *r2);
 extern void solver_shrinkrules(struct _Solver *solv, int nrules);
 
-/* rpm rules */
-extern void solver_addrpmrulesforsolvable(struct _Solver *solv, Solvable *s, Map *m);
-extern void solver_addrpmrulesforweak(struct _Solver *solv, Map *m);
-extern void solver_addrpmrulesforlinked(struct _Solver *solv, Map *m);
-extern void solver_addrpmrulesforupdaters(struct _Solver *solv, Solvable *s, Map *m, int allow_all);
+/* pkg rules */
+extern void solver_addpkgrulesforsolvable(struct _Solver *solv, Solvable *s, Map *m);
+extern void solver_addpkgrulesforweak(struct _Solver *solv, Map *m);
+extern void solver_addpkgrulesforlinked(struct _Solver *solv, Map *m);
+extern void solver_addpkgrulesforupdaters(struct _Solver *solv, Solvable *s, Map *m, int allow_all);
 
 /* update/feature rules */
 extern void solver_addupdaterule(struct _Solver *solv, Solvable *s, int allow_all);
@@ -150,6 +150,19 @@ extern void solver_rule2rules(struct _Solver *solv, Id rid, Queue *q, int recurs
 extern void solver_breakorphans(struct _Solver *solv);
 extern void solver_check_brokenorphanrules(struct _Solver *solv, Queue *dq);
 
+
+/* legacy */
+#define SOLVER_RULE_RPM SOLVER_RULE_PKG
+#define SOLVER_RULE_RPM_NOT_INSTALLABLE SOLVER_RULE_PKG_NOT_INSTALLABLE
+#define SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP
+#define SOLVER_RULE_RPM_PACKAGE_REQUIRES SOLVER_RULE_PKG_REQUIRES
+#define SOLVER_RULE_RPM_SELF_CONFLICT SOLVER_RULE_PKG_SELF_CONFLICT
+#define SOLVER_RULE_RPM_PACKAGE_CONFLICT SOLVER_RULE_PKG_CONFLICTS
+#define SOLVER_RULE_RPM_SAME_NAME SOLVER_RULE_PKG_SAME_NAME
+#define SOLVER_RULE_RPM_PACKAGE_OBSOLETES SOLVER_RULE_PKG_OBSOLETES
+#define SOLVER_RULE_RPM_IMPLICIT_OBSOLETES SOLVER_RULE_PKG_IMPLICIT_OBSOLETES
+#define SOLVER_RULE_RPM_INSTALLEDPKG_OBSOLETES SOLVER_RULE_PKG_INSTALLED_OBSOLETES
+
 #ifdef __cplusplus
 }
 #endif
index 48b3aaac95054748ecb50f39368bbc828a1fc91d..2ba906ff903938d0451c119982de472f3085566a 100644 (file)
@@ -427,9 +427,9 @@ makeruledecisions(Solver *solv)
          assert(solv->decisionq_why.elements[i] > 0);
 
          /*
-          * conflict with an rpm rule ?
+          * conflict with a pkg rule ?
           */
-         if (solv->decisionq_why.elements[i] < solv->rpmrules_end)
+         if (solv->decisionq_why.elements[i] < solv->pkgrules_end)
            {
              if (record_proof)
                {
@@ -441,7 +441,7 @@ makeruledecisions(Solver *solv)
              else
                queue_push(&solv->problems, 0);
              assert(v > 0 || v == -SYSTEMSOLVABLE);
-             POOL_DEBUG(SOLV_DEBUG_UNSOLVABLE, "conflict with rpm rule, disabling rule #%d\n", ri);
+             POOL_DEBUG(SOLV_DEBUG_UNSOLVABLE, "conflict with pkg rule, disabling rule #%d\n", ri);
              if (ri >= solv->jobrules && ri < solv->jobrules_end)
                v = -(solv->ruletojob.elements[ri - solv->jobrules] + 1);
              else
@@ -583,7 +583,7 @@ makewatches(Solver *solv)
                                       /* lower half for removals, upper half for installs */
   solv->watches = solv_calloc(2 * nsolvables, sizeof(Id));
 #if 1
-  /* do it reverse so rpm rules get triggered first (XXX: obsolete?) */
+  /* do it reverse so pkg rules get triggered first (XXX: obsolete?) */
   for (i = 1, r = solv->rules + solv->nrules - 1; i < solv->nrules; i++, r--)
 #else
   for (i = 1, r = solv->rules + 1; i < solv->nrules; i++, r++)
@@ -1024,8 +1024,8 @@ analyze_unsolvable_rule(Solver *solv, Rule *r, Id *lastweakp, Map *rseen)
   if (MAPTST(&solv->weakrulemap, why))
     if (!*lastweakp || why > *lastweakp)
       *lastweakp = why;
-  /* do not add rpm rules to problem */
-  if (why < solv->rpmrules_end)
+  /* do not add pkg rules to problem */
+  if (why < solv->pkgrules_end)
     return;
   /* turn rule into problem */
   if (why >= solv->jobrules && why < solv->jobrules_end)
@@ -1063,7 +1063,7 @@ analyze_unsolvable_rule(Solver *solv, Rule *r, Id *lastweakp, Map *rseen)
  *
  * We know that the problem is not solvable. Record all involved
  * rules (i.e. the "proof") into solv->learnt_pool.
- * Record the learnt pool index and all non-rpm rules into
+ * Record the learnt pool index and all non-pkg rules into
  * solv->problems. (Our solutions to fix the problems are to
  * disable those rules.)
  *
@@ -3093,7 +3093,7 @@ weaken_solvable_deps(Solver *solv, Id p)
   int i;
   Rule *r;
 
-  for (i = 1, r = solv->rules + i; i < solv->rpmrules_end; i++, r++)
+  for (i = 1, r = solv->rules + i; i < solv->pkgrules_end; i++, r++)
     {
       if (r->p != -p)
        continue;
@@ -3295,7 +3295,7 @@ addedmap2deduceq(Solver *solv, Map *addedmap)
   Rule *r;
 
   queue_empty(&solv->addedmap_deduceq);
-  for (i = 2, j = solv->rpmrules_end - 1; i < pool->nsolvables && j > 0; j--)
+  for (i = 2, j = solv->pkgrules_end - 1; i < pool->nsolvables && j > 0; j--)
     {
       r = solv->rules + j;
       if (r->p >= 0)
@@ -3331,7 +3331,7 @@ deduceq2addedmap(Solver *solv, Map *addedmap)
   int j;
   Id p;
   Rule *r;
-  for (j = solv->rpmrules_end - 1; j > 0; j--)
+  for (j = solv->pkgrules_end - 1; j > 0; j--)
     {
       r = solv->rules + j;
       if (r->d < 0 && r->p)
@@ -3367,7 +3367,7 @@ solver_solve(Solver *solv, Queue *job)
   Repo *installed = solv->installed;
   int i;
   int oldnrules, initialnrules;
-  Map addedmap;                       /* '1' == have rpm-rules for solvable */
+  Map addedmap;                       /* '1' == have pkg-rules for solvable */
   Map installcandidatemap;
   Id how, what, select, name, weak, p, pp, d;
   Queue q;
@@ -3470,16 +3470,16 @@ solver_solve(Solver *solv, Queue *job)
   now = solv_timems(0);
   /*
    * create rules for all package that could be involved with the solving
-   * so called: rpm rules
+   * so called: pkg rules
    *
    */
-  initialnrules = solv->rpmrules_end ? solv->rpmrules_end : 1;
+  initialnrules = solv->pkgrules_end ? solv->pkgrules_end : 1;
   if (initialnrules > 1)
     deduceq2addedmap(solv, &addedmap);
   if (solv->nrules != initialnrules)
     solver_shrinkrules(solv, initialnrules);
   solv->nrules = initialnrules;
-  solv->rpmrules_end = 0;
+  solv->pkgrules_end = 0;
 
   if (installed)
     {
@@ -3593,12 +3593,12 @@ solver_solve(Solver *solv, Queue *job)
 
       oldnrules = solv->nrules;
       FOR_REPO_SOLVABLES(installed, p, s)
-       solver_addrpmrulesforsolvable(solv, s, &addedmap);
-      POOL_DEBUG(SOLV_DEBUG_STATS, "added %d rpm rules for installed solvables\n", solv->nrules - oldnrules);
+       solver_addpkgrulesforsolvable(solv, s, &addedmap);
+      POOL_DEBUG(SOLV_DEBUG_STATS, "added %d pkg rules for installed solvables\n", solv->nrules - oldnrules);
       oldnrules = solv->nrules;
       FOR_REPO_SOLVABLES(installed, p, s)
-       solver_addrpmrulesforupdaters(solv, s, &addedmap, 1);
-      POOL_DEBUG(SOLV_DEBUG_STATS, "added %d rpm rules for updaters of installed solvables\n", solv->nrules - oldnrules);
+       solver_addpkgrulesforupdaters(solv, s, &addedmap, 1);
+      POOL_DEBUG(SOLV_DEBUG_STATS, "added %d pkg rules for updaters of installed solvables\n", solv->nrules - oldnrules);
     }
 
   /*
@@ -3619,7 +3619,7 @@ solver_solve(Solver *solv, Queue *job)
          FOR_JOB_SELECT(p, pp, select, what)
            {
              MAPSET(&installcandidatemap, p);
-             solver_addrpmrulesforsolvable(solv, pool->solvables + p, &addedmap);
+             solver_addpkgrulesforsolvable(solv, pool->solvables + p, &addedmap);
            }
          break;
        case SOLVER_DISTUPGRADE:
@@ -3637,24 +3637,24 @@ solver_solve(Solver *solv, Queue *job)
          break;
        }
     }
-  POOL_DEBUG(SOLV_DEBUG_STATS, "added %d rpm rules for packages involved in a job\n", solv->nrules - oldnrules);
+  POOL_DEBUG(SOLV_DEBUG_STATS, "added %d pkg rules for packages involved in a job\n", solv->nrules - oldnrules);
 
 
   /*
    * add rules for suggests, enhances
    */
   oldnrules = solv->nrules;
-  solver_addrpmrulesforweak(solv, &addedmap);
-  POOL_DEBUG(SOLV_DEBUG_STATS, "added %d rpm rules because of weak dependencies\n", solv->nrules - oldnrules);
+  solver_addpkgrulesforweak(solv, &addedmap);
+  POOL_DEBUG(SOLV_DEBUG_STATS, "added %d pkg rules because of weak dependencies\n", solv->nrules - oldnrules);
 
 #ifdef ENABLE_LINKED_PKGS
   oldnrules = solv->nrules;
-  solver_addrpmrulesforlinked(solv, &addedmap);
-  POOL_DEBUG(SOLV_DEBUG_STATS, "added %d rpm rules because of linked packages\n", solv->nrules - oldnrules);
+  solver_addpkgrulesforlinked(solv, &addedmap);
+  POOL_DEBUG(SOLV_DEBUG_STATS, "added %d pkg rules because of linked packages\n", solv->nrules - oldnrules);
 #endif
 
   /*
-   * first pass done, we now have all the rpm rules we need.
+   * first pass done, we now have all the pkg rules we need.
    * unify existing rules before going over all job rules and
    * policy rules.
    * at this point the system is always solvable,
@@ -3675,14 +3675,14 @@ solver_solve(Solver *solv, Queue *job)
     }
 
   if (solv->nrules > initialnrules)
-    solver_unifyrules(solv);                   /* remove duplicate rpm rules */
-  solv->rpmrules_end = solv->nrules;           /* mark end of rpm rules */
+    solver_unifyrules(solv);                   /* remove duplicate pkg rules */
+  solv->pkgrules_end = solv->nrules;           /* mark end of pkg rules */
 
   if (solv->nrules > initialnrules)
     addedmap2deduceq(solv, &addedmap);         /* so that we can recreate the addedmap */
 
-  POOL_DEBUG(SOLV_DEBUG_STATS, "rpm rule memory used: %d K\n", solv->nrules * (int)sizeof(Rule) / 1024);
-  POOL_DEBUG(SOLV_DEBUG_STATS, "rpm rule creation took %d ms\n", solv_timems(now));
+  POOL_DEBUG(SOLV_DEBUG_STATS, "pkg rule memory used: %d K\n", solv->nrules * (int)sizeof(Rule) / 1024);
+  POOL_DEBUG(SOLV_DEBUG_STATS, "pkg rule creation took %d ms\n", solv_timems(now));
 
   /* create dup maps if needed. We need the maps early to create our
    * update rules */
@@ -3995,7 +3995,7 @@ solver_solve(Solver *solv, Queue *job)
   map_free(&installcandidatemap);
   queue_free(&q);
 
-  POOL_DEBUG(SOLV_DEBUG_STATS, "%d rpm rules, 2 * %d update rules, %d job rules, %d infarch rules, %d dup rules, %d choice rules, %d best rules\n", solv->rpmrules_end - 1, solv->updaterules_end - solv->updaterules, solv->jobrules_end - solv->jobrules, solv->infarchrules_end - solv->infarchrules, solv->duprules_end - solv->duprules, solv->choicerules_end - solv->choicerules, solv->bestrules_end - solv->bestrules);
+  POOL_DEBUG(SOLV_DEBUG_STATS, "%d pkg rules, 2 * %d update rules, %d job rules, %d infarch rules, %d dup rules, %d choice rules, %d best rules\n", solv->pkgrules_end - 1, solv->updaterules_end - solv->updaterules, solv->jobrules_end - solv->jobrules, solv->infarchrules_end - solv->infarchrules, solv->duprules_end - solv->duprules, solv->choicerules_end - solv->choicerules, solv->bestrules_end - solv->bestrules);
   POOL_DEBUG(SOLV_DEBUG_STATS, "overall rule memory used: %d K\n", solv->nrules * (int)sizeof(Rule) / 1024);
 
   /* create weak map */
index 49ccec8b1bbea1e05118d5a2923ebc9b91233b14..2a7f060f86f2ffa68e89c858ee4b3c8d6853a7ae 100644 (file)
@@ -39,7 +39,7 @@ struct _Solver {
   Repo *installed;                     /* copy of pool->installed */
 
   /* list of rules, ordered
-   * rpm rules first, then features, updates, jobs, learnt
+   * pkg rules first, then features, updates, jobs, learnt
    * see start/end offsets below
    */
   Rule *rules;                         /* all rules */
@@ -49,7 +49,7 @@ struct _Solver {
 
   /* start/end offset for rule 'areas' */
 
-  Id rpmrules_end;                      /* [Offset] rpm rules end */
+  Id pkgrules_end;                      /* [Offset] dep rules end */
 
   Id featurerules;                     /* feature rules start/end */
   Id featurerules_end;
@@ -189,7 +189,7 @@ struct _Solver {
 
   Queue *installsuppdepq;              /* deps from the install namespace provides hack */
 
-  Queue addedmap_deduceq;              /* deduce addedmap from rpm rules */
+  Queue addedmap_deduceq;              /* deduce addedmap from pkg rules */
   Id *instbuddy;                       /* buddies of installed packages */
   int keep_orphans;                    /* how to treat orphans */
   int break_orphans;                   /* how to treat orphans */