Hello community, here is the log from the commit of package libsolv for openSUSE:Factory checked in at 2014-06-23 11:06:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libsolv (Old) and /work/SRC/openSUSE:Factory/.libsolv.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libsolv" Changes: -------- --- /work/SRC/openSUSE:Factory/libsolv/libsolv.changes 2014-04-25 11:33:41.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libsolv.new/libsolv.changes 2014-06-23 11:06:23.000000000 +0200 @@ -1,0 +2,12 @@ +Fri Jun 13 08:28:12 CEST 2014 - [email protected] + +- quick fix for [bnc#881320] +- bump version to 0.6.3 + +------------------------------------------------------------------- +Fri Jun 6 11:37:00 CEST 2014 - [email protected] + +- Provide PRODUCT_REGISTER_TARGET for available products [bnc#881320] +- bump version to 0.6.2 + +------------------------------------------------------------------- Old: ---- libsolv-0.6.1.tar.bz2 New: ---- libsolv-0.6.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libsolv.spec ++++++ --- /var/tmp/diff_new_pack.6Af8Ko/_old 2014-06-23 11:06:24.000000000 +0200 +++ /var/tmp/diff_new_pack.6Af8Ko/_new 2014-06-23 11:06:24.000000000 +0200 @@ -17,7 +17,7 @@ Name: libsolv -Version: 0.6.1 +Version: 0.6.3 Release: 0 Url: git://gitorious.org/opensuse/libsolv.git Source: libsolv-%{version}.tar.bz2 ++++++ libsolv-0.6.1.tar.bz2 -> libsolv-0.6.3.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.6.1/VERSION.cmake new/libsolv-0.6.3/VERSION.cmake --- old/libsolv-0.6.1/VERSION.cmake 2014-04-17 14:50:44.000000000 +0200 +++ new/libsolv-0.6.3/VERSION.cmake 2014-06-13 12:21:20.000000000 +0200 @@ -49,5 +49,5 @@ SET(LIBSOLV_MAJOR "0") SET(LIBSOLV_MINOR "6") -SET(LIBSOLV_PATCH "1") +SET(LIBSOLV_PATCH "3") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.6.1/bindings/solv.i new/libsolv-0.6.3/bindings/solv.i --- old/libsolv-0.6.1/bindings/solv.i 2014-04-08 11:45:12.000000000 +0200 +++ new/libsolv-0.6.3/bindings/solv.i 2014-05-15 14:50:50.000000000 +0200 @@ -2758,6 +2758,9 @@ static const int SOLVER_FLAG_DUP_ALLOW_ARCHCHANGE = SOLVER_FLAG_DUP_ALLOW_ARCHCHANGE; static const int SOLVER_FLAG_DUP_ALLOW_VENDORCHANGE = SOLVER_FLAG_DUP_ALLOW_VENDORCHANGE; static const int SOLVER_FLAG_DUP_ALLOW_NAMECHANGE = SOLVER_FLAG_DUP_ALLOW_NAMECHANGE; + static const int SOLVER_FLAG_KEEP_ORPHANS = SOLVER_FLAG_KEEP_ORPHANS; + static const int SOLVER_FLAG_BREAK_ORPHANS = SOLVER_FLAG_BREAK_ORPHANS; + static const int SOLVER_FLAG_FOCUS_INSTALLED = SOLVER_FLAG_FOCUS_INSTALLED; static const int SOLVER_REASON_UNRELATED = SOLVER_REASON_UNRELATED; static const int SOLVER_REASON_UNIT_RULE = SOLVER_REASON_UNIT_RULE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.6.1/doc/libsolv-bindings.txt new/libsolv-0.6.3/doc/libsolv-bindings.txt --- old/libsolv-0.6.1/doc/libsolv-bindings.txt 2014-04-04 14:10:12.000000000 +0200 +++ new/libsolv-0.6.3/doc/libsolv-bindings.txt 2014-05-15 14:50:50.000000000 +0200 @@ -2081,6 +2081,21 @@ Do not enable auto-targeting up update and distupgrade jobs. See the section on targeted updates for more information. +*SOLVER_FLAG_KEEP_ORPHANS*:: +Do not allow orphaned packages to be deinstalled if they get +in the way of resolving other packages. + +*SOLVER_FLAG_BREAK_ORPHANS*:: +Ignore dependencies of orphaned packages that get in the way +of resolving non-orphaned ones. Setting the flag might result +in no longer working packages in case they are orphaned. + +*SOLVER_FLAG_FOCUS_INSTALLED*:: +Resolve installed packages before resolving the given job. +Setting this flag means that the solver will prefer picking +a package version that fits the other installed packages +over updating installed packages. + Basic rule types: *SOLVER_RULE_UNKNOWN*:: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.6.1/ext/repo_appdata.c new/libsolv-0.6.3/ext/repo_appdata.c --- old/libsolv-0.6.1/ext/repo_appdata.c 2014-04-17 11:25:45.000000000 +0200 +++ new/libsolv-0.6.3/ext/repo_appdata.c 2014-05-16 16:55:50.000000000 +0200 @@ -436,6 +436,7 @@ case STATE_PKGNAME: id = pool_str2id(pd->pool, pd->content, 1); s->requires = repo_addid_dep(pd->repo, s->requires, id, 0); + break; case STATE_KEYWORD: repodata_add_poolstr_array(pd->data, pd->handle, SOLVABLE_KEYWORDS, pd->content); break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.6.1/ext/repo_autopattern.c new/libsolv-0.6.3/ext/repo_autopattern.c --- old/libsolv-0.6.1/ext/repo_autopattern.c 2014-03-27 11:45:51.000000000 +0100 +++ new/libsolv-0.6.3/ext/repo_autopattern.c 2014-06-06 11:45:37.000000000 +0200 @@ -375,6 +375,8 @@ } if (!strcmp(pn, "product-label()") && evr) repodata_set_str(data, s2 - pool->solvables, PRODUCT_SHORTLABEL, newname); + else if (!strcmp(pn, "product-register-target()") && evr) + repodata_set_str(data, s2 - pool->solvables, PRODUCT_REGISTER_TARGET, newname); else if (!strcmp(pn, "product-type()") && evr) repodata_set_str(data, s2 - pool->solvables, PRODUCT_TYPE, newname); else if (!strcmp(pn, "product-cpeid()") && evr) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.6.1/ext/testcase.c new/libsolv-0.6.3/ext/testcase.c --- old/libsolv-0.6.1/ext/testcase.c 2014-04-16 15:20:44.000000000 +0200 +++ new/libsolv-0.6.3/ext/testcase.c 2014-05-15 14:50:50.000000000 +0200 @@ -104,6 +104,7 @@ { SOLVER_FLAG_DUP_ALLOW_NAMECHANGE, "dupallownamechange", 1 }, { SOLVER_FLAG_KEEP_ORPHANS, "keeporphans", 0 }, { SOLVER_FLAG_BREAK_ORPHANS, "breakorphans", 0 }, + { SOLVER_FLAG_FOCUS_INSTALLED, "focusinstalled", 0 }, { 0, 0, 0 } }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.6.1/package/libsolv.changes new/libsolv-0.6.3/package/libsolv.changes --- old/libsolv-0.6.1/package/libsolv.changes 2014-04-17 14:50:44.000000000 +0200 +++ new/libsolv-0.6.3/package/libsolv.changes 2014-06-13 12:21:20.000000000 +0200 @@ -1,4 +1,16 @@ ------------------------------------------------------------------- +Fri Jun 13 08:28:12 CEST 2014 - [email protected] + +- quick fix for [bnc#881320] +- bump version to 0.6.3 + +------------------------------------------------------------------- +Fri Jun 6 11:37:00 CEST 2014 - [email protected] + +- Provide PRODUCT_REGISTER_TARGET for available products [bnc#881320] +- bump version to 0.6.2 + +------------------------------------------------------------------- Thu Apr 17 14:47:42 CEST 2014 - [email protected] - support BREAK_ORPHANS and KEEP_ORPHANS solver flags @@ -177,7 +189,7 @@ Thu Oct 18 16:58:10 CEST 2012 - [email protected] - fix susetags parser, it ignored the filelist of the last - solvable + solvable - fix encoding of large values - bump version to 0.2.0 @@ -235,7 +247,7 @@ ------------------------------------------------------------------- Mon Oct 24 13:26:18 CEST 2011 - [email protected] -- mls fixed package provides/obsoletes, but forgot to write +- mls fixed package provides/obsoletes, but forgot to write a changes entry. ------------------------------------------------------------------- @@ -294,7 +306,7 @@ ------------------------------------------------------------------- Mon Sep 6 12:38:21 UTC 2010 - [email protected] -- SLE10SP3 also has vendor_ruby +- SLE10SP3 also has vendor_ruby ------------------------------------------------------------------- Wed Aug 18 14:11:08 UTC 2010 - [email protected] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.6.1/src/knownid.h new/libsolv-0.6.3/src/knownid.h --- old/libsolv-0.6.1/src/knownid.h 2014-04-04 16:30:12.000000000 +0200 +++ new/libsolv-0.6.3/src/knownid.h 2014-06-06 11:45:37.000000000 +0200 @@ -186,7 +186,7 @@ KNOWNID(PRODUCT_URL_TYPE, "product:url:type"), KNOWNID(PRODUCT_FLAGS, "product:flags"), /* e.g. 'update', 'no_you' */ KNOWNID(PRODUCT_PRODUCTLINE, "product:productline"), /* installed product only */ -KNOWNID(PRODUCT_REGISTER_TARGET, "product:regtarget"), /* installed product only */ +KNOWNID(PRODUCT_REGISTER_TARGET, "product:regtarget"), /* installed and available product */ KNOWNID(PRODUCT_REGISTER_RELEASE, "product:regrelease"), /* installed product only */ KNOWNID(PRODUCT_UPDATES_REPOID, "product:updates:repoid"), KNOWNID(PRODUCT_UPDATES, "product:updates"), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.6.1/src/poolarch.c new/libsolv-0.6.3/src/poolarch.c --- old/libsolv-0.6.1/src/poolarch.c 2013-11-12 12:51:44.000000000 +0100 +++ new/libsolv-0.6.3/src/poolarch.c 2014-05-02 10:52:38.000000000 +0200 @@ -21,18 +21,22 @@ #include "util.h" static const char *archpolicies[] = { +#ifdef FEDORA + "x86_64", "x86_64:athlon:i686:i586:i486:i386", +#else "x86_64", "x86_64:i686:i586:i486:i386", +#endif "i686", "i686:i586:i486:i386", "i586", "i586:i486:i386", "i486", "i486:i386", "i386", "i386", "s390x", "s390x:s390", "s390", "s390", - "ia64", "ia64:i686:i586:i486:i386", + "ppc64le", "ppc64le", "ppc64", "ppc64:ppc", "ppc", "ppc", "ppc64p7", "ppc64p7:ppc64:ppc", - "ppc64le", "ppc64le", + "ia64", "ia64:i686:i586:i486:i386", "aarch64", "aarch64", "armv6hl", "armv6hl", "armv7hnl", "armv7hnl:armv7hl:armv6hl", @@ -57,6 +61,14 @@ "sparc", "sparc", "mipsel", "mipsel", "m68k", "m68k", +#ifdef FEDORA + "ia32e", "ia32e:x86_64:athlon:i686:i586:i486:i386", + "athlon", "athlon:i686:i586:i486:i386", + "amd64", "amd64:x86_64:athlon:i686:i586:i486:i386", + "geode", "geode:i586:i486:i386", + "ppc64iseries", "ppc64iseries:ppc64:ppc", + "ppc64pseries", "ppc64pseries:ppc64:ppc", +#endif 0 }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.6.1/src/poolid.c new/libsolv-0.6.3/src/poolid.c --- old/libsolv-0.6.1/src/poolid.c 2013-10-18 11:56:44.000000000 +0200 +++ new/libsolv-0.6.3/src/poolid.c 2014-05-07 14:55:44.000000000 +0200 @@ -151,23 +151,25 @@ rd = GETRELDEP(pool, id); switch (rd->flags) { - case 0: case 2: case 3: - case 6: case 7: + /* debian special cases < and > */ + /* haiku special cases <> (maybe we should use != for the others as well */ + case 0: case REL_EQ: case REL_GT | REL_EQ: + case REL_LT | REL_EQ: case REL_LT | REL_EQ | REL_GT: #if !defined(DEBIAN) && !defined(MULTI_SEMANTICS) - case 1: case 4: + case REL_LT: case REL_GT: #endif #if !defined(HAIKU) && !defined(MULTI_SEMANTICS) - case 5: + case REL_LT | REL_GT: #endif return rels[rd->flags]; #if defined(DEBIAN) || defined(MULTI_SEMANTICS) - case 1: + case REL_GT: return pool->disttype == DISTTYPE_DEB ? " >> " : rels[rd->flags]; - case 4: + case REL_LT: return pool->disttype == DISTTYPE_DEB ? " << " : rels[rd->flags]; #endif #if defined(HAIKU) || defined(MULTI_SEMANTICS) - case 5: + case REL_LT | REL_GT: return pool->disttype == DISTTYPE_HAIKU ? " != " : rels[rd->flags]; #endif case REL_AND: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.6.1/src/rules.c new/libsolv-0.6.3/src/rules.c --- old/libsolv-0.6.1/src/rules.c 2014-04-17 14:20:44.000000000 +0200 +++ new/libsolv-0.6.3/src/rules.c 2014-04-22 18:20:45.000000000 +0200 @@ -1249,8 +1249,8 @@ if (!allow_all && !p && solv->dupmap_all) { queue_push(&solv->orphaned, s - pool->solvables); /* an orphaned package */ - if (solv->keep_orphans) - p = s - pool->solvables; + if (solv->keep_orphans && !(solv->droporphanedmap_all || (solv->droporphanedmap.size && MAPTST(&solv->droporphanedmap, s - pool->solvables - solv->installed->start)))) + p = s - pool->solvables; /* keep this orphaned package installed */ } if (!allow_all && qs.count && solv->multiversion.size) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.6.1/src/solvable.c new/libsolv-0.6.3/src/solvable.c --- old/libsolv-0.6.1/src/solvable.c 2014-01-28 13:45:51.000000000 +0100 +++ new/libsolv-0.6.3/src/solvable.c 2014-06-13 12:21:20.000000000 +0200 @@ -745,19 +745,27 @@ /* Tests if two solvables have identical content. Currently * both solvables need to come from the same pool */ + +#warning HOTFIX [Bug 881493] New: zypper dup does always update sles-release +inline int isProduct(const char *name) +{ return name && strncmp(name, "product:", 8) == 0; } + int solvable_identical(Solvable *s1, Solvable *s2) { unsigned int bt1, bt2; Id rq1, rq2; Id *reqp; - if (s1->name != s2->name) return 0; if (s1->arch != s2->arch) return 0; if (s1->evr != s2->evr) return 0; + + if (isProduct(pool_id2str(s1->repo->pool, s1->name))) // HOTFIX [Bug 881493] end check for products here + return 1; + /* map missing vendor to empty string */ if ((s1->vendor ? s1->vendor : 1) != (s2->vendor ? s2->vendor : 1)) return 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.6.1/src/solver.c new/libsolv-0.6.3/src/solver.c --- old/libsolv-0.6.1/src/solver.c 2014-04-17 14:20:44.000000000 +0200 +++ new/libsolv-0.6.3/src/solver.c 2014-06-03 16:36:11.000000000 +0200 @@ -1250,6 +1250,8 @@ } if (solv->recommends_index > solv->decisionq.count) solv->recommends_index = -1; /* rebuild recommends/suggests maps */ + if (solv->decisionq.count < solv->decisioncnt_jobs) + solv->decisioncnt_jobs = 0; if (solv->decisionq.count < solv->decisioncnt_update) solv->decisioncnt_update = 0; if (solv->decisionq.count < solv->decisioncnt_keep) @@ -1448,7 +1450,9 @@ break; } } - if (dq->count > 1 && ruleid >= solv->jobrules && ruleid < solv->jobrules_end && solv->installed) + /* if we're resolving job rules and didn't resolve the installed packages yet, + * do some special supplements ordering */ + if (dq->count > 1 && ruleid >= solv->jobrules && ruleid < solv->jobrules_end && solv->installed && !solv->focus_installed) reorder_dq_for_jobrules(solv, level, dq); if (dq->count > 1) { @@ -1527,6 +1531,83 @@ } +static int +resolve_jobrules(Solver *solv, int level, int disablerules, Queue *dq) +{ + Pool *pool = solv->pool; + int oldlevel = level; + int i, olevel; + Rule *r; + + POOL_DEBUG(SOLV_DEBUG_SOLVER, "resolving job rules\n"); + if (!solv->decisioncnt_jobs) + solv->decisioncnt_jobs = solv->decisionq.count; + for (i = solv->jobrules, r = solv->rules + i; i < solv->jobrules_end; i++, r++) + { + Id l, pp; + if (r->d < 0) /* ignore disabled rules */ + continue; + queue_empty(dq); + FOR_RULELITERALS(l, pp, r) + { + if (l < 0) + { + if (solv->decisionmap[-l] <= 0) + break; + } + else + { + if (solv->decisionmap[l] > 0) + break; + if (solv->decisionmap[l] == 0) + queue_push(dq, l); + } + } + if (l || !dq->count) + continue; + /* prune to installed if not updating */ + if (dq->count > 1 && solv->installed && !solv->updatemap_all && + !(solv->job.elements[solv->ruletojob.elements[i - solv->jobrules]] & SOLVER_ORUPDATE)) + { + int j, k; + for (j = k = 0; j < dq->count; j++) + { + Solvable *s = pool->solvables + dq->elements[j]; + if (s->repo == solv->installed) + { + dq->elements[k++] = dq->elements[j]; + if (solv->updatemap.size && MAPTST(&solv->updatemap, dq->elements[j] - solv->installed->start)) + { + k = 0; /* package wants to be updated, do not prune */ + break; + } + } + } + if (k) + dq->count = k; + } + olevel = level; + level = selectandinstall(solv, level, dq, disablerules, i); + if (level <= olevel) + { + if (level == 0) + return 0; /* unsolvable */ + if (level == olevel) + { + i--; + r--; + continue; /* try something else */ + } + if (level < oldlevel) + return level; + /* redo from start of jobrules */ + i = solv->jobrules - 1; + r = solv->rules + i; + } + } + return level; +} + /*------------------------------------------------------------------- * * solver_free @@ -1644,6 +1725,8 @@ return solv->keep_orphans; case SOLVER_FLAG_BREAK_ORPHANS: return solv->break_orphans; + case SOLVER_FLAG_FOCUS_INSTALLED: + return solv->focus_installed; default: break; } @@ -1713,6 +1796,9 @@ case SOLVER_FLAG_BREAK_ORPHANS: solv->break_orphans = value; break; + case SOLVER_FLAG_FOCUS_INSTALLED: + solv->focus_installed = value; + break; default: break; } @@ -1992,74 +2078,27 @@ } /* - * resolve jobs first + * resolve jobs first (unless focus_installed is set) */ - if (level < systemlevel) + if (level < systemlevel && !solv->focus_installed) { - POOL_DEBUG(SOLV_DEBUG_SOLVER, "resolving job rules\n"); - for (i = solv->jobrules, r = solv->rules + i; i < solv->jobrules_end; i++, r++) + olevel = level; + level = resolve_jobrules(solv, level, disablerules, &dq); + if (level < olevel) { - Id l; - if (r->d < 0) /* ignore disabled rules */ - continue; - queue_empty(&dq); - FOR_RULELITERALS(l, pp, r) - { - if (l < 0) - { - if (solv->decisionmap[-l] <= 0) - break; - } - else - { - if (solv->decisionmap[l] > 0) - break; - if (solv->decisionmap[l] == 0) - queue_push(&dq, l); - } - } - if (l || !dq.count) - continue; - /* prune to installed if not updating */ - if (dq.count > 1 && solv->installed && !solv->updatemap_all && - !(solv->job.elements[solv->ruletojob.elements[i - solv->jobrules]] & SOLVER_ORUPDATE)) - { - int j, k; - for (j = k = 0; j < dq.count; j++) - { - Solvable *s = pool->solvables + dq.elements[j]; - if (s->repo == solv->installed) - { - dq.elements[k++] = dq.elements[j]; - if (solv->updatemap.size && MAPTST(&solv->updatemap, dq.elements[j] - solv->installed->start)) - { - k = 0; /* package wants to be updated, do not prune */ - break; - } - } - } - if (k) - dq.count = k; - } - olevel = level; - level = selectandinstall(solv, level, &dq, disablerules, i); if (level == 0) - break; - if (level <= olevel) - break; + break; /* unsolvable */ + continue; } - if (level == 0) - break; /* unsolvable */ systemlevel = level + 1; - if (i < solv->jobrules_end) - continue; - if (!solv->decisioncnt_update) - solv->decisioncnt_update = solv->decisionq.count; } + /* * installed packages */ + if (!solv->decisioncnt_update) + solv->decisioncnt_update = solv->decisionq.count; if (level < systemlevel && solv->installed && solv->installed->nsolvables && !solv->installed->disabled) { Repo *installed = solv->installed; @@ -2232,6 +2271,19 @@ if (!solv->decisioncnt_keep) solv->decisioncnt_keep = solv->decisionq.count; + if (level < systemlevel && solv->focus_installed) + { + olevel = level; + level = resolve_jobrules(solv, level, disablerules, &dq); + if (level < olevel) + { + if (level == 0) + break; /* unsolvable */ + continue; + } + systemlevel = level + 1; + } + if (level < systemlevel) systemlevel = level; @@ -2828,6 +2880,7 @@ if (level == 0) { /* unsolvable */ + solv->decisioncnt_jobs = solv->decisionq.count; solv->decisioncnt_update = solv->decisionq.count; solv->decisioncnt_keep = solv->decisionq.count; solv->decisioncnt_resolve = solv->decisionq.count; @@ -3307,7 +3360,7 @@ memset(solv->decisionmap, 0, pool->nsolvables * sizeof(Id)); queue_empty(&solv->decisionq); queue_empty(&solv->decisionq_why); - solv->decisioncnt_update = solv->decisioncnt_keep = solv->decisioncnt_resolve = solv->decisioncnt_weak = solv->decisioncnt_orphan = 0; + solv->decisioncnt_jobs = solv->decisioncnt_update = solv->decisioncnt_keep = solv->decisioncnt_resolve = solv->decisioncnt_weak = solv->decisioncnt_orphan = 0; queue_empty(&solv->learnt_why); queue_empty(&solv->learnt_pool); queue_empty(&solv->branches); @@ -3359,6 +3412,7 @@ if (installed) { /* check for update/verify jobs as they need to be known early */ + /* also setup the droporphaned map, we need it when creating update rules */ for (i = 0; i < job->count; i += 2) { how = job->elements[i]; @@ -3444,6 +3498,19 @@ add_update_target(solv, p, how); } break; + case SOLVER_DROP_ORPHANED: + if (select == SOLVER_SOLVABLE_ALL || (select == SOLVER_SOLVABLE_REPO && what == installed->repoid)) + solv->droporphanedmap_all = 1; + FOR_JOB_SELECT(p, pp, select, what) + { + s = pool->solvables + p; + if (s->repo != installed) + continue; + if (!solv->droporphanedmap.size) + map_grow(&solv->droporphanedmap, installed->end - installed->start); + MAPSET(&solv->droporphanedmap, p - installed->start); + } + break; default: break; } @@ -3777,17 +3844,6 @@ break; case SOLVER_DROP_ORPHANED: POOL_DEBUG(SOLV_DEBUG_JOB, "job: drop orphaned %s\n", solver_select2str(pool, select, what)); - if (select == SOLVER_SOLVABLE_ALL || (select == SOLVER_SOLVABLE_REPO && installed && what == installed->repoid)) - solv->droporphanedmap_all = 1; - FOR_JOB_SELECT(p, pp, select, what) - { - s = pool->solvables + p; - if (!installed || s->repo != installed) - continue; - if (!solv->droporphanedmap.size) - map_grow(&solv->droporphanedmap, installed->end - installed->start); - MAPSET(&solv->droporphanedmap, p - installed->start); - } break; case SOLVER_USERINSTALLED: POOL_DEBUG(SOLV_DEBUG_JOB, "job: user installed %s\n", solver_select2str(pool, select, what)); @@ -3797,10 +3853,6 @@ break; } - /* - * debug - */ - IF_POOLDEBUG (SOLV_DEBUG_JOB) { int j; @@ -4311,12 +4363,10 @@ if (why > 0) return SOLVER_REASON_UNIT_RULE; why = -why; + if (i == 0) + return SOLVER_REASON_KEEP_INSTALLED; /* the systemsolvable */ if (i < solv->decisioncnt_update) - { - if (i == 0) - return SOLVER_REASON_KEEP_INSTALLED; - return SOLVER_REASON_RESOLVE_JOB; - } + return SOLVER_REASON_RESOLVE_JOB; if (i < solv->decisioncnt_keep) { if (why == 0 && pp < 0) @@ -4325,6 +4375,8 @@ } if (i < solv->decisioncnt_resolve) { + if (solv->focus_installed && i >= solv->decisioncnt_jobs) + return SOLVER_REASON_RESOLVE_JOB; if (why == 0 && pp < 0) return SOLVER_REASON_CLEANDEPS_ERASE; return SOLVER_REASON_KEEP_INSTALLED; @@ -4332,7 +4384,7 @@ if (why > 0) return SOLVER_REASON_RESOLVE; /* weak or orphaned */ - if (solv->decisionq.count < solv->decisioncnt_orphan) + if (i < solv->decisioncnt_orphan) return SOLVER_REASON_WEAKDEP; return SOLVER_REASON_RESOLVE_ORPHAN; } @@ -4387,7 +4439,7 @@ if (!p2 && found) { queue_push(whyq, SOLVER_REASON_RECOMMENDED); - queue_push2(whyq, p2, rec); + queue_push2(whyq, i, rec); } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.6.1/src/solver.h new/libsolv-0.6.3/src/solver.h --- old/libsolv-0.6.1/src/solver.h 2014-04-17 14:20:44.000000000 +0200 +++ new/libsolv-0.6.3/src/solver.h 2014-05-15 14:50:50.000000000 +0200 @@ -109,6 +109,7 @@ * > 0: level of decision when installed, * < 0: level of decision when conflict */ + int decisioncnt_jobs; int decisioncnt_update; int decisioncnt_keep; int decisioncnt_resolve; @@ -159,7 +160,7 @@ int keepexplicitobsoletes; /* true: honor obsoletes during multiinstall */ int bestobeypolicy; /* true: stay in policy with the best rules */ int noautotarget; /* true: do not assume targeted for up/dup jobs that contain no installed solvable */ - + int focus_installed; /* true: resolve update rules first */ Map dupmap; /* dup these packages*/ int dupmap_all; /* dup all packages */ @@ -287,6 +288,7 @@ #define SOLVER_FLAG_DUP_ALLOW_NAMECHANGE 17 #define SOLVER_FLAG_KEEP_ORPHANS 18 #define SOLVER_FLAG_BREAK_ORPHANS 19 +#define SOLVER_FLAG_FOCUS_INSTALLED 20 #define GET_USERINSTALLED_NAMES (1 << 0) /* package names instead if ids */ #define GET_USERINSTALLED_INVERTED (1 << 1) /* autoinstalled */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.6.1/tools/repo2solv.sh new/libsolv-0.6.3/tools/repo2solv.sh --- old/libsolv-0.6.1/tools/repo2solv.sh 2014-03-26 15:40:53.000000000 +0100 +++ new/libsolv-0.6.3/tools/repo2solv.sh 2014-05-14 17:10:49.000000000 +0200 @@ -148,7 +148,7 @@ repomd_decompress "$susedataxml" fi echo '</rpmmd>' - ) | grep -v '<?xml' | sed '1i\<?xml version="1.0" encoding="UTF-8"?>' | rpmmd2solv $parser_options > $primfile || exit 4 + ) | sed 's/<?xml[^>]*>//g' | sed '1i\<?xml version="1.0" encoding="UTF-8"?>' | rpmmd2solv $parser_options > $primfile || exit 4 fi prodfile= -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
