added pool to arguments
authorStefan Schubert <schubi@suse.de>
Mon, 4 Feb 2008 13:41:07 +0000 (13:41 +0000)
committerStefan Schubert <schubi@suse.de>
Mon, 4 Feb 2008 13:41:07 +0000 (13:41 +0000)
src/policy.c
src/solver.h

index b161a75..4b91238 100644 (file)
@@ -300,7 +300,7 @@ prune_best_version_arch(Solver *solv, Pool *pool, Queue *plist)
 {
   if (solv && solv->bestSolvableCb)
      {   /* The application is responsible for */
-        return solv->bestSolvableCb (plist);
+        return solv->bestSolvableCb (solv->pool, plist);
      }
 
   if (plist->count > 1)
@@ -334,7 +334,7 @@ policy_illegal_archchange(Solver *solv, Solvable *s1, Solvable *s2)
 
   if (solv && solv->archCheckCb)
      {   /* The application is responsible for */
-        return solv->archCheckCb (s1, s2);
+        return solv->archCheckCb (solv->pool, s1, s2);
      }
 
   /* we allow changes to/from noarch */
@@ -357,7 +357,7 @@ policy_illegal_vendorchange(Solver *solv, Solvable *s1, Solvable *s2)
 
   if (solv && solv->vendorCheckCb)
      {   /* The application is responsible for */
-        return solv->vendorCheckCb (s1, s2);
+        return solv->vendorCheckCb (solv->pool, s1, s2);
      }
 
   if (s1->vendor == s2->vendor)
@@ -385,7 +385,7 @@ policy_findupdatepackages(Solver *solv, Solvable *s, Queue *qs, int allowall)
 
   if (solv && solv->updateCandidateCb)
      {   /* The application is responsible for */
-        return solv->updateCandidateCb (s, qs);
+        return solv->updateCandidateCb (solv->pool, s, qs);
      }
 
   /*
index 9c7803c..7e6acf9 100644 (file)
  * Callback definitions in order to "overwrite" the policies by an external application.
  */
  
-typedef void  (*BestSolvableCb) (Queue *canditates);
-typedef int  (*ArchCheckCb) (Solvable *solvable1, Solvable *solvable2);
-typedef int  (*VendorCheckCb) (Solvable *solvable1, Solvable *solvable2);
-typedef void (*UpdateCandidateCb) (Solvable *solvable, Queue *canditates);
+typedef void  (*BestSolvableCb) (Pool *pool, Queue *canditates);
+typedef int  (*ArchCheckCb) (Pool *pool, Solvable *solvable1, Solvable *solvable2);
+typedef int  (*VendorCheckCb) (Pool *pool, Solvable *solvable1, Solvable *solvable2);
+typedef void (*UpdateCandidateCb) (Pool *pool, Solvable *solvable, Queue *canditates);
 
 
 /* ----------------------------------------------
@@ -127,7 +127,7 @@ typedef struct solver {
   /* Finding best candidate
    *
    * Callback definition:
-   * void  bestSolvable (Queue *canditates)
+   * void  bestSolvable (Pool *pool, Queue *canditates)
    *     candidates       : List of canditates which has to be sorted by the function call
    *     return candidates: Sorted list of the candidates(first is the best).
    */
@@ -136,7 +136,7 @@ typedef struct solver {
   /* Checking if two solvables has compatible architectures
    *
    * Callback definition:
-   *     int  archCheck (Solvable *solvable1, Solvable *solvable2);
+   *     int  archCheck (Pool *pool, Solvable *solvable1, Solvable *solvable2);
    *     
    *     return 0 it the two solvables has compatible architectures
    */
@@ -145,7 +145,7 @@ typedef struct solver {
   /* Checking if two solvables has compatible vendors
    *
    * Callback definition:
-   *     int  vendorCheck (Solvable *solvable1, Solvable *solvable2);
+   *     int  vendorCheck (Pool *pool, Solvable *solvable1, Solvable *solvable2);
    *     
    *     return 0 it the two solvables has compatible architectures
    */
@@ -154,7 +154,7 @@ typedef struct solver {
   /* Evaluate update candidate
    *
    * Callback definition:
-   * void pdateCandidateCb (Solvable *solvable, Queue *canditates)
+   * void pdateCandidateCb (Pool *pool, Solvable *solvable, Queue *canditates)
    *     solvable   : for which updates should be search
    *     candidates : List of candidates (This list depends on other
    *                  restrictions like architecture and vendor policies too)