remove trailing whitespace
authorMichael Schroeder <mls@suse.de>
Wed, 16 Oct 2013 16:25:15 +0000 (18:25 +0200)
committerMichael Schroeder <mls@suse.de>
Wed, 16 Oct 2013 16:25:15 +0000 (18:25 +0200)
20 files changed:
src/bitmap.c
src/chksum.c
src/dirpool.c
src/evr.c
src/policy.c
src/pool.c
src/poolid.c
src/problems.c
src/qsort_r.c
src/repo.c
src/repo_solv.c
src/repopage.c
src/rules.c
src/selection.c
src/sha2.c
src/solvable.c
src/solver.c
src/solverdebug.c
src/strpool.c
src/transaction.c

index f304e6b..1bf1666 100644 (file)
@@ -7,7 +7,7 @@
 
 /*
  * bitmap.c
- * 
+ *
  */
 
 #include <stdlib.h>
index cb3c8af..3e973fd 100644 (file)
@@ -64,16 +64,16 @@ int
 solv_chksum_len(Id type)
 {
   switch (type)
-    {   
+    {
     case REPOKEY_TYPE_MD5:
-      return 16; 
+      return 16;
     case REPOKEY_TYPE_SHA1:
-      return 20; 
+      return 20;
     case REPOKEY_TYPE_SHA256:
-      return 32; 
+      return 32;
     default:
       return 0;
-    }   
+    }
 }
 
 void *
index d7ed384..5f08361 100644 (file)
@@ -58,7 +58,7 @@
  *  10    "bar"
  *  11    -3           5       [parent 3, /usr, block #1]
  *  12    "games"
- *   
+ *
  * to find all children of dirid 3 ("/usr"), follow the
  * dirtraverse link to 12 -> "games". Then follow the
  * dirtraverse link of this block to 5 -> "bin", "lib"
index 1f65772..a7d4311 100644 (file)
--- a/src/evr.c
+++ b/src/evr.c
@@ -289,9 +289,9 @@ solv_vercmp_haiku(const char *s1, const char *q1, const char *s2, const char *q2
 }
 
 #endif /* HAIKU */
-/* 
+
+
+/*
  * the solv_vercmp variant your system uses.
  */
 int
index 5a88ed3..6287b7c 100644 (file)
@@ -466,7 +466,7 @@ trj_visit(struct trj_data *trj, Id node)
       trj->nstack = stackstart;        /* empty stack */
     }
 }
-  
+
 /*
  * remove entries from plist that are obsoleted by other entries
  * with different name.
@@ -478,7 +478,7 @@ prune_obsoleted(Pool *pool, Queue *plist)
   struct trj_data trj;
   int i, j;
   Solvable *s;
-  
+
   if (plist->count <= 16)
     {
       memset(data_buf, 0, sizeof(data_buf));
@@ -776,7 +776,7 @@ policy_is_illegal(Solver *solv, Solvable *is, Solvable *s, int ignore)
 }
 
 /*-------------------------------------------------------------------
- * 
+ *
  * create reverse obsoletes map for installed solvables
  *
  * For each installed solvable find which packages with *different* names
@@ -863,12 +863,12 @@ policy_create_obsolete_index(Solver *solv)
 
 /*
  * find update candidates
- * 
+ *
  * s: installed solvable to be updated
  * qs: [out] queue to hold Ids of candidates
  * allow_all: 0 = dont allow downgrades, 1 = allow all candidates
  *            2 = dup mode
- * 
+ *
  */
 void
 policy_findupdatepackages(Solver *solv, Solvable *s, Queue *qs, int allow_all)
index fd8de89..f7b5456 100644 (file)
@@ -7,7 +7,7 @@
 
 /*
  * pool.c
- * 
+ *
  * The pool contains information about solvables
  * stored optimized for memory consumption and fast retrieval.
  */
@@ -130,12 +130,12 @@ pool_freeallrepos(Pool *pool, int reuseids)
   int i;
 
   pool_freewhatprovides(pool);
-  for (i = 1; i < pool->nrepos; i++) 
+  for (i = 1; i < pool->nrepos; i++)
     if (pool->repos[i])
       repo_freedata(pool->repos[i]);
   pool->repos = solv_free(pool->repos);
-  pool->nrepos = 0; 
-  pool->urepos = 0; 
+  pool->nrepos = 0;
+  pool->urepos = 0;
   /* the first two solvables don't belong to a repo */
   pool_free_solvable_block(pool, 2, pool->nsolvables - 2, reuseids);
 }
@@ -384,9 +384,9 @@ pool_shrink_whatprovides(Pool *pool)
 
 /*
  * pool_createwhatprovides()
- * 
+ *
  * create hashes over pool of solvables to ease provide lookups
- * 
+ *
  */
 void
 pool_createwhatprovides(Pool *pool)
@@ -542,7 +542,7 @@ pool_freewhatprovides(Pool *pool)
 
 /*
  * pool_queuetowhatprovides  - add queue contents to whatprovidesdata
- * 
+ *
  * used for whatprovides, jobs, learnt rules, selections
  * input: q: queue of Ids
  * returns: Offset into whatprovidesdata
@@ -771,7 +771,7 @@ pool_searchlazywhatprovidesq(Pool *pool, Id d)
 
 /*
  * addstdproviders
- * 
+ *
  * lazy populating of the whatprovides array, non relation case
  */
 static Id
@@ -871,9 +871,9 @@ pool_is_kind(Pool *pool, Id name, Id kind)
 
 /*
  * addrelproviders
- * 
+ *
  * add packages fulfilling the relation to whatprovides array
- * 
+ *
  */
 Id
 pool_addrelproviders(Pool *pool, Id d)
@@ -1956,7 +1956,7 @@ pool_calc_duchanges(Pool *pool, Map *installedmap, DUChanges *mps, int nmps)
   mptree[0].compl = 0;
   mptree[0].mountpoint = -1;
   nmptree = 1;
