Mailinglist Archive: zypp-commit (233 mails)

< Previous Next >
[zypp-commit] <sat-solver> master : - look at infarch/dup rules when creating choice rules, makes dup
  • From: Michael Schroeder <mls@xxxxxxx>
  • Date: Mon, 2 Nov 2009 14:12:33 +0100
  • Message-id: <E1N4wiF-00051Z-AF@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit 04dc85f18e3f7bbf5e0109c113d4285ca74ceab7
Author: Michael Schroeder <mls@xxxxxxx>
Date: Mon Nov 2 14:12:33 2009 +0100

- look at infarch/dup rules when creating choice rules, makes dup
also install 32bit packages [bnc#551637]
---
VERSION.cmake | 4 ++--
package/libsatsolver.changes | 7 +++++++
src/rules.c | 15 ++++++++++++++-
3 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/VERSION.cmake b/VERSION.cmake
index 32c77a8..361a4a3 100644
--- a/VERSION.cmake
+++ b/VERSION.cmake
@@ -46,6 +46,6 @@

SET(LIBSATSOLVER_MAJOR "0")
SET(LIBSATSOLVER_MINOR "14")
-SET(LIBSATSOLVER_PATCH "9")
+SET(LIBSATSOLVER_PATCH "10")

-# last released 0.14.9
+# last released 0.14.10
diff --git a/package/libsatsolver.changes b/package/libsatsolver.changes
index 886264c..a536493 100644
--- a/package/libsatsolver.changes
+++ b/package/libsatsolver.changes
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Mon Nov 2 14:10:23 CET 2009 - mls@xxxxxxx
+
+- look at infarch/dup rules when creating choice rules, makes dup
+ also install 32bit packages [bnc#551637]
+- 0.14.10
+
+-------------------------------------------------------------------
Wed Oct 14 16:21:32 CEST 2009 - mls@xxxxxxx

- ignore products element so that repo2solv works
diff --git a/src/rules.c b/src/rules.c
index 28111de..4629c06 100644
--- a/src/rules.c
+++ b/src/rules.c
@@ -1779,7 +1779,7 @@ void
addchoicerules(Solver *solv)
{
Pool *pool = solv->pool;
- Map m;
+ Map m, mneg;
Rule *r;
Queue q, qi;
int i, j, rid, havechoice;
@@ -1797,6 +1797,14 @@ addchoicerules(Solver *solv)
queue_init(&q);
queue_init(&qi);
map_init(&m, pool->nsolvables);
+ map_init(&mneg, pool->nsolvables);
+ /* set up negative assertion map from infarch and dup rules */
+ for (rid = solv->infarchrules, r = solv->rules + rid; rid <
solv->infarchrules_end; rid++, r++)
+ if (r->p < 0 && !r->w2 && (r->d == 0 || r->d == -1))
+ MAPSET(&mneg, -r->p);
+ for (rid = solv->duprules, r = solv->rules + rid; rid < solv->duprules_end;
rid++, r++)
+ if (r->p < 0 && !r->w2 && (r->d == 0 || r->d == -1))
+ MAPSET(&mneg, -r->p);
for (rid = 1; rid < solv->rpmrules_end ; rid++)
{
r = solv->rules + rid;
@@ -1838,6 +1846,8 @@ addchoicerules(Solver *solv)
continue;
if (!solv->allowvendorchange && s->vendor != s2->vendor &&
policy_illegal_vendorchange(solv, s, s2))
continue;
+ if (MAPSET(&mneg, p2))
+ continue;
queue_push(&qi, p2);
queue_push(&q, p);
continue;
@@ -1869,6 +1879,8 @@ addchoicerules(Solver *solv)
continue;
if (!solv->allowvendorchange && s->vendor != s2->vendor &&
policy_illegal_vendorchange(solv, s, s2))
continue;
+ if (MAPSET(&mneg, p2))
+ continue;
queue_push(&qi, p2);
queue_push(&q, p);
continue;
@@ -1927,6 +1939,7 @@ addchoicerules(Solver *solv)
queue_free(&q);
queue_free(&qi);
map_free(&m);
+ map_free(&mneg);
solv->choicerules_end = solv->nrules;
}

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
List Navigation
This Thread
  • No further messages