summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2018-11-30 12:41:21 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2018-11-30 12:41:21 +0900
commitd98199487aa414cb7f965a058c4395235343e20a (patch)
treec2b1cddf2d26551eab0948e8f7acd07136a368f4
parente9cad17338196026836b555dd971ba84ed011a9d (diff)
downloadlibsolv-d98199487aa414cb7f965a058c4395235343e20a.tar.gz
libsolv-d98199487aa414cb7f965a058c4395235343e20a.tar.bz2
libsolv-d98199487aa414cb7f965a058c4395235343e20a.zip
Imported Upstream version 0.6.34upstream/0.6.34
Change-Id: Ifb015e289784b24671b713253e340c8e5ac1bb8f Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
-rw-r--r--NEWS4
-rw-r--r--VERSION.cmake2
-rw-r--r--package/libsolv.changes14
-rw-r--r--src/linkedpkg.c23
-rw-r--r--src/order.c46
5 files changed, 76 insertions, 13 deletions
diff --git a/NEWS b/NEWS
index c54093c..2ed1bf4 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,10 @@
This file contains the major changes between
libsolv versions:
+Version 0.6.34
+- new features:
+ * also look at suggests for package ordering
+
Version 0.6.33
- new features:
* new Selection.clone() method in the bindings
diff --git a/VERSION.cmake b/VERSION.cmake
index b78d89f..1d14e17 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 "33")
+SET(LIBSOLV_PATCH "34")
diff --git a/package/libsolv.changes b/package/libsolv.changes
index b647a29..ee3a9f0 100644
--- a/package/libsolv.changes
+++ b/package/libsolv.changes
@@ -1,8 +1,20 @@
-------------------------------------------------------------------
+Fri Mar 23 12:02:08 CET 2018 - mls@suse.de
+
+- make sure product files come from /etc/products.d in fallback
+ search [bnc#1086602]
+- bump version to 0.6.34
+
+-------------------------------------------------------------------
+Thu Mar 1 10:52:23 CET 2018 - mls@suse.de
+
+- also use suggests for ordering packages [bnc#1077635]
+
+-------------------------------------------------------------------
Wed Feb 28 16:29:55 CET 2018 - mls@suse.de
- fix bad assignment in solution refinement that led
- to a memory leak
+ to a memory leak [bnc#1075978]
- use license tag instead of doc in the spec file [bnc#1082318]
- bump version to 0.6.33
diff --git a/src/linkedpkg.c b/src/linkedpkg.c
index 635e69b..5912f98 100644
--- a/src/linkedpkg.c
+++ b/src/linkedpkg.c
@@ -192,16 +192,25 @@ find_product_link(Pool *pool, Solvable *s, Id *reqidp, Queue *qr, Id *prvidp, Qu
/* oh no! Look up reference file */
Dataiterator di;
const char *refbasename = solvable_lookup_str(s, PRODUCT_REFERENCEFILE);
- dataiterator_init(&di, pool, s->repo, 0, SOLVABLE_FILELIST, refbasename, SEARCH_STRING);
- while (dataiterator_step(&di))
- queue_push(qr, di.solvid);
- dataiterator_free(&di);
- if (qp)
+ if (refbasename)
{
- dataiterator_init(&di, pool, s->repo, 0, PRODUCT_REFERENCEFILE, refbasename, SEARCH_STRING);
+ dataiterator_init(&di, pool, s->repo, 0, SOLVABLE_FILELIST, refbasename, SEARCH_STRING);
while (dataiterator_step(&di))
- queue_push(qp, di.solvid);
+ {
+ if (di.key->type != REPOKEY_TYPE_DIRSTRARRAY)
+ continue;
+ if (strcmp(repodata_dir2str(di.data, di.kv.id, 0), "/etc/products.d") != 0)
+ continue;
+ queue_push(qr, di.solvid);
+ }
dataiterator_free(&di);
+ if (qp)
+ {
+ dataiterator_init(&di, pool, s->repo, 0, PRODUCT_REFERENCEFILE, refbasename, SEARCH_STRING);
+ while (dataiterator_step(&di))
+ queue_push(qp, di.solvid);
+ dataiterator_free(&di);
+ }
}
}
else if (qp)
diff --git a/src/order.c b/src/order.c
index 02e11d1..c92c332 100644
--- a/src/order.c
+++ b/src/order.c
@@ -43,10 +43,11 @@ struct _TransactionOrderdata {
#define TYPE_REQ_P (1<<2)
#define TYPE_PREREQ_P (1<<3)
-#define TYPE_REC (1<<4)
+#define TYPE_SUG (1<<4)
+#define TYPE_REC (1<<5)
-#define TYPE_REQ (1<<5)
-#define TYPE_PREREQ (1<<6)
+#define TYPE_REQ (1<<6)
+#define TYPE_PREREQ (1<<7)
#define TYPE_CYCLETAIL (1<<16)
#define TYPE_CYCLEHEAD (1<<17)
@@ -247,7 +248,6 @@ addsolvableedges(struct orderdata *od, Solvable *s)
{
Transaction *trans = od->trans;
Pool *pool = trans->pool;
- Id req, *reqp, con, *conp, rec, *recp;
Id p, p2, pp2;
int i, j, pre, numins;
Repo *installed = pool->installed;
@@ -262,6 +262,7 @@ addsolvableedges(struct orderdata *od, Solvable *s)
queue_init(&depq);
if (s->requires)
{
+ Id req, *reqp;
reqp = s->repo->idarraydata + s->requires;
pre = TYPE_REQ;
while ((req = *reqp++) != 0)
@@ -385,6 +386,7 @@ addsolvableedges(struct orderdata *od, Solvable *s)
}
if (s->conflicts)
{
+ Id con, *conp;
conp = s->repo->idarraydata + s->conflicts;
while ((con = *conp++) != 0)
{
@@ -423,6 +425,7 @@ addsolvableedges(struct orderdata *od, Solvable *s)
}
if (s->recommends && s->repo != installed)
{
+ Id rec, *recp;
recp = s->repo->idarraydata + s->recommends;
while ((rec = *recp++) != 0)
{
@@ -455,6 +458,41 @@ addsolvableedges(struct orderdata *od, Solvable *s)
}
}
}
+ if (s->suggests && s->repo != installed)
+ {
+ Id sug, *sugp;
+ sugp = s->repo->idarraydata + s->suggests;
+ while ((sug = *sugp++) != 0)
+ {
+ queue_empty(&depq);
+ FOR_PROVIDES(p2, pp2, sug)
+ {
+ s2 = pool->solvables + p2;
+ if (p2 == p)
+ {
+ depq.count = 0; /* self provides */
+ break;
+ }
+ if (s2->repo == installed && !MAPTST(&trans->transactsmap, p2))
+ continue;
+ if (s2->repo != installed && !MAPTST(&trans->transactsmap, p2))
+ continue; /* package stays uninstalled */
+ if (s2->repo != installed)
+ queue_pushunique(&depq, p2);
+ }
+ for (i = 0; i < depq.count; i++)
+ {
+ p2 = depq.elements[i];
+ if (pool->solvables[p2].repo != installed)
+ {
+#if 0
+ printf("add suggests inst->inst edge (%s -> %s -> %s)\n", pool_solvid2str(pool, p), pool_dep2str(pool, sug), pool_solvid2str(pool, p2));
+#endif
+ addedge(od, p, p2, TYPE_SUG);
+ }
+ }
+ }
+ }
if (s->repo == installed && solvable_lookup_idarray(s, SOLVABLE_TRIGGERS, &depq) && depq.count)
{
/* we're getting deinstalled/updated. Try to do this before our