- also look at directly addressed userinstalled solvables
authorMichael Schroeder <mls@suse.de>
Wed, 14 Apr 2010 10:23:07 +0000 (12:23 +0200)
committerMichael Schroeder <mls@suse.de>
Wed, 14 Apr 2010 10:23:07 +0000 (12:23 +0200)
src/rules.c

index c6b1a6b5ca17eab95ed50f0496a3c556422a0df6..c92353b55db615fdbc8e91cea2028449d788ce27 100644 (file)
@@ -2030,15 +2030,13 @@ void solver_createcleandepsmap(Solver *solv)
   for (i = 0; i < job->count; i += 2)
     {
       how = job->elements[i];
-      switch (how & SOLVER_JOBMASK)
+      if ((how & SOLVER_JOBMASK) == SOLVER_USERINSTALLED)
        {
-       case SOLVER_USERINSTALLED:
          what = job->elements[i + 1];
          select = how & SOLVER_SELECTMASK;
          FOR_JOB_SELECT(p, pp, select, what)
            if (pool->solvables[p].repo == installed)
              MAPSET(&userinstalled, p - installed->start);
-         break;
        }
     }
   /* add all positive elements (e.g. locks) to "userinstalled" */
@@ -2192,6 +2190,19 @@ void solver_createcleandepsmap(Solver *solv)
        if (p > 0)
           queue_push(&iq, p);
     }
+  /* also put directly addressed packages on the install queue
+   * so we can mark patterns as installed */
+  for (i = 0; i < job->count; i += 2)
+    {
+      how = job->elements[i];
+      if ((how & SOLVER_JOBMASK) == SOLVER_USERINSTALLED)
+       {
+         what = job->elements[i + 1];
+         select = how & SOLVER_SELECTMASK;
+         if (select == SOLVER_SOLVABLE && pool->solvables[what].repo != installed)
+            queue_push(&iq, what);
+       }
+    }
   while (iq.count)
     {
       ip = queue_shift(&iq);