do not count problem resolution install jobs as userinstalled
authorMichael Schroeder <mls@suse.de>
Fri, 4 Apr 2014 16:46:07 +0000 (18:46 +0200)
committerMichael Schroeder <mls@suse.de>
Fri, 4 Apr 2014 16:46:07 +0000 (18:46 +0200)
bindings/solv.i
src/problems.c
src/solver.c
src/solver.h

index 41cb49a..23e7f20 100644 (file)
@@ -848,6 +848,7 @@ typedef struct {
   static const Id SOLVER_CLEANDEPS = SOLVER_CLEANDEPS;
   static const Id SOLVER_FORCEBEST = SOLVER_FORCEBEST;
   static const Id SOLVER_TARGETED = SOLVER_TARGETED;
+  static const Id SOLVER_NOTBYUSER = SOLVER_NOTBYUSER;
   static const Id SOLVER_SETEV = SOLVER_SETEV;
   static const Id SOLVER_SETEVR = SOLVER_SETEVR;
   static const Id SOLVER_SETARCH = SOLVER_SETARCH;
@@ -2692,9 +2693,9 @@ rb_eval_string(
     if ($self->type == SOLVER_SOLUTION_JOB || SOLVER_SOLUTION_POOLJOB)
       return new_Job($self->solv->pool, SOLVER_NOOP, 0);
     if ($self->type == SOLVER_SOLUTION_INFARCH || $self->type == SOLVER_SOLUTION_DISTUPGRADE || $self->type == SOLVER_SOLUTION_BEST)
-      return new_Job($self->solv->pool, SOLVER_INSTALL|SOLVER_SOLVABLE|extraflags, $self->p);
+      return new_Job($self->solv->pool, SOLVER_INSTALL|SOLVER_SOLVABLE|SOLVER_NOTBYUSER|extraflags, $self->p);
     if ($self->type == SOLVER_SOLUTION_REPLACE || $self->type == SOLVER_SOLUTION_REPLACE_DOWNGRADE || $self->type == SOLVER_SOLUTION_REPLACE_ARCHCHANGE || $self->type == SOLVER_SOLUTION_REPLACE_VENDORCHANGE || $self->type == SOLVER_SOLUTION_REPLACE_NAMECHANGE)
-      return new_Job($self->solv->pool, SOLVER_INSTALL|SOLVER_SOLVABLE|extraflags, $self->rp);
+      return new_Job($self->solv->pool, SOLVER_INSTALL|SOLVER_SOLVABLE|SOLVER_NOTBYUSER|extraflags, $self->rp);
     if ($self->type == SOLVER_SOLUTION_ERASE)
       return new_Job($self->solv->pool, SOLVER_ERASE|SOLVER_SOLVABLE|extraflags, $self->p);
     return 0;
index 75aaa88..7258c04 100644 (file)
@@ -850,7 +850,7 @@ solver_take_solutionelement(Solver *solv, Id p, Id rp, Id extrajobflags, Queue *
   if (rp <= 0 && p <= 0)
     return;    /* just in case */
   if (rp > 0)
-    p = SOLVER_INSTALL|SOLVER_SOLVABLE|extrajobflags;
+    p = SOLVER_INSTALL|SOLVER_SOLVABLE|SOLVER_NOTBYUSER|extrajobflags;
   else
     {
       rp = p;
index deb0736..f188e3d 100644 (file)
@@ -4542,6 +4542,8 @@ solver_get_userinstalled(Solver *solv, Queue *q, int flags)
        }
       if ((how & SOLVER_JOBMASK) != SOLVER_INSTALL)
        continue;
+      if ((how & SOLVER_NOTBYUSER) != 0)
+       continue;
       what = solv->job.elements[i + 1];
       select = how & SOLVER_SELECTMASK;
       FOR_JOB_SELECT(p, pp, select, what)
index daa0e08..81c5f2b 100644 (file)
@@ -234,6 +234,9 @@ typedef struct _Solver Solver;
  * contain an "installed" package unless the
  * NO_AUTOTARGET solver flag is set */
 #define SOLVER_TARGETED                        0x200000
+/* This (SOLVER_INSTALL) job was automatically added
+ * and thus does not the add to the userinstalled packages */
+#define SOLVER_NOTBYUSER               0x400000
 
 #define SOLVER_SETEV                   0x01000000
 #define SOLVER_SETEVR                  0x02000000