From: DongHun Kwak Date: Thu, 27 Oct 2016 05:57:15 +0000 (+0900) Subject: Imported Upstream version 0.6.17 X-Git-Tag: upstream/0.6.17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F16%2F94116%2F1;p=platform%2Fupstream%2Flibsolv.git Imported Upstream version 0.6.17 Change-Id: I2c27bcda07cba71c27b3bef00710dd730e5e0be7 Signed-off-by: DongHun Kwak --- diff --git a/VERSION.cmake b/VERSION.cmake index d8b6373..1523c2a 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -49,5 +49,5 @@ SET(LIBSOLVEXT_SOVERSION "0") SET(LIBSOLV_MAJOR "0") SET(LIBSOLV_MINOR "6") -SET(LIBSOLV_PATCH "16") +SET(LIBSOLV_PATCH "17") diff --git a/package/libsolv.changes b/package/libsolv.changes index 855d7ab..b1d41ee 100644 --- a/package/libsolv.changes +++ b/package/libsolv.changes @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Tue Dec 22 11:49:02 CET 2015 - mls@suse.de + +- fix update handling of multiversion packages [bnc#957606] +- bump version to 0.6.17 + +------------------------------------------------------------------- Mon Dec 21 12:59:19 CET 2015 - mls@suse.de - fix orphan handling for dup with keeporphans set [bnc#957606] diff --git a/src/rules.c b/src/rules.c index 70d6b07..6f35720 100644 --- a/src/rules.c +++ b/src/rules.c @@ -1206,6 +1206,17 @@ addduppackages(Solver *solv, Solvable *s, Queue *qs) } #endif +/* stash away the original updaters for multiversion packages. We do this so that + * we can update the package later */ +static inline void +set_specialupdaters(Solver *solv, Solvable *s, Id d) +{ + Repo *installed = solv->installed; + if (!solv->specialupdaters) + solv->specialupdaters = solv_calloc(installed->end - installed->start, sizeof(Id)); + solv->specialupdaters[s - solv->pool->solvables - installed->start] = d; +} + /*------------------------------------------------------------------- * * add rule for update @@ -1245,9 +1256,8 @@ solver_addupdaterule(Solver *solv, Solvable *s, int allow_all) { if (p != -SYSTEMSOLVABLE) queue_unshift(&qs, p); - if (!solv->specialupdaters) - solv->specialupdaters = solv_calloc(solv->installed->end - solv->installed->start, sizeof(Id)); - solv->specialupdaters[s - pool->solvables - solv->installed->start] = pool_queuetowhatprovides(pool, &qs); + if (qs.count) + set_specialupdaters(solv, s, pool_queuetowhatprovides(pool, &qs)); } queue_free(&qs); return; @@ -1300,9 +1310,7 @@ solver_addupdaterule(Solver *solv, Solvable *s, int allow_all) { /* this is a multiversion orphan */ queue_push(&solv->orphaned, s - pool->solvables); - if (!solv->specialupdaters) - solv->specialupdaters = solv_calloc(solv->installed->end - solv->installed->start, sizeof(Id)); - solv->specialupdaters[s - pool->solvables - solv->installed->start] = d; + set_specialupdaters(solv, s, d); if (solv->keep_orphans && !(solv->droporphanedmap_all || (solv->droporphanedmap.size && MAPTST(&solv->droporphanedmap, s - pool->solvables - solv->installed->start)))) { /* we need to keep the orphan */ @@ -1314,6 +1322,11 @@ solver_addupdaterule(Solver *solv, Solvable *s, int allow_all) isorphaned = 1; j = qs.count; /* force the update */ } + else if (d && (solv->updatemap_all || (solv->updatemap.size && MAPTST(&solv->updatemap, s - pool->solvables - solv->installed->start)))) + { + /* non-orphan multiversion package, set special updaters if we want an update */ + set_specialupdaters(solv, s, d); + } qs.count = j; } else if (p != -SYSTEMSOLVABLE) diff --git a/test/testcases/multiversion/update.t b/test/testcases/multiversion/update.t new file mode 100644 index 0000000..c3a2d9a --- /dev/null +++ b/test/testcases/multiversion/update.t @@ -0,0 +1,65 @@ +repo system 0 testtags +#>=Pkg: k 1 0 x86_64 +#>=Pkg: k-m 1 0 x86_64 +#>=Req: k = 1-0 +#>=Pkg: k-freak-1-0 1 0 x86_64 +#>=Req: k = 1-0 +#>=Pkg: k 1 1 x86_64 +#>=Pkg: k-m 1 1 x86_64 +#>=Req: k = 1-1 +#>=Pkg: k 2 0 x86_64 +#>=Pkg: k-m 2 0 x86_64 +#>=Req: k = 2-0 +#>=Pkg: k 3 0 x86_64 +#>=Pkg: k-m 3 0 x86_64 +#>=Req: k = 3-0 +repo available 0 testtags +#>=Pkg: k 3 1 x86_64 +#>=Pkg: k-m 3 1 x86_64 +#>=Req: k = 3-1 +#>=Pkg: k 3 6 x86_64 +#>=Pkg: k-m 3 6 x86_64 +#>=Req: k = 3-6 +#>=Pkg: c 1 1 noarch +#>=Con: k = 3-6 +system x86_64 rpm system +poolflags implicitobsoleteusescolors + +job multiversion provides k +job multiversion provides k-m +job update all packages +result transaction,problems +#>install k-3-6.x86_64@available +#>install k-m-3-6.x86_64@available + +nextjob + +job multiversion provides k +job multiversion provides k-m +job install name c +job update all packages +result transaction,problems +#>install k-3-1.x86_64@available +#>install k-m-3-1.x86_64@available +#>install c-1-1.noarch@available + + +nextjob + +job multiversion provides k +job multiversion provides k-m +job install name c +job update all packages [forcebest] +result transaction,problems +#>install k-3-6.x86_64@available +#>install k-m-3-6.x86_64@available +#>problem ca7106eb info package c-1-1.noarch conflicts with k = 3-6 provided by k-3-6.x86_64 +#>problem ca7106eb solution 4d4bc71f allow k-1-0.x86_64@system +#>problem ca7106eb solution 4d4bc71f allow k-1-1.x86_64@system +#>problem ca7106eb solution 4d4bc71f allow k-2-0.x86_64@system +#>problem ca7106eb solution 4d4bc71f allow k-3-0.x86_64@system +#>problem ca7106eb solution 4d4bc71f allow k-m-1-0.x86_64@system +#>problem ca7106eb solution 4d4bc71f allow k-m-1-1.x86_64@system +#>problem ca7106eb solution 4d4bc71f allow k-m-2-0.x86_64@system +#>problem ca7106eb solution 4d4bc71f allow k-m-3-0.x86_64@system +#>problem ca7106eb solution 86764155 deljob install name c