diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2018-11-30 12:40:15 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2018-11-30 12:40:16 +0900 |
commit | 51a3a2ac14ea0b18ccbe47ce771d5c962aa0800a (patch) | |
tree | 778194706f6f8a417899f6070be7308107bc92bb /ext | |
parent | 22e701e553344eeb22f88ed0906d76c9a5e39d83 (diff) | |
download | libsolv-51a3a2ac14ea0b18ccbe47ce771d5c962aa0800a.tar.gz libsolv-51a3a2ac14ea0b18ccbe47ce771d5c962aa0800a.tar.bz2 libsolv-51a3a2ac14ea0b18ccbe47ce771d5c962aa0800a.zip |
Imported Upstream version 0.6.25upstream/0.6.25
Change-Id: I4c41182d0968927b2dc78980b41c0b7c2e931a4a
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'ext')
-rw-r--r-- | ext/repo_rpmdb.c | 21 | ||||
-rw-r--r-- | ext/testcase.c | 2 |
2 files changed, 16 insertions, 7 deletions
diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c index 034198c..fe05bec 100644 --- a/ext/repo_rpmdb.c +++ b/ext/repo_rpmdb.c @@ -765,16 +765,15 @@ adddudata(Repodata *data, Id handle, RpmHead *rpmhead, char **dn, unsigned int * { if (!fn[i]) continue; - if (!*dn[i]) + did = repodata_str2dir(data, dn[i], 1); + if (!did) { - Solvable *s = data->repo->pool->solvables + handle; + Solvable *s = data->repo->pool->solvables + handle; if (s->arch == ARCH_SRC || s->arch == ARCH_NOSRC) did = repodata_str2dir(data, "/usr/src", 1); else continue; /* work around rpm bug */ } - else - did = repodata_str2dir(data, dn[i], 1); repodata_add_dirnumnum(data, handle, SOLVABLE_DISKUSAGE, did, fkb[i], fn[i]); } solv_free(fn); @@ -1575,7 +1574,7 @@ static Id copydir_complex(Pool *pool, Repodata *data, Repodata *fromdata, Id did static inline Id copydir(Pool *pool, Repodata *data, Repodata *fromdata, Id did, Id *cache) { - if (cache && cache[did & 255] == did) + if (cache && did && cache[did & 255] == did) return cache[(did & 255) + 256]; return copydir_complex(pool, data, fromdata, did, cache); } @@ -1583,8 +1582,16 @@ copydir(Pool *pool, Repodata *data, Repodata *fromdata, Id did, Id *cache) static Id copydir_complex(Pool *pool, Repodata *data, Repodata *fromdata, Id did, Id *cache) { - Id parent = dirpool_parent(&fromdata->dirpool, did); - Id compid = dirpool_compid(&fromdata->dirpool, did); + Id parent, compid; + if (!did) + { + /* make sure that the dirpool has an entry */ + if (!data->dirpool.ndirs) + dirpool_add_dir(&data->dirpool, 0, 0, 1); + return 0; + } + parent = dirpool_parent(&fromdata->dirpool, did); + compid = dirpool_compid(&fromdata->dirpool, did); if (parent) parent = copydir(pool, data, fromdata, parent, cache); if (data->localpool || fromdata->localpool) diff --git a/ext/testcase.c b/ext/testcase.c index a56c4db..ccfcb61 100644 --- a/ext/testcase.c +++ b/ext/testcase.c @@ -116,6 +116,8 @@ static struct solverflags2str { { SOLVER_FLAG_NEED_UPDATEPROVIDE, "needupdateprovide", 0 }, { SOLVER_FLAG_URPM_REORDER, "urpmreorder", 0 }, { SOLVER_FLAG_FOCUS_BEST, "focusbest", 0 }, + { SOLVER_FLAG_STRONG_RECOMMENDS, "strongrecommends", 0 }, + { SOLVER_FLAG_INSTALL_ALSO_UPDATES, "installalsoupdates", 0 }, { 0, 0, 0 } }; |