-  
+
   /* create component tree */
   for (mp = 0; mp < nmps; mp++)
     {
@@ -2098,7 +2098,7 @@ pool_calc_installsizechange(Pool *pool, Map *installedmap)
  *  8: interesting (only true if installed)
  * 16: undecided
  */
+
 static inline Id dep2name(Pool *pool, Id dep)
 {
   while (ISRELDEP(dep))
@@ -2109,14 +2109,14 @@ static inline Id dep2name(Pool *pool, Id dep)
   return dep;
 }
 
-static int providedbyinstalled_multiversion(Pool *pool, unsigned char *map, Id n, Id con) 
+static int providedbyinstalled_multiversion(Pool *pool, unsigned char *map, Id n, Id con)
 {
   Id p, pp;
-  Solvable *sn = pool->solvables + n; 
+  Solvable *sn = pool->solvables + n;
 
   FOR_PROVIDES(p, pp, sn->name)
-    {    
-      Solvable *s = pool->solvables + p; 
+    {
+      Solvable *s = pool->solvables + p;
       if (s->name != sn->name || s->arch != sn->arch)
         continue;
       if ((map[p] & 9) != 9)
index 3fa1ed4..66b6d46 100644 (file)
@@ -63,7 +63,7 @@ pool_rel2id(Pool *pool, Id name, Id evr, int flags, int create)
   hashmask = pool->relhashmask;
   hashtbl = pool->relhashtbl;
   ran = pool->rels;
-  
+
   /* extend hashtable if needed */
   if (pool->nrels * 2 > hashmask)
     {
@@ -80,7 +80,7 @@ pool_rel2id(Pool *pool, Id name, Id evr, int flags, int create)
          hashtbl[h] = i;
        }
     }
-  
+
   /* compute hash and check for match */
   h = relhash(name, evr, flags) & hashmask;
   hh = HASHCHAIN_START;
@@ -117,7 +117,7 @@ pool_rel2id(Pool *pool, Id name, Id evr, int flags, int create)
 
 /* Id -> String
  * for rels (returns name only) and strings
- */ 
+ */
 const char *
 pool_id2str(const Pool *pool, Id id)
 {
index 44d0c21..76d6ca0 100644 (file)
@@ -141,9 +141,9 @@ solver_enableproblem(Solver *solv, Id v)
 
 /*-------------------------------------------------------------------
  * enable weak rules
- * 
+ *
  * Reenable all disabled weak rules (marked in weakrulemap)
- * 
+ *
  */
 
 static void
@@ -164,9 +164,9 @@ enableweakrules(Solver *solv)
 
 
 /*-------------------------------------------------------------------
- * 
+ *
  * refine_suggestion
- * 
+ *
  * at this point, all rules that led to conflicts are disabled.
  * we re-enable all rules of a problem set but rule "sug", then
  * continue to disable more rules until there as again a solution.
@@ -556,14 +556,14 @@ solver_prepare_solutions(Solver *solv)
   idx = solv->solutions.count;
   queue_push(&solv->solutions, -1);    /* unrefined */
   /* proofidx stays in position, thus we start with 1 */
-  for (i = 1; i < solv->problems.count; i++) 
-    {   
+  for (i = 1; i < solv->problems.count; i++)
+    {
       Id p = solv->problems.elements[i];
-      queue_push(&solv->solutions, p); 
-      if (p) 
+      queue_push(&solv->solutions, p);
+      if (p)
         continue;
       /* end of problem reached */
-      solv->problems.elements[j++] = idx; 
+      solv->problems.elements[j++] = idx;
       if (i + 1 >= solv->problems.count)
         break;
       /* start another problem */
@@ -571,7 +571,7 @@ solver_prepare_solutions(Solver *solv)
       idx = solv->solutions.count;
       queue_push(&solv->solutions, -1);        /* unrefined */
     }
-  solv->problems.count = j;  
+  solv->problems.count = j;
   return j / 2;
 }
 
@@ -723,7 +723,7 @@ create_solutions(Solver *solv, int probnr, int solidx)
          solv->cleandeps_mistakes = solv_free(solv->cleandeps_mistakes);
        }
     }
-    
+
   POOL_DEBUG(SOLV_DEBUG_STATS, "create_solutions for problem #%d took %d ms\n", probnr, solv_timems(now));
 }
 
@@ -808,7 +808,7 @@ solver_solutionelement_extrajobflags(Solver *solv, Id problem, Id solution)
  *    pkgid (> 0)                   pkgid (> 0)
  *    -> add (SOLVER_INSTALL|SOLVER_SOLVABLE, rp) to the job
  *       (this will replace package p)
- *         
+ *
  * Thus, the solver will either ask the application to remove
  * a specific job from the job queue, or ask to add an install/erase
  * job to it.
@@ -873,7 +873,7 @@ solver_take_solution(Solver *solv, Id problem, Id solution, Queue *job)
 
 
 /*-------------------------------------------------------------------
- * 
+ *
  * find problem rule
  */
 
@@ -974,7 +974,7 @@ findproblemrule_internal(Solver *solv, Id idx, Id *reqrp, Id *conrp, Id *sysrp,
     *sysrp = lsysr;
 }
 
-/* 
+/*
  * find problem rule
  *
  * search for a rule that describes the problem to the
index 953462b..f264ed0 100644 (file)
@@ -109,7 +109,7 @@ loop:       SWAPINIT(a, es);
        swap_cnt = 0;
        if (n < 7) {
                for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
-                       for (pl = pm; 
+                       for (pl = pm;
                             pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
                             pl -= es)
                                swap(pl, pl - es);
@@ -157,7 +157,7 @@ loop:       SWAPINIT(a, es);
        }
        if (swap_cnt == 0) {  /* Switch to insertion sort */
                for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
-                       for (pl = pm; 
+                       for (pl = pm;
                             pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
                             pl -= es)
                                swap(pl, pl - es);
index be112c5..1a934b8 100644 (file)
@@ -146,7 +146,7 @@ repo_add_solvable(Repo *repo)
     repo->start = repo->end = p;
   /* warning: sidedata must be extended before adapting start/end */
   if (repo->rpmdbid)
-    repo->rpmdbid = (Id *)repo_sidedata_extend(repo, repo->rpmdbid, sizeof(Id), p, 1); 
+    repo->rpmdbid = (Id *)repo_sidedata_extend(repo, repo->rpmdbid, sizeof(Id), p, 1);
   if (p < repo->start)
     repo->start = p;
   if (p + 1 > repo->end)
@@ -160,7 +160,7 @@ Id
 repo_add_solvable_block(Repo *repo, int count)
 {
   Id p;
-  Solvable *s; 
+  Solvable *s;
   if (!count)
     return 0;
   p = pool_add_solvable_block(repo->pool, count);
@@ -360,7 +360,7 @@ repo_addid(Repo *repo, Offset olddeps, Id id)
 #define REPO_ADDID_DEP_HASHTHRES       64
 #define REPO_ADDID_DEP_HASHMIN         128
 
-/* 
+/*
  * Optimization for packages with an excessive amount of provides/requires:
  * if the number of deps exceed a threshold, we build a hash of the already
  * seen ids.
@@ -1488,16 +1488,16 @@ repo_add_repodata(Repo *repo, int flags)
          return repo->repodata + i;
     }
   if (!repo->nrepodata)
-    {    
+    {
       repo->nrepodata = 2;      /* start with id 1 */
       repo->repodata = solv_calloc(repo->nrepodata, sizeof(*data));
-    }    
-  else 
-    {    
+    }
+  else
+    {
       repo->nrepodata++;
       repo->repodata = solv_realloc2(repo->repodata, repo->nrepodata, sizeof(*data));
-    }    
-  data = repo->repodata + repo->nrepodata - 1; 
+    }
+  data = repo->repodata + repo->nrepodata - 1;
   repodata_initdata(data, repo, (flags & REPO_LOCALPOOL) ? 1 : 0);
   return data;
 }
index 0eedc18..0e8b854 100644 (file)
@@ -7,9 +7,9 @@
 
 /*
  * repo_solv.c
- * 
+ *
  * Add a repo in solv format
- * 
+ *
  */
 
 
@@ -502,7 +502,7 @@ repo_add_solv(Repo *repo, FILE *fp, int flags)
       extendstart = repo->start;
       extendend = repo->end;
     }
-    
+
   memset(&data, 0, sizeof(data));
   data.repo = repo;
   data.fp = fp;
@@ -548,10 +548,10 @@ repo_add_solv(Repo *repo, FILE *fp, int flags)
 
   /*
    * read strings and Ids
-   * 
+   *
    */
 
-  
+
   /*
    * alloc buffers
    */
@@ -561,7 +561,7 @@ repo_add_solv(Repo *repo, FILE *fp, int flags)
       spool = &pool->ss;
       /* alloc max needed string buffer and string pointers, will shrink again later */
 #if 0
