Hello community, here is the log from the commit of package libsolv for openSUSE:Factory checked in at 2020-09-24 16:12:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libsolv (Old) and /work/SRC/openSUSE:Factory/.libsolv.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libsolv" Thu Sep 24 16:12:04 2020 rev:80 rq:835694 version:0.7.15 Changes: -------- --- /work/SRC/openSUSE:Factory/libsolv/libsolv.changes 2020-06-03 20:28:25.228425408 +0200 +++ /work/SRC/openSUSE:Factory/.libsolv.new.4249/libsolv.changes 2020-09-24 16:12:06.120770073 +0200 @@ -1,0 +2,22 @@ +Fri Sep 11 12:31:27 CEST 2020 - [email protected] + +- fix deduceq2addedmap clearing bits outside of the map +- conda: feature depriorization first +- conda: fix startswith implementation +- move find_update_seeds() call in cleandeps calculation +- set SOLVABLE_BUILDHOST in rpm and rpmmd parsers +- new testcase_mangle_repo_names() function +- new solv_fmemopen() function +- bump version to 0.7.15 + +------------------------------------------------------------------- +Tue Jun 23 12:43:16 CEST 2020 - [email protected] + +- Enable zstd compression support for sle15 + +------------------------------------------------------------------- +Thu May 28 11:51:27 CEST 2020 - [email protected] + +- Enable zstd compression support for sle15-sp2 + +------------------------------------------------------------------- Old: ---- libsolv-0.7.14.tar.bz2 New: ---- libsolv-0.7.15.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libsolv.spec ++++++ --- /var/tmp/diff_new_pack.QubYMc/_old 2020-09-24 16:12:06.824770778 +0200 +++ /var/tmp/diff_new_pack.QubYMc/_new 2020-09-24 16:12:06.828770781 +0200 @@ -25,7 +25,7 @@ %bcond_with bz2 %bcond_with xz %endif -%if 0%{?is_opensuse} && (0%{?sle_version} >= 150000 || 0%{?suse_version} >= 1500) +%if 0%{?sle_version} >= 150000 || 0%{?suse_version} >= 1500 %bcond_without zstd %else %bcond_with zstd @@ -52,7 +52,7 @@ %bcond_with zypp Name: libsolv -Version: 0.7.14 +Version: 0.7.15 Release: 0 Summary: Package dependency solver using a satisfiability algorithm License: BSD-3-Clause ++++++ libsolv-0.7.14.tar.bz2 -> libsolv-0.7.15.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.7.14/CMakeLists.txt new/libsolv-0.7.15/CMakeLists.txt --- old/libsolv-0.7.14/CMakeLists.txt 2020-05-19 14:19:12.000000000 +0200 +++ new/libsolv-0.7.15/CMakeLists.txt 2020-06-04 11:51:39.000000000 +0200 @@ -209,6 +209,12 @@ INCLUDE (CheckIncludeFile) IF (ENABLE_RPMDB OR ENABLE_RPMPKG_LIBRPM) + FIND_PATH (RPM_INCLUDE_DIR NAMES rpm/rpmio.h) + IF (RPM_INCLUDE_DIR) + INCLUDE_DIRECTORIES (${RPM_INCLUDE_DIR}) + SET (CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${RPM_INCLUDE_DIR}) + ENDIF (RPM_INCLUDE_DIR) + FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb) IF (NOT RPMDB_LIBRARY) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.7.14/NEWS new/libsolv-0.7.15/NEWS --- old/libsolv-0.7.14/NEWS 2020-05-27 11:59:16.000000000 +0200 +++ new/libsolv-0.7.15/NEWS 2020-09-11 12:39:26.000000000 +0200 @@ -2,6 +2,17 @@ This file contains the major changes between libsolv versions: +Version 0.7.15 +- selected bug fixes: + * fix deduceq2addedmap clearing bits outside of the map + * conda: feature depriorization first + * conda: fix startswith implementation + * move find_update_seeds() call in cleandeps calculation +- new features: + * set SOLVABLE_BUILDHOST in rpm and rpmmd parsers + * new testcase_mangle_repo_names() function + * new solv_fmemopen() function + Version 0.7.14 - added support for ed25519 signatures - selected bug fixes: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.7.14/VERSION.cmake new/libsolv-0.7.15/VERSION.cmake --- old/libsolv-0.7.14/VERSION.cmake 2020-05-27 11:59:16.000000000 +0200 +++ new/libsolv-0.7.15/VERSION.cmake 2020-09-11 12:39:26.000000000 +0200 @@ -49,5 +49,5 @@ SET(LIBSOLV_MAJOR "0") SET(LIBSOLV_MINOR "7") -SET(LIBSOLV_PATCH "14") +SET(LIBSOLV_PATCH "15") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.7.14/ext/libsolvext.ver new/libsolv-0.7.15/ext/libsolvext.ver --- old/libsolv-0.7.14/ext/libsolvext.ver 2019-12-10 14:19:11.000000000 +0100 +++ new/libsolv-0.7.15/ext/libsolvext.ver 2020-09-08 12:03:10.000000000 +0200 @@ -55,6 +55,7 @@ rpm_stat_database; rpm_state_create; rpm_state_free; + solv_fmemopen; solv_verify_sig; solv_xfopen; solv_xfopen_buf; @@ -66,6 +67,7 @@ testcase_add_testtags; testcase_dep2str; testcase_job2str; + testcase_mangle_repo_names; testcase_solvid2str; testcase_str2dep; testcase_str2job; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.7.14/ext/repo_rpmdb.c new/libsolv-0.7.15/ext/repo_rpmdb.c --- old/libsolv-0.7.14/ext/repo_rpmdb.c 2019-12-19 16:34:10.000000000 +0100 +++ new/libsolv-0.7.15/ext/repo_rpmdb.c 2020-09-10 15:19:32.000000000 +0200 @@ -1189,6 +1189,9 @@ u32 = headint32(rpmhead, TAG_BUILDTIME); if (u32) repodata_set_num(data, handle, SOLVABLE_BUILDTIME, u32); + str = headstring(rpmhead, TAG_BUILDHOST); + if (str) + repodata_set_str(data, handle, SOLVABLE_BUILDHOST, str); u32 = headint32(rpmhead, TAG_INSTALLTIME); if (u32) repodata_set_num(data, handle, SOLVABLE_INSTALLTIME, u32); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.7.14/ext/repo_rpmmd.c new/libsolv-0.7.15/ext/repo_rpmmd.c --- old/libsolv-0.7.14/ext/repo_rpmmd.c 2018-11-22 12:59:31.000000000 +0100 +++ new/libsolv-0.7.15/ext/repo_rpmmd.c 2020-09-10 15:19:32.000000000 +0200 @@ -96,6 +96,7 @@ STATE_FRESHENS, STATE_SOURCERPM, STATE_HEADERRANGE, + STATE_BUILDHOST, STATE_PROVIDESENTRY, STATE_REQUIRESENTRY, @@ -196,6 +197,7 @@ { STATE_SOLVABLE, "rpm:freshens", STATE_FRESHENS, 0 }, { STATE_SOLVABLE, "rpm:sourcerpm", STATE_SOURCERPM, 1 }, { STATE_SOLVABLE, "rpm:header-range", STATE_HEADERRANGE, 0 }, + { STATE_SOLVABLE, "rpm:buildhost", STATE_BUILDHOST, 1 }, { STATE_SOLVABLE, "file", STATE_FILE, 1 }, { STATE_SOLVABLE, "changelog", STATE_CHANGELOG, 1 }, @@ -1036,6 +1038,10 @@ if (*content) repodata_set_poolstr(pd->data, handle, SOLVABLE_PACKAGER, content); break; + case STATE_BUILDHOST: + if (*content) + repodata_set_str(pd->data, handle, SOLVABLE_BUILDHOST, content); + break; case STATE_SOURCERPM: if (*content) repodata_set_sourcepkg(pd->data, handle, content); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.7.14/ext/solv_xfopen.c new/libsolv-0.7.15/ext/solv_xfopen.c --- old/libsolv-0.7.14/ext/solv_xfopen.c 2020-04-17 18:24:14.000000000 +0200 +++ new/libsolv-0.7.15/ext/solv_xfopen.c 2020-06-03 14:14:15.000000000 +0200 @@ -798,6 +798,7 @@ size_t *buflp; char *freemem; size_t bufl_int; + char *buf_int; }; static ssize_t cookie_bufread(void *cookie, char *buf, size_t nbytes) @@ -870,30 +871,48 @@ return fp; } +FILE * +solv_fmemopen(const char *buf, size_t bufl, const char *mode) +{ + struct bufcookie *bc; + FILE *fp; + if (*mode != 'r') + return 0; + bc = solv_calloc(1, sizeof(*bc)); + bc->buf_int = (char *)buf; + bc->bufl_int = bufl; + bc->bufp = &bc->buf_int; + bc->buflp = &bc->bufl_int; + fp = cookieopen(bc, mode, cookie_bufread, cookie_bufwrite, cookie_bufclose); + if (!strcmp(mode, "rf")) /* auto-free */ + bc->freemem = bc->buf_int; + if (!fp) + cookie_bufclose(bc); + return fp; +} + #else FILE * -solv_xfopen_buf(const char *fn, char **bufp, size_t *buflp, const char *mode) +solv_fmemopen(const char *buf, size_t bufl, const char *mode) { FILE *fp; - size_t l; if (*mode != 'r') return 0; - l = buflp ? *buflp : strlen(*bufp); if (!strcmp(mode, "rf")) { - if (!(fp = fmemopen(0, l, "r+"))) + if (!(fp = fmemopen(0, bufl, "r+"))) return 0; - if (l && fwrite(*bufp, l, 1, fp) != 1) + if (bufl && fwrite(buf, bufl, 1, fp) != 1) { fclose(fp); return 0; } - solv_free(*bufp); + solv_free((char *)buf); rewind(fp); } else - fp = fmemopen(*bufp, l, "r"); + fp = fmemopen((char *)buf, bufl, "r"); return fp; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.7.14/ext/solv_xfopen.h new/libsolv-0.7.15/ext/solv_xfopen.h --- old/libsolv-0.7.14/ext/solv_xfopen.h 2018-10-01 11:09:18.000000000 +0200 +++ new/libsolv-0.7.15/ext/solv_xfopen.h 2020-06-03 14:14:15.000000000 +0200 @@ -12,5 +12,6 @@ extern FILE *solv_xfopen_fd(const char *fn, int fd, const char *mode); extern FILE *solv_xfopen_buf(const char *fn, char **bufp, size_t *buflp, const char *mode); extern int solv_xfopen_iscompressed(const char *fn); +extern FILE *solv_fmemopen(const char *buf, size_t bufl, const char *mode); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.7.14/ext/testcase.c new/libsolv-0.7.15/ext/testcase.c --- old/libsolv-0.7.14/ext/testcase.c 2019-11-08 14:39:59.000000000 +0100 +++ new/libsolv-0.7.15/ext/testcase.c 2020-09-08 12:03:10.000000000 +0200 @@ -1809,49 +1809,65 @@ return 1; } -int -testcase_write(Solver *solv, const char *dir, int resultflags, const char *testcasename, const char *resultname) +const char ** +testcase_mangle_repo_names(Pool *pool) { - Pool *pool = solv->pool; - int i, r, repoid; - int mangle = 1; - const char **orignames; - - /* mangle repo names so that there are no conflicts */ - orignames = solv_calloc(pool->nrepos, sizeof(char *)); - for (repoid = 1; repoid < pool->nrepos; repoid++) + int i, repoid, mangle = 1; + Repo *repo; + const char **names = solv_calloc(pool->nrepos, sizeof(char *)); + FOR_REPOS(repoid, repo) { - Repo *repo = pool_id2repo(pool, repoid); - char *buf = solv_malloc((repo->name ? strlen(repo->name) : 0) + 40); - char *mp; - orignames[repoid] = repo->name; + char *buf, *mp; + buf = solv_malloc((repo->name ? strlen(repo->name) : 0) + 40); if (!repo->name || !repo->name[0]) sprintf(buf, "#%d", repoid); else strcpy(buf, repo->name); - for (i = 0; buf[i]; i++) - if (buf[i] == ' ' || buf[i] == '\t' || buf[i] == '/') - buf[i] = '_'; - mp = buf + strlen(buf); + for (mp = buf; *mp; mp++) + if (*mp == ' ' || *mp == '\t' || *mp == '/') + *mp = '_'; for (;;) { for (i = 1; i < repoid; i++) - if (!strcmp(buf, pool_id2repo(pool, i)->name)) + if (!strcmp(buf, names[i])) break; if (i == repoid) break; sprintf(mp, "_%d", mangle++); } - repo->name = buf; + names[repoid] = buf; } - r = testcase_write_mangled(solv, dir, resultflags, testcasename, resultname); - for (repoid = 1; repoid < pool->nrepos; repoid++) + return names; +} + +static void +swap_repo_names(Pool *pool, const char **names) +{ + int repoid; + Repo *repo; + FOR_REPOS(repoid, repo) { - Repo *repo = pool_id2repo(pool, repoid); - solv_free((void *)repo->name); - repo->name = orignames[repoid]; + const char *n = repo->name; + repo->name = names[repoid]; + names[repoid] = n; } - solv_free(orignames); +} + +int +testcase_write(Solver *solv, const char *dir, int resultflags, const char *testcasename, const char *resultname) +{ + Pool *pool = solv->pool; + int r, repoid; + const char **names; + + /* mangle repo names so that there are no conflicts */ + names = testcase_mangle_repo_names(pool); + swap_repo_names(pool, names); + r = testcase_write_mangled(solv, dir, resultflags, testcasename, resultname); + swap_repo_names(pool, names); + for (repoid = 1; repoid < pool->nrepos; repoid++) + solv_free((void *)names[repoid]); + solv_free((void *)names); return r; } @@ -2071,7 +2087,7 @@ { char *idata = read_inline_file(fp, &buf, &bufp, &bufl); rdata = "<inline>"; - rfp = solv_xfopen_buf(rdata, &idata, 0, "rf"); + rfp = solv_fmemopen(idata, strlen(idata), "rf"); } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.7.14/ext/testcase.h new/libsolv-0.7.15/ext/testcase.h --- old/libsolv-0.7.14/ext/testcase.h 2019-04-11 17:01:31.000000000 +0200 +++ new/libsolv-0.7.15/ext/testcase.h 2020-09-08 12:03:10.000000000 +0200 @@ -42,3 +42,5 @@ extern int testcase_write(Solver *solv, const char *dir, int resultflags, const char *testcasename, const char *resultname); extern Solver *testcase_read(Pool *pool, FILE *fp, const char *testcase, Queue *job, char **resultp, int *resultflagsp); extern char *testcase_resultdiff(const char *result1, const char *result2); +extern const char **testcase_mangle_repo_names(Pool *pool); + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.7.14/package/libsolv.changes new/libsolv-0.7.15/package/libsolv.changes --- old/libsolv-0.7.14/package/libsolv.changes 2020-05-27 11:59:16.000000000 +0200 +++ new/libsolv-0.7.15/package/libsolv.changes 2020-09-11 12:39:26.000000000 +0200 @@ -1,4 +1,26 @@ ------------------------------------------------------------------- +Fri Sep 11 12:31:27 CEST 2020 - [email protected] + +- fix deduceq2addedmap clearing bits outside of the map +- conda: feature depriorization first +- conda: fix startswith implementation +- move find_update_seeds() call in cleandeps calculation +- set SOLVABLE_BUILDHOST in rpm and rpmmd parsers +- new testcase_mangle_repo_names() function +- new solv_fmemopen() function +- bump version to 0.7.15 + +------------------------------------------------------------------- +Tue Jun 23 12:43:16 CEST 2020 - [email protected] + +- Enable zstd compression support for sle15 + +------------------------------------------------------------------- +Thu May 28 11:51:27 CEST 2020 - [email protected] + +- Enable zstd compression support for sle15-sp2 + +------------------------------------------------------------------- Wed May 27 11:48:46 CEST 2020 - [email protected] - Support blacklisted packages in solver_findproblemrule() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.7.14/package/libsolv.spec.in new/libsolv-0.7.15/package/libsolv.spec.in --- old/libsolv-0.7.14/package/libsolv.spec.in 2019-12-19 16:34:10.000000000 +0100 +++ new/libsolv-0.7.15/package/libsolv.spec.in 2020-06-23 12:49:23.000000000 +0200 @@ -24,7 +24,7 @@ %bcond_with bz2 %bcond_with xz %endif -%if 0%{?is_opensuse} && (0%{?sle_version} >= 150000 || 0%{?suse_version} >= 1500) +%if 0%{?sle_version} >= 150000 || 0%{?suse_version} >= 1500 %bcond_without zstd %else %bcond_with zstd diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.7.14/src/cleandeps.c new/libsolv-0.7.15/src/cleandeps.c --- old/libsolv-0.7.14/src/cleandeps.c 2019-04-11 14:15:40.000000000 +0200 +++ new/libsolv-0.7.15/src/cleandeps.c 2020-06-08 14:15:47.000000000 +0200 @@ -669,6 +669,7 @@ queue_init(&iq); queue_init(&xsuppq); + /* setup userinstalled map and search for special namespace cleandeps erases */ for (i = 0; i < job->count; i += 2) { how = job->elements[i]; @@ -874,23 +875,38 @@ } queue_init_clone(&iqcopy, &iq); - if (!unneeded) - { - if (solv->cleandeps_updatepkgs) - for (i = 0; i < solv->cleandeps_updatepkgs->count; i++) - queue_push(&iq, solv->cleandeps_updatepkgs->elements[i]); - } - if (unneeded) queue_empty(&iq); /* just in case... */ - /* clear userinstalled bit for the packages we really want to delete/update */ + /* clear userinstalled bits for the packages we really want to delete */ for (i = 0; i < iq.count; i++) { p = iq.elements[i]; - if (pool->solvables[p].repo != installed) - continue; - MAPCLR(&userinstalled, p - installed->start); + if (pool->solvables[p].repo == installed) + MAPCLR(&userinstalled, p - installed->start); + } + /* set userinstalled bits for all packages not in the considered map */ + if (pool->considered) + { + for (p = installed->start; p < installed->end; p++) + if (!MAPTST(pool->considered, p)) + MAPSET(&userinstalled, p - installed->start); /* we may not remove those */ + } + if (!unneeded && solv->cleandeps_updatepkgs) + { + /* find update seeds */ + queue_init(&updatepkgs_filtered); + find_update_seeds(solv, &updatepkgs_filtered, &userinstalled); + /* clear userinstalled bit for the packages we want to update */ + /* also add them to the erase list */ + for (i = 0; i < solv->cleandeps_updatepkgs->count; i++) + { + p = solv->cleandeps_updatepkgs->elements[i]; + if (pool->considered && !MAPTST(pool->considered, p)) + continue; + queue_push(&iq, p); + MAPCLR(&userinstalled, p - installed->start); + } } for (p = installed->start; p < installed->end; p++) @@ -898,8 +914,6 @@ if (pool->solvables[p].repo != installed) continue; MAPSET(&installedm, p); - if (pool->considered && !MAPTST(pool->considered, p)) - MAPSET(&userinstalled, p - installed->start); /* we may not remove those */ if (unneeded && !MAPTST(&userinstalled, p - installed->start)) continue; MAPSET(&im, p); @@ -907,13 +921,6 @@ MAPSET(&installedm, SYSTEMSOLVABLE); MAPSET(&im, SYSTEMSOLVABLE); - if (!unneeded && solv->cleandeps_updatepkgs) - { - /* find update "seeds" */ - queue_init(&updatepkgs_filtered); - find_update_seeds(solv, &updatepkgs_filtered, &userinstalled); - } - #ifdef CLEANDEPSDEBUG printf("REMOVE PASS\n"); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.7.14/src/conda.c new/libsolv-0.7.15/src/conda.c --- old/libsolv-0.7.14/src/conda.c 2019-04-15 15:51:39.000000000 +0200 +++ new/libsolv-0.7.15/src/conda.c 2020-07-03 12:09:37.000000000 +0200 @@ -212,7 +212,7 @@ r = solv_vercmp_conda(evr1, r1 ? r1 : s1, evr2, r2 ? r2 : s2, r2 ? 0 : startswith); if (r) return r; - if (!r1 && !r2) + if ((!r2 && startswith) || (!r1 && !r2)) return 0; if (!r1 && r2) return -1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.7.14/src/policy.c new/libsolv-0.7.15/src/policy.c --- old/libsolv-0.7.14/src/policy.c 2020-05-27 11:49:25.000000000 +0200 +++ new/libsolv-0.7.15/src/policy.c 2020-09-11 11:58:10.000000000 +0200 @@ -835,14 +835,18 @@ #ifdef ENABLE_CONDA static int -pool_buildversioncmp(Pool *pool, Solvable *s1, Solvable *s2) +pool_featurecountcmp(Pool *pool, Solvable *s1, Solvable *s2) { - const char *bv1, *bv2; unsigned int cnt1, cnt2; cnt1 = solvable_lookup_count(s1, SOLVABLE_TRACK_FEATURES); cnt2 = solvable_lookup_count(s2, SOLVABLE_TRACK_FEATURES); - if (cnt1 != cnt2) - return cnt1 > cnt2 ? -1 : 1; + return cnt1 == cnt2 ? 0 : cnt1 > cnt2 ? -1 : 1; +} + +static int +pool_buildversioncmp(Pool *pool, Solvable *s1, Solvable *s2) +{ + const char *bv1, *bv2; bv1 = solvable_lookup_str(s1, SOLVABLE_BUILDVERSION); bv2 = solvable_lookup_str(s2, SOLVABLE_BUILDVERSION); if (!bv1 && !bv2) @@ -903,7 +907,14 @@ best = s; /* take current as new best */ continue; } - r = best->evr != s->evr ? pool_evrcmp(pool, best->evr, s->evr, EVRCMP_COMPARE) : 0; + + r = 0; +#ifdef ENABLE_CONDA + if (pool->disttype == DISTTYPE_CONDA) + r = pool_featurecountcmp(pool, best, s); +#endif + if (r == 0) + r = best->evr != s->evr ? pool_evrcmp(pool, best->evr, s->evr, EVRCMP_COMPARE) : 0; #ifdef ENABLE_LINKED_PKGS if (r == 0 && has_package_link(pool, s)) r = pool_link_evrcmp(pool, best, s); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.7.14/src/repodata.c new/libsolv-0.7.15/src/repodata.c --- old/libsolv-0.7.14/src/repodata.c 2020-04-24 12:00:43.000000000 +0200 +++ new/libsolv-0.7.15/src/repodata.c 2020-06-26 15:46:52.000000000 +0200 @@ -388,7 +388,7 @@ comps = stringpool_id2str(data->localpool ? &data->spool : &pool->ss, comp); l = strlen(comps); p -= l; - strncpy(p, comps, l); + memcpy(p, comps, l); parent = dirpool_parent(&data->dirpool, parent); if (parent) *--p = '/'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.7.14/src/selection.c new/libsolv-0.7.15/src/selection.c --- old/libsolv-0.7.14/src/selection.c 2019-10-22 14:13:12.000000000 +0200 +++ new/libsolv-0.7.15/src/selection.c 2020-06-03 14:34:17.000000000 +0200 @@ -150,6 +150,7 @@ if (!q.count) { queue_empty(selection); + queue_free(&q); return; } queue_truncate(selection, 2); @@ -163,6 +164,7 @@ selection->elements[0] = SOLVER_SOLVABLE | SOLVER_NOAUTOSET; selection->elements[1] = q.elements[0]; } + queue_free(&q); } /* only supports simple rels plus REL_ARCH */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.7.14/src/solver.c new/libsolv-0.7.15/src/solver.c --- old/libsolv-0.7.14/src/solver.c 2020-01-21 15:24:12.000000000 +0100 +++ new/libsolv-0.7.15/src/solver.c 2020-09-10 12:29:42.000000000 +0200 @@ -3240,7 +3240,7 @@ p = -r->p; if (!MAPTST(addedmap, p)) { - /* should never happen, but... */ + /* this can happen with complex dependencies that have more than one pos literal */ if (!solv->addedmap_deduceq.count || solv->addedmap_deduceq.elements[solv->addedmap_deduceq.count - 1] != -p) queue_push(&solv->addedmap_deduceq, -p); continue; @@ -3280,7 +3280,7 @@ if (p > 0) MAPSET(addedmap, p); else - MAPCLR(addedmap, p); + MAPCLR(addedmap, -p); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.7.14/test/testcases/blacklist/ptf new/libsolv-0.7.15/test/testcases/blacklist/ptf --- old/libsolv-0.7.14/test/testcases/blacklist/ptf 2019-11-08 14:39:59.000000000 +0100 +++ new/libsolv-0.7.15/test/testcases/blacklist/ptf 1970-01-01 01:00:00.000000000 +0100 @@ -1,52 +0,0 @@ -repo system 0 testtags <inline> -#>=Pkg: ptf-2 1 1 noarch -#>=Prv: ptf-package() -repo available 0 testtags <inline> -#>=Pkg: ptf-1 1 1 noarch -#>=Prv: ptf-package() -#>=Pkg: ptf-2 2 1 noarch -#>=Prv: ptf-package() -#>=Pkg: A 1 1 noarch -#>=Req: ptf-1 - -system i686 * system - -# -# test 1: a ptf package cannot be pulled in via a dependency -# -job blacklist provides ptf-package() -job install name A -result transaction,problems <inline> -#>problem 78613afb info package A-1-1.noarch requires ptf-1, but none of the providers can be installed -#>problem 78613afb solution 23f73f5b deljob install name A -#>problem 78613afb solution b79aeb6f allow ptf-1-1-1.noarch@available - -# -# test 2: a ptf package cannot be pulled in via a unspecific job -# -nextjob -job blacklist provides ptf-package() -job install name ptf-1 -result transaction,problems <inline> -#>problem 021b17e2 info package ptf-1-1-1.noarch cannot only be installed by a direct request -#>problem 021b17e2 solution 932a6c2f deljob install name ptf-1 -#>problem 021b17e2 solution b79aeb6f allow ptf-1-1-1.noarch@available - -# -# test 3: a ptf package can be pulled in via a specific job -# -nextjob -job blacklist provides ptf-package() -job install name ptf-1 [setevr] -result transaction,problems <inline> -#>install ptf-1-1-1.noarch@available - -# -# test 4: a ptf package can be updated -# -nextjob -job blacklist provides ptf-package() -job update all packages -result transaction,problems <inline> -#>upgrade ptf-2-1-1.noarch@system ptf-2-2-1.noarch@available - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.7.14/test/testcases/blacklist/ptf.t new/libsolv-0.7.15/test/testcases/blacklist/ptf.t --- old/libsolv-0.7.14/test/testcases/blacklist/ptf.t 1970-01-01 01:00:00.000000000 +0100 +++ new/libsolv-0.7.15/test/testcases/blacklist/ptf.t 2020-09-11 11:53:41.000000000 +0200 @@ -0,0 +1,52 @@ +repo system 0 testtags <inline> +#>=Pkg: ptf-2 1 1 noarch +#>=Prv: ptf-package() +repo available 0 testtags <inline> +#>=Pkg: ptf-1 1 1 noarch +#>=Prv: ptf-package() +#>=Pkg: ptf-2 2 1 noarch +#>=Prv: ptf-package() +#>=Pkg: A 1 1 noarch +#>=Req: ptf-1 + +system unset * system + +# +# test 1: a ptf package cannot be pulled in via a dependency +# +job blacklist provides ptf-package() +job install name A +result transaction,problems <inline> +#>problem 78613afb info package A-1-1.noarch requires ptf-1, but none of the providers can be installed +#>problem 78613afb solution 23f73f5b deljob install name A +#>problem 78613afb solution b79aeb6f allow ptf-1-1-1.noarch@available + +# +# test 2: a ptf package cannot be pulled in via a unspecific job +# +nextjob +job blacklist provides ptf-package() +job install name ptf-1 +result transaction,problems <inline> +#>problem 021b17e2 info package ptf-1-1-1.noarch can only be installed by a direct request +#>problem 021b17e2 solution 932a6c2f deljob install name ptf-1 +#>problem 021b17e2 solution b79aeb6f allow ptf-1-1-1.noarch@available + +# +# test 3: a ptf package can be pulled in via a specific job +# +nextjob +job blacklist provides ptf-package() +job install name ptf-1 [setevr] +result transaction,problems <inline> +#>install ptf-1-1-1.noarch@available + +# +# test 4: a ptf package can be updated +# +nextjob +job blacklist provides ptf-package() +job update all packages +result transaction,problems <inline> +#>upgrade ptf-2-1-1.noarch@system ptf-2-2-1.noarch@available + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.7.14/test/testcases/blacklist/retracted new/libsolv-0.7.15/test/testcases/blacklist/retracted --- old/libsolv-0.7.14/test/testcases/blacklist/retracted 2019-11-08 14:39:59.000000000 +0100 +++ new/libsolv-0.7.15/test/testcases/blacklist/retracted 1970-01-01 01:00:00.000000000 +0100 @@ -1,22 +0,0 @@ -repo system 0 testtags <inline> -#>=Pkg: B 1 1 noarch -repo available 0 testtags <inline> -#>=Pkg: patch 1 1 noarch -#>=Con: B < 2-1 -#>=Pkg: B 2 1 noarch -#>=Prv: retracted-patch-package() - -system i686 * system - -job blacklist provides retracted-patch-package() -job install name patch -#>problem 3a66200a info package patch-1-1.noarch conflicts with B < 2-1 provided by B-1-1.noarch -#>problem 3a66200a solution 14805cf8 deljob install name patch -#>problem 3a66200a solution 4a9277b8 allow B-2-1.noarch@available -#>problem 3a66200a solution 718064ed erase B-1-1.noarch@system - -nextjob -job blacklist provides retracted-patch-package() -job install pkg B-2-1.noarch@available -result transaction,problems <inline> -#>upgrade B-1-1.noarch@system B-2-1.noarch@available diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.7.14/test/testcases/blacklist/retracted.t new/libsolv-0.7.15/test/testcases/blacklist/retracted.t --- old/libsolv-0.7.14/test/testcases/blacklist/retracted.t 1970-01-01 01:00:00.000000000 +0100 +++ new/libsolv-0.7.15/test/testcases/blacklist/retracted.t 2020-09-11 12:27:43.000000000 +0200 @@ -0,0 +1,23 @@ +repo system 0 testtags <inline> +#>=Pkg: B 1 1 noarch +repo available 0 testtags <inline> +#>=Pkg: patch 1 1 noarch +#>=Con: B < 2-1 +#>=Pkg: B 2 1 noarch +#>=Prv: retracted-patch-package() + +system unset rpm system + +job blacklist provides retracted-patch-package() +job install name patch +result transaction,problems <inline> +#>problem 3a66200a info package patch-1-1.noarch conflicts with B < 2-1 provided by B-1-1.noarch +#>problem 3a66200a solution 14805cf8 deljob install name patch +#>problem 3a66200a solution 4a9277b8 allow B-2-1.noarch@available +#>problem 3a66200a solution 718064ed erase B-1-1.noarch@system + +nextjob +job blacklist provides retracted-patch-package() +job install pkg B-2-1.noarch@available +result transaction,problems <inline> +#>upgrade B-1-1.noarch@system B-2-1.noarch@available diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsolv-0.7.14/tools/testsolv.c new/libsolv-0.7.15/tools/testsolv.c --- old/libsolv-0.7.14/tools/testsolv.c 2019-04-11 16:48:30.000000000 +0200 +++ new/libsolv-0.7.15/tools/testsolv.c 2020-06-03 14:34:17.000000000 +0200 @@ -66,6 +66,16 @@ return 0; } +static void +free_considered(Pool *pool) +{ + if (pool->considered) + { + map_free(pool->considered); + pool->considered = solv_free(pool->considered); + } +} + int main(int argc, char **argv) { @@ -149,7 +159,9 @@ solv = testcase_read(pool, fp, argv[optind], &job, &result, &resultflags); if (!solv) { + free_considered(pool); pool_free(pool); + queue_free(&job); exit(resultflags == 77 ? 77 : 1); } if (reusesolv) @@ -349,6 +361,7 @@ } if (reusesolv) solver_free(reusesolv); + free_considered(pool); pool_free(pool); fclose(fp); }
