diff options
author | Michael Schroeder <mls@suse.de> | 2014-04-04 18:46:07 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2014-04-04 18:46:07 +0200 |
commit | 05f78a79005deadbb1ce69cbbf6219990ac74e71 (patch) | |
tree | aa55a332c59e0b51c5ecd4db96ad6bdc4122b150 | |
parent | 0c7c5a5d75bdb61398146e5b7c633c164198620c (diff) | |
download | libsolv-05f78a79005deadbb1ce69cbbf6219990ac74e71.tar.gz libsolv-05f78a79005deadbb1ce69cbbf6219990ac74e71.tar.bz2 libsolv-05f78a79005deadbb1ce69cbbf6219990ac74e71.zip |
do not count problem resolution install jobs as userinstalled
-rw-r--r-- | bindings/solv.i | 5 | ||||
-rw-r--r-- | src/problems.c | 2 | ||||
-rw-r--r-- | src/solver.c | 2 | ||||
-rw-r--r-- | src/solver.h | 3 |
4 files changed, 9 insertions, 3 deletions
diff --git a/bindings/solv.i b/bindings/solv.i index 41cb49a..23e7f20 100644 --- a/bindings/solv.i +++ b/bindings/solv.i @@ -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; diff --git a/src/problems.c b/src/problems.c index 75aaa88..7258c04 100644 --- a/src/problems.c +++ b/src/problems.c @@ -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; diff --git a/src/solver.c b/src/solver.c index deb0736..f188e3d 100644 --- a/src/solver.c +++ b/src/solver.c @@ -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) diff --git a/src/solver.h b/src/solver.h index daa0e08..81c5f2b 100644 --- a/src/solver.h +++ b/src/solver.h @@ -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 |