-      spool->stringspace = solv_realloc(spool->stringspace, spool->sstrings + sizeid + 1); 
+      spool->stringspace = solv_realloc(spool->stringspace, spool->sstrings + sizeid + 1);
       spool->strings = solv_realloc2(spool->strings, spool->nstrings + numid, sizeof(Offset));
 #else
       spool->sstrings += sizeid + 1;
@@ -575,7 +575,7 @@ repo_add_solv(Repo *repo, FILE *fp, int flags)
     {
       data.localpool = 1;
       spool = &data.spool;
-      spool->stringspace = solv_malloc(7 + sizeid + 1); 
+      spool->stringspace = solv_malloc(7 + sizeid + 1);
       spool->strings = solv_malloc2(numid < 2 ?  2 : numid, sizeof(Offset));
       strcpy(spool->stringspace, "<NULL>");
       spool->sstrings = 7;
@@ -587,7 +587,7 @@ repo_add_solv(Repo *repo, FILE *fp, int flags)
   /*
    * read string data and append to old string space
    */
-  
+
   strsp = spool->stringspace + spool->sstrings;        /* append new entries */
   if ((solvflags & SOLV_FLAG_PREFIX_POOL) == 0)
     {
@@ -756,14 +756,14 @@ repo_add_solv(Repo *repo, FILE *fp, int flags)
       stringpool_shrink(spool);                /* vacuum */
     }
 
-  
+
   /*******  Part 2: Relation IDs  ***************************************/
 
   /*
    * read RelDeps
-   * 
+   *
    */
-  
+
   if (numrel)
     {
       /* extend rels */
@@ -913,7 +913,7 @@ repo_add_solv(Repo *repo, FILE *fp, int flags)
       /* cannot handle mapped ids in vertical */
       if (!(flags & REPO_LOCALPOOL) && keys[i].storage == KEY_STORAGE_VERTICAL_OFFSET && (type == REPOKEY_TYPE_ID || type == REPOKEY_TYPE_IDARRAY))
        data.error = pool_error(pool, SOLV_ERROR_UNSUPPORTED, "mapped ids are not supported for STORAGE_VERTICAL_OFFSET");
+
       if (keys[i].type == REPOKEY_TYPE_CONSTANTID && idmap)
        keys[i].size = idmap[keys[i].size];
 #if 0
@@ -936,7 +936,7 @@ repo_add_solv(Repo *repo, FILE *fp, int flags)
     }
 
   /*******  Part 5: Schemata ********************************************/
-  
+
   id = read_id(&data, 0);
   schemadata = solv_calloc(id + 1, sizeof(Id));
   schemadatap = schemadata + 1;
@@ -1101,13 +1101,13 @@ printf("=> %s %s %p\n", pool_id2str(pool, keys[key].name), pool_id2str(pool, key
        case REPOKEY_TYPE_ID:
          dp = data_read_id_max(dp, &did, idmap, numid + numrel, &data);
          if (s && id == SOLVABLE_NAME)
-           s->name = did; 
+           s->name = did;
          else if (s && id == SOLVABLE_ARCH)
-           s->arch = did; 
+           s->arch = did;
          else if (s && id == SOLVABLE_EVR)
-           s->evr = did; 
+           s->evr = did;
          else if (s && id == SOLVABLE_VENDOR)
-           s->vendor = did; 
+           s->vendor = did;
          else if (keys[key].storage == KEY_STORAGE_INCORE)
            incore_add_id(&data, did);
 #if 0
@@ -1304,7 +1304,7 @@ printf("=> %s %s %p\n", pool_id2str(pool, keys[key].name), pool_id2str(pool, key
     {
       Id fileoffset = 0;
       unsigned int pagesize;
-      
+
       /* we have vertical data, make it available */
       data.verticaloffset = solv_calloc(numkeys, sizeof(Id));
       for (i = 1; i < numkeys; i++)
index be5a9e2..2b7a863 100644 (file)
@@ -45,7 +45,7 @@ typedef uint32_t Ref;
 /*
    The format is tailored for fast decompression (i.e. only byte based),
    and skewed to ASCII content (highest bit often not set):
-   
+
    a 0LLLLLLL
         - self-describing ASCII character hex L
    b 100lllll <l+1 bytes>
@@ -748,15 +748,15 @@ static inline unsigned int
 read_u32(FILE *fp)
 {
   int c, i;
-  unsigned int x = 0; 
+  unsigned int x = 0;
 
-  for (i = 0; i < 4; i++) 
-    {    
+  for (i = 0; i < 4; i++)
+    {
       c = getc(fp);
-      if (c == EOF) 
+      if (c == EOF)
         return 0;
-      x = (x << 8) | c; 
-    }    
+      x = (x << 8) | c;
+    }
   return x;
 }
 
index 818f5d7..a3f80b3 100644 (file)
@@ -35,7 +35,7 @@ static void solver_createcleandepsmap(Solver *solv, Map *cleandepsmap, int unnee
 
 /*-------------------------------------------------------------------
  * Check if dependency is possible
- * 
+ *
  * mirrors solver_dep_fulfilled but uses map m instead of the decisionmap.
  * used in solver_addrpmrulesforweak and solver_createcleandepsmap.
  */
@@ -219,7 +219,7 @@ hashrule(Solver *solv, Id p, Id d, int n)
 
 
 /*-------------------------------------------------------------------
- * 
+ *
  */
 
 /*
@@ -245,7 +245,7 @@ hashrule(Solver *solv, Id p, Id d, int n)
  *   Updates:    p > 0, d > 0   (A|B1|B2|...)   d: <list of updates for solvable p>
  *   Conflicts:  p < 0, d < 0   (-A|-B)         either p (conflict issuer) or d (conflict provider) (binary rule)
  *                                              also used for obsoletes
- *   ?:          p > 0, d < 0   (A|-B)          
+ *   ?:          p > 0, d < 0   (A|-B)
  *   No-op ?:    p = 0, d = 0   (null)          (used as policy rule placeholder)
  *
  *   resulting watches:
@@ -268,7 +268,7 @@ solver_addrule(Solver *solv, Id p, Id d)
   int n = 0;                          /* number of literals in rule - 1
                                          0 = direct assertion (single literal)
                                          1 = binary rule
-                                         >1 = 
+                                         >1 =
                                        */
 
   /* it often happenes that requires lead to adding the same rpm rule
@@ -285,7 +285,7 @@ solver_addrule(Solver *solv, Id p, Id d)
     /*
      * compute number of literals (n) in rule
      */
-    
+
   if (d < 0)
     {
       /* always a binary rule */
@@ -313,7 +313,7 @@ solver_addrule(Solver *solv, Id p, Id d)
   /*
    * check for duplicate
    */
-    
+
   /* check if the last added rule (r) is exactly the same as what we're looking for. */
   if (r && n == 1 && !r->d && r->p == p && r->w2 == d)
     return r;  /* binary rule */
@@ -344,7 +344,7 @@ solver_addrule(Solver *solv, Id p, Id d)
     /*
      * r = new rule
      */
-    
+
   r->p = p;
   if (n == 0)
     {
@@ -527,20 +527,20 @@ add_package_link(Solver *solv, Solvable *s, Map *m, Queue *workq)
 #endif
 
 /*-------------------------------------------------------------------
- * 
+ *
  * add (install) rules for solvable
- * 
+ *
  * s: Solvable for which to add rules
  * m: m[s] = 1 for solvables which have rules, prevent rule duplication
- * 
+ *
  * Algorithm: 'visit all nodes of a graph'. The graph nodes are
  *  solvables, the edges their dependencies.
  *  Starting from an installed solvable, this will create all rules
  *  representing the graph created by the solvables dependencies.
- * 
+ *
  * for unfulfilled requirements, conflicts, obsoletes,....
  * add a negative assertion for solvables that are not installable
- * 
+ *
  * It will also create rules for all solvables referenced by 's'
  *  i.e. descend to all providers of requirements of 's'
  *
@@ -556,7 +556,7 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
      And buffer for it. */
   Queue workq;
   Id workqbuf[64];
-    
+
   int i;
     /* if to add rules for broken deps ('rpm -V' functionality)
      * 0 = yes, 1 = no
@@ -607,7 +607,7 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
       if (!dontfix)
        {
          if (s->arch == ARCH_SRC || s->arch == ARCH_NOSRC
-               ? pool_disabled_solvable(pool, s) 
+               ? pool_disabled_solvable(pool, s)
                : !pool_installable(pool, s))
            {
              POOL_DEBUG(SOLV_DEBUG_RULE_CREATION, "package %s [%d] is not installable\n", pool_solvable2str(pool, s), (Id)(s - pool->solvables));
@@ -645,7 +645,7 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
                    * that are already broken. so if we find one provider
                    * that was already installed, we know that the
                    * dependency was not broken before so we enforce it */
-                
+
                  /* check if any of the providers for 'req' is installed */
                  for (i = 0; (p = dp[i]) != 0; i++)
                    {
@@ -763,7 +763,7 @@ solver_addrpmrulesforsolvable(Solver *solv, Solvable *s, Map *m)
              /* foreach obsoletes */
              while ((obs = *obsp++) != 0)
                {
-                 /* foreach provider of an obsoletes of 's' */ 
+                 /* foreach provider of an obsoletes of 's' */
                  FOR_PROVIDES(p, pp, obs)
                    {
                      Solvable *ps = pool->solvables + p;
@@ -877,7 +877,7 @@ solver_addrpmrulesforlinked(Solver *solv, Map *m)
 #endif
 
 /*-------------------------------------------------------------------
- * 
+ *
  * Add rules for packages possibly selected in by weak dependencies
  *
  * m: already added solvables
@@ -933,9 +933,9 @@ solver_addrpmrulesforweak(Solver *solv, Map *m)
 
 
 /*-------------------------------------------------------------------
- * 
+ *
  * add package rules for possible updates
- * 
+ *
  * s: solvable
  * m: map of already visited solvables
  * allow_all: 0 = dont allow downgrades, 1 = allow all candidates
@@ -1028,7 +1028,7 @@ addduppackages(Solver *solv, Solvable *s, Queue *qs)
 }
 
 /*-------------------------------------------------------------------
- * 
+ *
  * add rule for update
  *   (A|A1|A2|A3...)  An = update candidates for A
  *
@@ -1109,7 +1109,7 @@ solver_addupdaterule(Solver *solv, Solvable *s, int allow_all)
   solver_addrule(solv, p, d);  /* allow update of s */
 }
 
-static inline void 
+static inline void
 disableupdaterule(Solver *solv, Id p)
 {
   Rule *r;
@@ -1131,7 +1131,7 @@ disableupdaterule(Solver *solv, Id p)
     }
 }
 
-static inline void 
+static inline void
 reenableupdaterule(Solver *solv, Id p)
 {
   Pool *pool = solv->pool;
@@ -1140,7 +1140,7 @@ reenableupdaterule(Solver *solv, Id p)
   MAPCLR(&solv->noupdate, p - solv->installed->start);
   r = solv->rules + solv->updaterules + (p - solv->installed->start);
   if (r->p)
-    {    
+    {
       if (r->d < 0)
        {
          solver_enablerule(solv, r);
@@ -1315,15 +1315,15 @@ reenableinfarchrule(Solver *solv, Id name)
  ***
  ***/
 
-static inline void 
+static inline void
 add_cleandeps_package(Solver *solv, Id p)
 {
   if (!solv->cleandeps_updatepkgs)
-    {    
+    {
       solv->cleandeps_updatepkgs = solv_calloc(1, sizeof(Queue));
       queue_init(solv->cleandeps_updatepkgs);
-    }    
-  queue_pushunique(solv->cleandeps_updatepkgs, p); 
+    }
+  queue_pushunique(solv->cleandeps_updatepkgs, p);
 }
 
 static inline void
@@ -1549,21 +1549,21 @@ disableduprule(Solver *solv, Id name)
   Pool *pool = solv->pool;
   Rule *r;
   int i;
-  for (i = solv->duprules, r = solv->rules + i; i < solv->duprules_end; i++, r++) 
-    {    
+  for (i = solv->duprules, r = solv->rules + i; i < solv->duprules_end; i++, r++)
+    {
       if (r->p < 0 && r->d >= 0 && pool->solvables[-r->p].name == name)
        solver_disablerule(solv, r);
-    }    
+    }
 }
 
-static inline void 
+static inline void
 reenableduprule(Solver *solv, Id name)
 {
   Pool *pool = solv->pool;
   Rule *r;
   int i;
-  for (i = solv->duprules, r = solv->rules + i; i < solv->duprules_end; i++, r++) 
-    {    
+  for (i = solv->duprules, r = solv->rules + i; i < solv->duprules_end; i++, r++)
+    {
       if (r->p < 0 && r->d < 0 && pool->solvables[-r->p].name == name)
        {
          solver_enablerule(solv, r);
@@ -1590,7 +1590,7 @@ reenableduprule(Solver *solv, Id name)
 #define DISABLE_INFARCH        2
 #define DISABLE_DUP    3
 
-/* 
+/*
  * add all installed packages that package p obsoletes to Queue q.
  * Package p is not installed. Also, we know that if
  * solv->keepexplicitobsoletes is not set, p is not in the multiversion map.
@@ -1615,7 +1615,7 @@ add_obsoletes(Solver *solv, Id p, Queue *q)
            continue;
          if (!pool->implicitobsoleteusesprovides && ps->name != s->name)
            continue;
-         if (pool->implicitobsoleteusescolors && !pool_colormatch(pool, s, ps)) 
+         if (pool->implicitobsoleteusescolors && !pool_colormatch(pool, s, ps))
            continue;
          queue_push(q, p2);
          lastp2 = p2;
@@ -1625,14 +1625,14 @@ add_obsoletes(Solver *solv, Id p, Queue *q)
     return;
   obsp = s->repo->idarraydata + s->obsoletes;
   while ((obs = *obsp++) != 0)
-    FOR_PROVIDES(p2, pp2, obs) 
+    FOR_PROVIDES(p2, pp2, obs)
       {
        Solvable *ps = pool->solvables + p2;
        if (ps->repo != installed)
          continue;
        if (!pool->obsoleteusesprovides && !pool_match_nevr(pool, ps, obs))
          continue;
-       if (pool->obsoleteusescolors && !pool_colormatch(pool, s, ps)) 
+       if (pool->obsoleteusescolors && !pool_colormatch(pool, s, ps))
          continue;
        if (p2 == lastp2)
          continue;
@@ -2256,7 +2256,7 @@ solver_allruleinfos(Solver *solv, Id rid, Queue *rq)
     {
       if (j)
        {
-         if (rq->elements[i] == rq->elements[j - 4] && 
+         if (rq->elements[i] == rq->elements[j - 4] &&
              rq->elements[i + 1] == rq->elements[j - 3] &&
              rq->elements[i + 2] == rq->elements[j - 2] &&
              rq->elements[i + 3] == rq->elements[j - 1])
@@ -2816,9 +2816,9 @@ static void
 prune_to_update_targets(Solver *solv, Id *cp, Queue *q)
 {
   int i, j;
-  Id p, *cp2; 
+  Id p, *cp2;
   for (i = j = 0; i < q->count; i++)
-    {  
+    {
       p = q->elements[i];
       for (cp2 = cp; *cp2; cp2++)
         if (*cp2 == p)
@@ -3225,7 +3225,7 @@ solver_createcleandepsmap(Solver *solv, Map *cleandepsmap, int unneeded)
            }
        }
     }
-  
+
   /* add all positive elements (e.g. locks) to "userinstalled" */
   for (rid = solv->jobrules; rid < solv->jobrules_end; rid++)
     {
@@ -3612,7 +3612,7 @@ solver_createcleandepsmap(Solver *solv, Map *cleandepsmap, int unneeded)
            }
        }
     }
-    
+
   queue_free(&iq);
   /* make sure the updatepkgs and mistakes are not in the cleandeps map */
   if (solv->cleandeps_updatepkgs)
index 9e7f9eb..e597a31 100644 (file)
@@ -576,7 +576,7 @@ selection_filelist(Pool *pool, Queue *selection, const char *name, int flags)
   dataiterator_free(&di);
   if (!q.count)
     return 0;
-  if (q.count > 1) 
+  if (q.count > 1)
     queue_push2(selection, SOLVER_SOLVABLE_ONE_OF, pool_queuetowhatprovides(pool, &q));
   else
     queue_push2(selection, SOLVER_SOLVABLE | SOLVER_NOAUTOSET, q.elements[0]);
@@ -589,19 +589,19 @@ splitrel(char *rname, char *r, int *rflagsp)
 {
   int nend = r - rname;
   int rflags = 0;
-  if (nend && *r == '=' && r[-1] == '!') 
+  if (nend && *r == '=' && r[-1] == '!')
     {
       nend--;
       r++;
       rflags = REL_LT|REL_GT;
     }
-  for (; *r; r++) 
+  for (; *r; r++)
     {
-      if (*r == '<') 
+      if (*r == '<')
        rflags |= REL_LT;
-      else if (*r == '=') 
+      else if (*r == '=')
        rflags |= REL_EQ;
-      else if (*r == '>') 
+      else if (*r == '>')
        rflags |= REL_GT;
       else
        break;
@@ -610,10 +610,10 @@ splitrel(char *rname, char *r, int *rflagsp)
     r++;
   while (nend && (rname[nend - 1] == ' ' || rname[nend - 1] == '\t'))
     nend--;
-  if (!*rname || !*r) 
+  if (!*rname || !*r)
     return 0;
   *rflagsp = rflags;
-  rname[nend] = 0; 
+  rname[nend] = 0;
   return r;
 }
 
@@ -622,7 +622,7 @@ selection_rel(Pool *pool, Queue *selection, const char *name, int flags)
 {
   int ret, rflags = 0;
   char *r, *rname;
-  
+
   /* relation case, support:
    * depglob rel
    * depglob.arch rel
@@ -803,7 +803,7 @@ selection_canon(Pool *pool, Queue *selection, const char *name, int flags)
     return 0;
   rname = solv_strdup(name);   /* so we can modify it */
   r = rname + (r - name);
-  *r = 0; 
+  *r = 0;
 
   /* split off potential arch part from version */
   if ((r2 = strrchr(r + 1, '.')) != 0 && r2[1] && (archid = str2archid(pool, r2 + 1)) != 0)
@@ -820,8 +820,8 @@ selection_canon(Pool *pool, Queue *selection, const char *name, int flags)
          solv_free(rname);
          return 0;
        }
-      *r = '-'; 
-      *r2 = 0; 
+      *r = '-';
+      *r2 = 0;
       r = r2;
       if ((ret = selection_depglob(pool, selection, rname, flags)) == 0)
        {
@@ -967,19 +967,19 @@ pool_is_kind(Pool *pool, Id name, Id kind)
     return 1;
   n = pool_id2str(pool, name);
   if (kind != 1)
-    {    
+    {
       const char *kn = pool_id2str(pool, kind);
       int knl = strlen(kn);
-      return !strncmp(n, kn, knl) && n[knl] == ':' ? 1 : 0; 
-    }    
-  else 
-    {    
-      if (*n == ':') 
+      return !strncmp(n, kn, knl) && n[knl] == ':' ? 1 : 0;
+    }
+  else
+    {
+      if (*n == ':')
         return 1;
-      while(*n >= 'a' && *n <= 'z') 
+      while(*n >= 'a' && *n <= 'z')
         n++;
-      return *n == ':' ? 0 : 1; 
-    }    
+      return *n == ':' ? 0 : 1;
+    }
 }
 
 void
@@ -1107,7 +1107,7 @@ selection_filter(Pool *pool, Queue *sel1, Queue *sel2)
          sel1->elements[j] = sel1->elements[i] | setflags;
          sel1->elements[j + 1] = sel1->elements[i + 1];
        }
-      else if (q1.count > 1) 
+      else if (q1.count > 1)
        {
          sel1->elements[j] = (sel1->elements[i] & ~SOLVER_SELECTMASK) | SOLVER_SOLVABLE_ONE_OF | setflags;
          sel1->elements[j + 1] = pool_queuetowhatprovides(pool, &q1);
index 7ace910..3ca9404 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * FILE:       sha2.c
  * AUTHOR:     Aaron D. Gifford <me@aarongifford.com>
- * 
+ *
  * Copyright (c) 2000-2001, Aaron D. Gifford
  * All rights reserved.
  *
@@ -16,7 +16,7 @@
  * 3. Neither the name of the copyright holder nor the names of contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -83,7 +83,7 @@
  *
  * And for little-endian machines, add:
  *
- *   #define BYTE_ORDER LITTLE_ENDIAN 
+ *   #define BYTE_ORDER LITTLE_ENDIAN
  *
  * Or for big-endian machines:
  *
@@ -489,7 +489,7 @@ static void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
                s1 = sigma1_256(s1);
 
                /* Apply the SHA-256 compression function to update a..h */
-               T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + 
+               T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] +
                     (W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0);
                T2 = Sigma0_256(a) + Maj(a, b, c);
                h = g;
index c07f4c8..108d2f0 100644 (file)
@@ -392,7 +392,7 @@ solvable_lookup_sourcepkg(Solvable *s)
       str = pool_tmpappend(pool, str, ".", pool_id2str(pool, archid));
       return pool_tmpappend(pool, str, ".rpm", 0);
     }
-  else 
+  else
     return name;       /* FIXME */
 }
 
@@ -409,14 +409,14 @@ static inline Id dep2name(Pool *pool, Id dep)
   return dep;
 }
 
-static int providedbyinstalled_multiversion(Pool *pool, Map *installed, Id n, Id con) 
+static int providedbyinstalled_multiversion(Pool *pool, Map *installed, Id n, Id con)
 {
   Id p, pp;
-  Solvable *sn = pool->solvables + n; 
+  Solvable *sn = pool->solvables + n;
 
   FOR_PROVIDES(p, pp, sn->name)
-    {    
-      Solvable *s = pool->solvables + p; 
+    {
+      Solvable *s = pool->solvables + p;
       if (s->name != sn->name || s->arch != sn->arch)
         continue;
       if (!MAPTST(installed, p))
@@ -424,7 +424,7 @@ static int providedbyinstalled_multiversion(Pool *pool, Map *installed, Id n, Id
       if (pool_match_nevr(pool, pool->solvables + p, con))
         continue;
       return 1;         /* found installed package that doesn't conflict */
-    }    
+    }
   return 0;
 }
 
@@ -616,7 +616,7 @@ solvable_trivial_installable_repo(Solvable *s, Repo *installed, Map *multiversio
 static int
 pool_illegal_vendorchange(Pool *pool, Solvable *s1, Solvable *s2)
 {
-  Id v1, v2; 
+  Id v1, v2;
   Id vendormask1, vendormask2;
 
   if (pool->custom_vendorcheck)
@@ -624,7 +624,7 @@ pool_illegal_vendorchange(Pool *pool, Solvable *s1, Solvable *s2)
   /* treat a missing vendor as empty string */
   v1 = s1->vendor ? s1->vendor : ID_EMPTY;
   v2 = s2->vendor ? s2->vendor : ID_EMPTY;
-  if (v1 == v2) 
+  if (v1 == v2)
     return 0;
   vendormask1 = pool_vendor2mask(pool, v1);
   if (!vendormask1)
@@ -695,7 +695,7 @@ solvable_is_irrelevant_patch(Solvable *s, Map *installedmap)
 /*
  * Create maps containing the state of each solvable. Input is a "installed" queue,
  * it contains all solvable ids that are considered to be installed.
- * 
+ *
  * The created maps can be used for solvable_trivial_installable_map(),
  * pool_calc_duchanges(), pool_calc_installsizechange().
  *
index fa01e20..3d23b5b 100644 (file)
@@ -238,7 +238,7 @@ autouninstall(Solver *solv, Id *problem)
 /************************************************************************/
 
 /*
- * enable/disable learnt rules 
+ * enable/disable learnt rules
  *
  * we have enabled or disabled some of our rules. We now reenable all
  * of our learnt rules except the ones that were learnt from rules that
@@ -287,7 +287,7 @@ enabledisablelearntrules(Solver *solv)
 
 /*
  * make assertion rules into decisions
- * 
+ *
  * Go through rules and add direct assertions to the decisionqueue.
  * If we find a conflict, disable rules and add them to problem queue.
  */
@@ -327,7 +327,7 @@ makeruledecisions(Solver *solv)
        {
          ri = solv->ruleassertions.elements[ii];
          r = solv->rules + ri;
-           
+
           if (havedisabled && ri >= solv->learntrules)
            {
              /* just started with learnt rule assertions. If we have disabled
@@ -335,7 +335,7 @@ makeruledecisions(Solver *solv)
              enabledisablelearntrules(solv);
              havedisabled = 0;
            }
-           
+
          if (r->d < 0 || !r->p || r->w2)       /* disabled, dummy or no assertion */
            continue;
 
@@ -345,7 +345,7 @@ makeruledecisions(Solver *solv)
 
          v = r->p;
          vv = v > 0 ? v : -v;
-           
+
          if (!solv->decisionmap[vv])          /* if not yet decided */
            {
              queue_push(&solv->decisionq, v);
@@ -367,15 +367,15 @@ makeruledecisions(Solver *solv)
            continue;
          if (v < 0 && solv->decisionmap[vv] < 0)    /* ok to remove */
            continue;
-           
+
          /*
           * found a conflict!
-          * 
+          *
           * The rule (r) we're currently processing says something
           * different (v = r->p) than a previous decision (decisionmap[abs(v)])
           * on this literal
           */
-           
+
          if (ri >= solv->learntrules)
            {
              /* conflict with a learnt rule */
@@ -385,7 +385,7 @@ makeruledecisions(Solver *solv)
              solver_disablerule(solv, r);
              continue;
            }
-           
+
          /*
           * find the decision which is the "opposite" of the rule
           */
@@ -394,7 +394,7 @@ makeruledecisions(Solver *solv)
              break;
          assert(i < solv->decisionq.count);         /* assert that we found it */
          oldproblemcount = solv->problems.count;
-           
+
          /*
           * conflict with system solvable ?
           */
@@ -456,7 +456,7 @@ makeruledecisions(Solver *solv)
          /*
           * conflict with another job or update/feature rule
           */
-           
+
          /* record proof */
          if (record_proof)
            {
@@ -540,7 +540,7 @@ makeruledecisions(Solver *solv)
            continue;
          if (v < 0 && solv->decisionmap[vv] < 0)
            continue;
-           
+
          POOL_DEBUG(SOLV_DEBUG_UNSOLVABLE, "assertion conflict, but I am weak, disabling ");
          solver_printrule(solv, SOLV_DEBUG_UNSOLVABLE, r);
 
@@ -604,7 +604,7 @@ makewatches(Solver *solv)
  *
  * add watches (for a new learned rule)
  * sets up watches for a single rule
- * 
+ *
  * see also makewatches() above.
  */
 
@@ -635,14 +635,14 @@ addwatches_rule(Solver *solv, Rule *r)
 #define DECISIONMAP_UNDEF(p) (decisionmap[(p) > 0 ? (p) : -(p)] == 0)
 
 /*-------------------------------------------------------------------
- * 
+ *
  * propagate
  *
  * make decision and propagate to all rules
- * 
+ *
  * Evaluate each term affected by the decision (linked through watches).
  * If we find unit rules we make new decisions based on them.
- * 
+ *
  * return : 0 = everything is OK
  *          rule = conflict found in this rule
  */
@@ -656,7 +656,7 @@ propagate(Solver *solv, int level)
   Id p, pkg, other_watch;
   Id *dp;
   Id *decisionmap = solv->decisionmap;
-    
+
   Id *watches = solv->watches + pool->nsolvables;   /* place ptr in middle */
 
   POOL_DEBUG(SOLV_DEBUG_PROPAGATE, "----- propagate -----\n");
@@ -697,7 +697,7 @@ propagate(Solver *solv, int level)
            }
 
            /* 'pkg' was just decided (was set to FALSE)
-            * 
+            *
             *  now find other literal watch, check clause
             *   and advance on linked list
             */
@@ -711,8 +711,8 @@ propagate(Solver *solv, int level)
              other_watch = r->w1;
              next_rp = &r->n2;
            }
-           
-           /* 
+
+           /*
             * This term is already true (through the other literal)
             * so we have nothing to do
             */
@@ -721,17 +721,17 @@ propagate(Solver *solv, int level)
 
            /*
             * The other literal is FALSE or UNDEF
-            * 
+            *
             */
-           
+
           if (r->d)
            {
              /* Not a binary clause, try to move our watch.
-              * 
+              *
               * Go over all literals and find one that is
               *   not other_watch
               *   and not FALSE
-              * 
+              *
               * (TRUE is also ok, in that case the rule is fulfilled)
               */
              if (r->p                                /* we have a 'p' */
@@ -766,10 +766,10 @@ propagate(Solver *solv, int level)
                      else
                        POOL_DEBUG(SOLV_DEBUG_PROPAGATE,"    -> move w%d to !%s\n", (pkg == r->w1 ? 1 : 2), pool_solvid2str(pool, -p));
                    }
-                   
+
                  *rp = *next_rp;
                  next_rp = rp;
-                   
+
                  if (pkg == r->w1)
                    {
                      r->w1 = p;
@@ -786,14 +786,14 @@ propagate(Solver *solv, int level)
              /* search failed, thus all unwatched literals are FALSE */
                
            } /* not binary */
-           
+
           /*
           * unit clause found, set literal other_watch to TRUE
           */
 
          if (DECISIONMAP_FALSE(other_watch))      /* check if literal is FALSE */
            return r;                              /* eek, a conflict! */
-           
+
          IF_POOLDEBUG (SOLV_DEBUG_PROPAGATE)
            {
              POOL_DEBUG(SOLV_DEBUG_PROPAGATE, "  unit ");
@@ -804,7 +804,7 @@ propagate(Solver *solv, int level)
             decisionmap[other_watch] = level;    /* install! */
          else
            decisionmap[-other_watch] = -level;  /* remove! */
-           
+
          queue_push(&solv->decisionq, other_watch);
          queue_push(&solv->decisionq_why, r - solv->rules);
 
@@ -815,11 +815,11 @@ propagate(Solver *solv, int level)
              else
                POOL_DEBUG(SOLV_DEBUG_PROPAGATE, "    -> decided to conflict %s\n", pool_solvid2str(pool, -other_watch));
            }
-           
+
        } /* foreach rule involving 'pkg' */
        
     } /* while we have non-decided decisions */
-    
+
   POOL_DEBUG(SOLV_DEBUG_PROPAGATE, "----- propagate end-----\n");
 
   return 0;    /* all is well */
@@ -830,7 +830,7 @@ propagate(Solver *solv, int level)
 /* Analysis */
 
 /*-------------------------------------------------------------------
- * 
+ *
  * analyze
  *   and learn
  */
@@ -957,9 +957,9 @@ l1retry:
 
 
 /*-------------------------------------------------------------------
- * 
+ *
  * solver_reset
- * 
+ *
  * reset all solver decisions
  * called after rules have been enabled/disabled
  */
@@ -994,7 +994,7 @@ solver_reset(Solver *solv)
 
 
 /*-------------------------------------------------------------------
- * 
+ *
  * analyze_unsolvable_rule
  *
  * recursion helper used by analyze_unsolvable
@@ -1056,7 +1056,7 @@ analyze_unsolvable_rule(Solver *solv, Rule *r, Id *lastweakp, Map *rseen)
 
 
 /*-------------------------------------------------------------------
- * 
+ *
  * analyze_unsolvable
  *
  * We know that the problem is not solvable. Record all involved
@@ -1218,7 +1218,7 @@ analyze_unsolvable(Solver *solv, Rule *cr, int disablerules)
 /* Decision revert */
 
 /*-------------------------------------------------------------------
- * 
+ *
  * revert
  * revert decisionq to a level
  */
@@ -1248,20 +1248,20 @@ revert(Solver *solv, int level)
     }
   solv->recommends_index = -1;
   if (solv->decisionq.count < solv->decisioncnt_update)
-    solv->decisioncnt_update = 0; 
+    solv->decisioncnt_update = 0;
   if (solv->decisionq.count < solv->decisioncnt_keep)
-    solv->decisioncnt_keep = 0; 
+    solv->decisioncnt_keep = 0;
   if (solv->decisionq.count < solv->decisioncnt_resolve)
-    solv->decisioncnt_resolve = 0; 
+    solv->decisioncnt_resolve = 0;
   if (solv->decisionq.count < solv->decisioncnt_weak)
     solv->decisioncnt_weak= 0;
   if (solv->decisionq.count < solv->decisioncnt_orphan)
-    solv->decisioncnt_orphan = 0; 
+    solv->decisioncnt_orphan = 0;
 }
 
 
 /*-------------------------------------------------------------------
- * 
+ *
  * watch2onhighest - put watch2 on literal with highest level
  */
 
@@ -1290,7 +1290,7 @@ watch2onhighest(Solver *solv, Rule *r)
 
 
 /*-------------------------------------------------------------------
- * 
+ *
  * setpropagatelearn
  *
  * add free decision (solvable to install) to decisionq
@@ -1412,9 +1412,9 @@ reorder_dq_for_jobrules(Solver *solv, int level, Queue *dq)
 }
 
 /*-------------------------------------------------------------------
- * 
+ *
  * select and install
- * 
+ *
  * install best package from the queue. We add an extra package, inst, if
  * provided. See comment in weak install section.
  *
@@ -1467,7 +1467,7 @@ selectandinstall(Solver *solv, int level, Queue *dq, int disablerules, Id ruleid
 
 
 /*-------------------------------------------------------------------
- * 
+ *
  * solver_create
  * create solver structure
  *
@@ -1525,7 +1525,7 @@ solver_create(Pool *pool)
 
 
 /*-------------------------------------------------------------------
- * 
+ *
  * solver_free
  */
 
@@ -1751,7 +1751,7 @@ prune_to_update_targets(Solver *solv, Id *cp, Queue *q)
 }
 
 /*-------------------------------------------------------------------
- * 
+ *
  * solver_run_sat
  *
  * all rules have been set up, now actually run the solver
@@ -1801,7 +1801,7 @@ solver_run_sat(Solver *solv, int disablerules, int doweak)
    * if we encounter a problem, we rewind to a safe level and restart
    * with step 1
    */
-   
+
   minimizationsteps = 0;
   for (;;)
     {
@@ -1895,7 +1895,7 @@ solver_run_sat(Solver *solv, int disablerules, int doweak)
          int pass;
 
          POOL_DEBUG(SOLV_DEBUG_SOLVER, "resolving installed packages\n");
-         /* we use two passes if we need to update packages 
+         /* we use two passes if we need to update packages
            * to create a better user experience */
          for (pass = solv->updatemap.size ? 0 : 1; pass < 2; pass++)
            {
@@ -2597,7 +2597,7 @@ solver_run_sat(Solver *solv, int disablerules, int doweak)
 
 
 /*-------------------------------------------------------------------
- * 
+ *
  * remove disabled conflicts
  *
  * purpose: update the decisionmap after some rules were disabled.
@@ -2842,7 +2842,7 @@ add_update_target(Solver *solv, Id p, Id how)
       Id obs, *obsp = s->repo->idarraydata + s->obsoletes;
       while ((obs = *obsp++) != 0)
        {
-         FOR_PROVIDES(pi, pip, obs) 
+         FOR_PROVIDES(pi, pip, obs)
            {
              Solvable *si = pool->solvables + pi;
              if (si->repo != installed)
@@ -2957,7 +2957,7 @@ addedmap2deduceq(Solver *solv, Map *addedmap)
       j++;
 }
 
-static void 
+static void
 deduceq2addedmap(Solver *solv, Map *addedmap)
 {
   int j;
@@ -3095,7 +3095,7 @@ solver_solve(Solver *solv, Queue *job)
       map_free(&solv->cleandepsmap);
       map_init(&solv->cleandepsmap, 0);
     }
-  
+
   queue_empty(&solv->weakruleq);
   solv->watches = solv_free(solv->watches);
   queue_empty(&solv->ruletojob);
@@ -3119,7 +3119,7 @@ solver_solve(Solver *solv, Queue *job)
       solv->recommends_index = 0;
     }
   solv->multiversionupdaters = solv_free(solv->multiversionupdaters);
-  
+
 
   /*
    * create basic rule set of all involved packages
@@ -3148,7 +3148,7 @@ solver_solve(Solver *solv, Queue *job)
     solver_shrinkrules(solv, initialnrules);
   solv->nrules = initialnrules;
   solv->rpmrules_end = 0;
-  
+
   if (installed)
     {
       /* check for update/verify jobs as they need to be known early */
@@ -3259,7 +3259,7 @@ solver_solve(Solver *solv, Queue *job)
    * create rules for all packages involved in the job
    * (to be installed or removed)
    */
-    
+
   oldnrules = solv->nrules;
   for (i = 0; i < job->count; i += 2)
     {
@@ -3293,7 +3293,7 @@ solver_solve(Solver *solv, Queue *job)
     }
   POOL_DEBUG(SOLV_DEBUG_STATS, "added %d rpm rules for packages involved in a job\n", solv->nrules - oldnrules);
 
-    
+
   /*
    * add rules for suggests, enhances
    */
@@ -3345,16 +3345,16 @@ solver_solve(Solver *solv, Queue *job)
 
   /*
    * create feature rules
-   * 
+   *
    * foreach installed:
    *   create assertion (keep installed, if no update available)
    *   or
    *   create update rule (A|update1(A)|update2(A)|...)
-   * 
+   *
    * those are used later on to keep a version of the installed packages in
    * best effort mode
    */
-    
+
   solv->featurerules = solv->nrules;              /* mark start of feature rules */
   if (installed)
     {
@@ -3375,11 +3375,11 @@ solver_solve(Solver *solv, Queue *job)
 
     /*
      * Add update rules for installed solvables
-     * 
+     *
      * almost identical to feature rules
      * except that downgrades/archchanges/vendorchanges are not allowed
      */
-    
+
   solv->updaterules = solv->nrules;
 
   if (installed)
@@ -3655,7 +3655,7 @@ solver_solve(Solver *solv, Queue *job)
    * --------------------------------------------------------------
    * prepare for solving
    */
-    
+
   /* free unneeded memory */
   map_free(&addedmap);
   map_free(&installcandidatemap);
@@ -3677,10 +3677,10 @@ solver_solve(Solver *solv, Queue *job)
     map_grow(&solv->cleandepsmap, installed->end - installed->start);
   /* no mistakes */
   if (solv->cleandeps_mistakes)
-    {    
+    {
       queue_free(solv->cleandeps_mistakes);
       solv->cleandeps_mistakes = solv_free(solv->cleandeps_mistakes);
-    }    
+    }
 
   /* all new rules are learnt after this point */
   solv->learntrules = solv->nrules;
@@ -3706,7 +3706,7 @@ solver_solve(Solver *solv, Queue *job)
    * solve!
    * ********************************************
    */
-    
+
   now = solv_timems(0);
   solver_run_sat(solv, 1, solv->dontinstallrecommended ? 0 : 1);
   POOL_DEBUG(SOLV_DEBUG_STATS, "solver took %d ms\n", solv_timems(now));
@@ -3782,7 +3782,7 @@ void solver_get_recommendations(Solver *solv, Queue *recommendationsq, Queue *su
       solver_disablerule(solv, r);
       goterase++;
     }
-  
+
   if (goterase)
     {
       enabledisablelearntrules(solv);
@@ -3873,7 +3873,7 @@ void solver_get_recommendations(Solver *solv, Queue *recommendationsq, Queue *su
   /*
    * find suggested packages
    */
-    
+
   if (suggestionsq)
     {
       Id sug, *sugp, p, pp;
@@ -3938,7 +3938,7 @@ void solver_get_recommendations(Solver *solv, Queue *recommendationsq, Queue *su
   if (redoq.count)
     undo_removedisabledconflicts(solv, &redoq);
   queue_free(&redoq);
-  
+
   /* undo job rule disabling */
   for (i = 0; i < disabledq.count; i++)
     solver_enablerule(solv, solv->rules + disabledq.elements[i]);
@@ -3951,7 +3951,7 @@ void solver_get_recommendations(Solver *solv, Queue *recommendationsq, Queue *su
 /* disk usage computations */
 
 /*-------------------------------------------------------------------
- * 
+ *
  * calculate DU changes
  */
 
@@ -3967,7 +3967,7 @@ solver_calc_duchanges(Solver *solv, DUChanges *mps, int nmps)
 
 
 /*-------------------------------------------------------------------
- * 
+ *
  * calculate changes in install size
  */
 
@@ -4008,7 +4008,7 @@ solver_trivial_installable(Solver *solv, Queue *pkgs, Queue *res)
 }
 
 /*-------------------------------------------------------------------
- * 
+ *
  * decision introspection
  */
 
@@ -4071,7 +4071,7 @@ solver_describe_decision(Solver *solv, Id p, Id *infop)
 {
   int i;
   Id pp, why;
-  
+
   if (infop)
     *infop = 0;
   if (!solv->decisionmap[p])
@@ -4273,7 +4273,7 @@ pool_isemptyupdatejob(Pool *pool, Id how, Id what)
          Id obs, *obsp = s->repo->idarraydata + s->obsoletes;
          while ((obs = *obsp++) != 0)
            {
-             FOR_PROVIDES(pi, pip, obs) 
+             FOR_PROVIDES(pi, pip, obs)
                {
                  Solvable *si = pool->solvables + pi;
                  if (si->repo != pool->installed)
index 9053883..de67079 100644 (file)
@@ -572,18 +572,18 @@ solver_printtrivial(Solver *solv)
   Pool *pool = solv->pool;
   Queue in, out;
   Id p;
-  const char *n; 
-  Solvable *s; 
+  const char *n;
+  Solvable *s;
   int i;
 
   queue_init(&in);
   for (p = 1, s = pool->solvables + p; p < solv->pool->nsolvables; p++, s++)
-    {   
+    {
       n = pool_id2str(pool, s->name);
       if (strncmp(n, "patch:", 6) != 0 && strncmp(n, "pattern:", 8) != 0)
         continue;
-      queue_push(&in, p); 
-    }   
+      queue_push(&in, p);
+    }
   if (!in.count)
     {
       queue_free(&in);
index 364f096..3ad0a80 100644 (file)
@@ -125,7 +125,7 @@ stringpool_strn2id(Stringpool *ss, const char *str, unsigned int len, int create
   if (id || !create)    /* exit here if string found */
     return id;
 
-  /* this should be a test for a flag that tells us if the 
+  /* this should be a test for a flag that tells us if the
    * correct blocking is used, but adding a flag would break
    * the ABI. So we use the existance of the hash area as
    * indication instead */
index a823abf..9781675 100644 (file)
@@ -375,7 +375,7 @@ transaction_type(Transaction *trans, Id p, int mode)
            return SOLVER_TRANSACTION_INSTALL;
        }
     }
-  
+
   /* if there's a match, p will be shown when q
    * is processed */
   if (transaction_obs_pkg(trans, q) == p)
@@ -1188,7 +1188,7 @@ addsolvableedges(struct orderdata *od, Solvable *s)
                }
              if (s2->repo != installed && !MAPTST(&trans->transactsmap, p2))
                continue;               /* package stays uninstalled */
-             
+
              if (s->repo == installed)
                {
                  /* s gets uninstalled */
@@ -1698,7 +1698,7 @@ transaction_order(Transaction *trans, int flags)
 #if 0
   dump_tes(&od);
 #endif
-  
+
   now = solv_timems(0);
   /* kill all cycles */
   queue_init(&todo);
@@ -1858,7 +1858,7 @@ transaction_order(Transaction *trans, int flags)
   queue_empty(tr);
 
   queue_init(&obsq);
-  
+
   lastrepo = 0;
   lastmedia = 0;
   temedianr = solv_calloc(numte, sizeof(Id));