This file contains the major changes between
libsolv versions:
+Version 0.7.7
+- selected bug fixes:
+ * fix updating of too many packages in focusbest mode
+ * fix handling of disabled installed packages in distupgrade
+- new features
+ * new POOL_FLAG_WHATPROVIDESWITHDISABLED pool flag
+
Version 0.7.6
- selected bug fixes:
* fix repository priority handling for multiversion packages
SET(LIBSOLV_MAJOR "0")
SET(LIBSOLV_MINOR "7")
-SET(LIBSOLV_PATCH "6")
+SET(LIBSOLV_PATCH "7")
{ POOL_FLAG_NOOBSOLETESMULTIVERSION, "noobsoletesmultiversion", 0 },
{ POOL_FLAG_ADDFILEPROVIDESFILTERED, "addfileprovidesfiltered", 0 },
{ POOL_FLAG_NOWHATPROVIDESAUX, "nowhatprovidesaux", 0 },
+ { POOL_FLAG_WHATPROVIDESWITHDISABLED, "whatprovideswithdisabled", 0 },
{ 0, 0, 0 }
};
-------------------------------------------------------------------
+Fri Oct 18 10:53:54 CEST 2019 - mls@suse.de
+
+- fix updating of too many packages in focusbest mode
+- fix handling of disabled installed packages in distupgrade
+- new POOL_FLAG_WHATPROVIDESWITHDISABLED pool flag
+- bump version to 0.7.7
+
+-------------------------------------------------------------------
Wed Aug 28 14:49:19 CEST 2019 - mls@suse.de
- Fix repository priority handling for multiversion packages
%setup -q
%build
-%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
+%global _lto_cflags %{?_lto_cflags} -ffat-lto-objects
export CFLAGS="%{optflags}"
export CXXFLAGS="$CFLAGS"
POOL_DEBUG(SOLV_DEBUG_STATS, "\n");
}
+#if 0
static inline void
dump_tes(struct orderdata *od)
{
}
}
}
+#endif
static void
reachable(struct orderdata *od, Id i)
continue;
ps = pool->solvables + p;
+ if (pool->considered && pool->whatprovideswithdisabled && ps->repo != pool->installed && pool_disabled_solvable(pool, ps))
+ continue;
if (s->name == ps->name) /* name match */
{
if (pool->implicitobsoleteusescolors && !pool_colormatch(pool, s, ps))
return pool->addfileprovidesfiltered;
case POOL_FLAG_NOWHATPROVIDESAUX:
return pool->nowhatprovidesaux;
+ case POOL_FLAG_WHATPROVIDESWITHDISABLED:
+ return pool->whatprovideswithdisabled;
default:
break;
}
case POOL_FLAG_NOWHATPROVIDESAUX:
pool->nowhatprovidesaux = value;
break;
+ case POOL_FLAG_WHATPROVIDESWITHDISABLED:
+ pool->whatprovideswithdisabled = value;
+ break;
default:
break;
}
Offset *whatprovides;
Id *whatprovidesdata, *dp, *whatprovidesauxdata;
Offset *whatprovidesaux;
- Repo *installed = pool->installed;
unsigned int now;
now = solv_timems(0);
s = pool->solvables + i;
if (!s->provides || !s->repo || s->repo->disabled)
continue;
- /* we always need the installed solvable in the whatprovides data,
- otherwise obsoletes/conflicts on them won't work */
- if (s->repo != installed && !pool_installable(pool, s))
+ if (!pool_installable_whatprovides(pool, s))
continue;
pp = s->repo->idarraydata + s->provides;
while ((id = *pp++) != 0)
s = pool->solvables + i;
if (!s->provides || !s->repo || s->repo->disabled)
continue;
- if (s->repo != installed && !pool_installable(pool, s))
+ if (!pool_installable_whatprovides(pool, s))
continue;
-
/* for all provides of this solvable */
pp = s->repo->idarraydata + s->provides;
while ((id = *pp++) != 0)
* and those should not use filelist entries */
if (s->repo->disabled)
continue;
- if (s->repo != pool->installed && !pool_installable(pool, s))
+ if (!pool_installable_whatprovides(pool, s))
continue;
queue_push(&q, di.solvid);
}
FOR_POOL_SOLVABLES(p)
{
Solvable *s = pool->solvables + p;
- if (s->repo != pool->installed && !pool_installable(pool, s))
+ if (!pool_installable_whatprovides(pool, s))
continue;
if (s->arch == evr)
queue_push(&plist, p);
Id *whatprovidesauxdata;
Offset whatprovidesauxdataoff;
+ int whatprovideswithdisabled;
#endif
};
#define POOL_FLAG_ADDFILEPROVIDESFILTERED 9
#define POOL_FLAG_IMPLICITOBSOLETEUSESCOLORS 10
#define POOL_FLAG_NOWHATPROVIDESAUX 11
+#define POOL_FLAG_WHATPROVIDESWITHDISABLED 12
/* ----------------------------------------------- */
return 1;
}
+#ifdef LIBSOLV_INTERNAL
+static inline int pool_installable_whatprovides(const Pool *pool, Solvable *s)
+{
+ /* we always need the installed solvable in the whatprovides data,
+ otherwise obsoletes/conflicts on them won't work */
+ if (s->repo != pool->installed)
+ {
+ if (s->arch == ARCH_SRC || s->arch == ARCH_NOSRC || pool_badarch_solvable(pool, s))
+ return 0;
+ if (pool->considered && !pool->whatprovideswithdisabled)
+ {
+ Id id = s - pool->solvables;
+ if (!MAPTST(pool->considered, id))
+ return 0;
+ }
+ }
+ return 1;
+}
+#endif
+
/* not in solvable.h because we need the repo definition */
static inline Solvable *solvable_free(Solvable *s, int reuseids)
{
}
static inline void
-write_id_eof(Repodata *data, Id x, int eof)
-{
- if (x >= 64)
- x = (x & 63) | ((x & ~63) << 1);
- write_id(data, x | (eof ? 0 : 64));
-}
-
-
-
-static inline void
write_str(Repodata *data, const char *str)
{
if (data->error)
int dupinvolved = 0;
p = s - pool->solvables;
+
+ if (pool->considered && pool_disabled_solvable(pool, s))
+ {
+ /* disabled installed solvables must stay installed */
+ solver_addrule(solv, p, 0, 0);
+ return;
+ }
+
/* Orphan detection. We cheat by looking at the feature rule, which
* we already calculated */
r = solv->rules + solv->featurerules + (p - solv->installed->start);
continue;
if (installed && ps->repo == installed)
{
+ if (pool->considered && pool_disabled_solvable(pool, ps))
+ continue; /* always keep disabled installed packages */
if (!MAPTST(&solv->dupmap, p))
{
Id ip, ipp;
policy_filter_unwanted(solv, q, POLICY_MODE_RECOMMEND);
}
+static void
+prune_disabled(Pool *pool, Queue *q)
+{
+ int i, j;
+ for (i = j = 0; i < q->count; i++)
+ {
+ Id p = q->elements[i];
+ Solvable *s = pool->solvables + p;
+ if (s->repo && s->repo != pool->installed && !MAPTST(pool->considered, p))
+ continue;
+ q->elements[j++] = p;
+ }
+ queue_truncate(q, j);
+}
+
void
solver_addbestrules(Solver *solv, int havebestinstalljobs, int haslockjob)
{
else if (p2 < 0)
queue_push(&q2, p2);
}
+ if (pool->considered && pool->whatprovideswithdisabled)
+ prune_disabled(pool, &q);
if (!q.count)
continue; /* orphaned */
/* select best packages, just look at prio and version */
continue; /* nothing filtered */
if (lockedmap)
{
+ queue_insertn(&q, 0, q2.count, q2.elements);
+ queue_empty(&q2);
FOR_RULELITERALS(p2, pp2, r)
{
if (p2 <= 0)
continue;
queue_push(&q2, p2);
}
+ if (pool->considered && pool->whatprovideswithdisabled)
+ prune_disabled(pool, &q2);
policy_filter_unwanted(solv, &q2, POLICY_MODE_RECOMMEND);
for (k = 0; k < q2.count; k++)
queue_pushunique(&q, q2.elements[k]);
+ queue_empty(&q2);
}
if (q2.count)
queue_insertn(&q, 0, q2.count, q2.elements);
Rule *r;
int origlevel = level;
Id p, *dp;
+ int focusbest = solv->focus_best && solv->do_extra_reordering;
+ Repo *installed = solv->installed;
/*
* decide
}
if (i == solv->nrules)
i = 1;
- if (solv->focus_best && solv->do_extra_reordering && i >= solv->featurerules)
+ if (focusbest && i >= solv->featurerules)
continue;
r = solv->rules + i;
if (r->d < 0) /* ignore disabled rules */
if (r->d == 0 || solv->decisionmap[-r->p] <= 0)
continue;
}
+ if (focusbest && r->d != 0 && installed)
+ {
+ /* make sure at least one negative literal is from a new package */
+ if (!(r->p < 0 && pool->solvables[-r->p].repo != installed))
+ {
+ dp = pool->whatprovidesdata + r->d;
+ while ((p = *dp++) != 0)
+ if (p < 0 && solv->decisionmap[-p] > 0 && pool->solvables[-p].repo != installed)
+ break;
+ if (!p)
+ continue; /* sorry */
+ }
+ }
if (dq->count)
queue_empty(dq);
if (r->d == 0)
--- /dev/null
+repo system 0 testtags <inline>
+#>=Pkg: A 1 1 noarch
+#>=Vnd: foo
+repo available 0 testtags <inline>
+#>=Pkg: A 2 1 noarch
+#>=Vnd: foo
+system i686 rpm system
+poolflags whatprovideswithdisabled
+
+disable pkg A-2-1.noarch@available
+
+job distupgrade all packages
+result transaction,problems <inline>
+
--- /dev/null
+repo system 0 testtags <inline>
+#>=Pkg: A 1 1 noarch
+#>=Vnd: foo
+repo available 0 testtags <inline>
+#>=Pkg: A 2 1 noarch
+#>=Vnd: foo
+system i686 rpm system
+poolflags whatprovideswithdisabled
+
+disable pkg A-1-1.noarch@system
+
+job distupgrade all packages
+result transaction,problems <inline>
+
--- /dev/null
+repo system 0 testtags <inline>
+#>=Pkg: D 1 1 noarch
+#>=Vnd: foo
+#>=Con: A = 3-1
+repo available 0 testtags <inline>
+#>=Pkg: A 2 1 noarch
+#>=Vnd: foo
+#>=Pkg: A 3 1 noarch
+#>=Vnd: bar
+system i686 rpm system
+
+poolflags whatprovideswithdisabled
+disable pkg A-3-1.noarch@available
+
+job install name A [forcebest]
+result transaction,problems <inline>
+#>install A-2-1.noarch@available
+
+
--- /dev/null
+repo system 0 testtags <inline>
+#>=Pkg: A 1 1 noarch
+#>=Vnd: foo
+#>=Pkg: D 1 1 noarch
+#>=Vnd: foo
+#>=Con: A = 3-1
+repo available 0 testtags <inline>
+#>=Pkg: A 2 1 noarch
+#>=Vnd: foo
+#>=Pkg: A 3 1 noarch
+#>=Vnd: bar
+system i686 rpm system
+
+poolflags whatprovideswithdisabled
+disable pkg A-3-1.noarch@available
+
+job install name A [forcebest]
+result transaction,problems <inline>
+#>upgrade A-1-1.noarch@system A-2-1.noarch@available
+