OPTION (ENABLE_PUBKEY "Build with pubkey support?" OFF)
OPTION (ENABLE_RPMDB_BYRPMHEADER "Build with rpmdb Header support?" OFF)
OPTION (ENABLE_RPMDB_LIBRPM "Use librpm to access the rpm database?" OFF)
+OPTION (ENABLE_RPMDB_BDB "Use BerkeleyDB to access the rpm database?" OFF)
OPTION (ENABLE_RPMPKG_LIBRPM "Use librpm to access rpm header information?" OFF)
OPTION (ENABLE_RPMMD "Build with rpmmd repository support?" OFF)
OPTION (ENABLE_SUSEREPO "Build with suse repository support?" OFF)
ENDIF (RPMMISC_LIBRARY)
ENDIF (RPM5)
- # check if rpm contains a bundled berkeley db
- CHECK_INCLUDE_FILE(rpm/db.h HAVE_RPM_DB_H)
- IF (NOT ENABLE_RPMDB_LIBRPM)
- IF (NOT HAVE_RPM_DB_H)
- FIND_LIBRARY (DB_LIBRARY NAMES db)
- IF (DB_LIBRARY)
- SET (RPMDB_LIBRARY ${DB_LIBRARY} ${RPMDB_LIBRARY})
- ENDIF (DB_LIBRARY)
- IF (DB_INCLUDE_DIR)
- INCLUDE_DIRECTORIES (${DB_INCLUDE_DIR})
- ENDIF (DB_INCLUDE_DIR)
- ENDIF (NOT HAVE_RPM_DB_H)
- ENDIF (NOT ENABLE_RPMDB_LIBRPM)
+ IF (ENABLE_RPMDB)
+ IF (NOT ENABLE_RPMDB_BDB)
+ SET (ENABLE_RPMDB_LIBRPM ON)
+ ENDIF (NOT ENABLE_RPMDB_BDB)
+
+ # check if rpm contains a bundled berkeley db
+ CHECK_INCLUDE_FILE(rpm/db.h HAVE_RPM_DB_H)
+ IF (NOT ENABLE_RPMDB_LIBRPM)
+ IF (NOT HAVE_RPM_DB_H)
+ FIND_LIBRARY (DB_LIBRARY NAMES db)
+ IF (DB_LIBRARY)
+ SET (RPMDB_LIBRARY ${DB_LIBRARY} ${RPMDB_LIBRARY})
+ ENDIF (DB_LIBRARY)
+ IF (DB_INCLUDE_DIR)
+ INCLUDE_DIRECTORIES (${DB_INCLUDE_DIR})
+ ENDIF (DB_INCLUDE_DIR)
+ ENDIF (NOT HAVE_RPM_DB_H)
+ ENDIF (NOT ENABLE_RPMDB_LIBRPM)
+ ENDIF (ENABLE_RPMDB)
+
INCLUDE (CheckLibraryExists)
CHECK_LIBRARY_EXISTS(rpmio pgpDigGetParams "" HAVE_PGPDIGGETPARAMS)
CHECK_LIBRARY_EXISTS(rpm rpmdbNextIteratorHeaderBlob "" HAVE_RPMDBNEXTITERATORHEADERBLOB)
This file contains the major changes between
libsolv versions:
+Version 0.7.11
+- ENABLE_RPMDB_LIBRPM is now the default
+- selected bug fixes:
+ * fixed solv_zchunk decoding error if large chunks are used
+ * treat retracted pathes as irrelevant
+ * made add_update_target work with multiversion installs
+
Version 0.7.10
- new features:
* new rpm_stat_database() function
resolving package dependencies.
The sat-solver code has been written to aim for the newest packages,
-record the decision tree to provide introspection, and also allows to
-provide the user with suggestions on how to deal with unsolvable
-problems. It also takes advantage of the repository storage to
+record the decision tree to provide introspection, and also provides
+the user with suggestions on how to deal with unsolvable
+problems. It also takes advantage of repository storage to
minimize memory usage.
Supported package formats:
SET(LIBSOLV_MAJOR "0")
SET(LIBSOLV_MINOR "7")
-SET(LIBSOLV_PATCH "10")
+SET(LIBSOLV_PATCH "11")
.\" Title: Libsolv-Bindings
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 07/01/2019
+.\" Date: 01/21/2020
.\" Manual: LIBSOLV
.\" Source: libsolv
.\" Language: English
.\"
-.TH "LIBSOLV\-BINDINGS" "3" "07/01/2019" "libsolv" "LIBSOLV"
+.TH "LIBSOLV\-BINDINGS" "3" "01/21/2020" "libsolv" "LIBSOLV"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.RS 4
.\}
.nf
+\fBSolvable *whatcontainsdep(Id\fR \fIkeyname\fR\fB, DepId\fR \fIdep\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR
+my \fI@solvables\fR \fB=\fR \fI$pool\fR\fB\->whatcontainsdep(\fR\fI$keyname\fR\fB,\fR \fI$dep\fR\fB)\fR
+\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.whatcontainsdep(\fR\fIkeyname\fR\fB,\fR \fIdep\fR\fB)\fR
+\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.whatcontainsdep(\fR\fIkeyname\fR\fB,\fR \fIdep\fR\fB)\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Return all solvables for which keyname contains the dependency\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBSolvable *whatmatchesdep(Id\fR \fIkeyname\fR\fB, DepId\fR \fIdep\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR
+my \fI@solvables\fR \fB=\fR \fI$pool\fR\fB\->whatmatchesdep(\fR\fI$keyname\fR\fB,\fR \fI$sdep\fR\fB)\fR
+\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.whatmatchesdep(\fR\fIkeyname\fR\fB,\fR \fIdep\fR\fB)\fR
+\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.whatmatchesdep(\fR\fIkeyname\fR\fB,\fR \fIdep\fR\fB)\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Return all solvables that have dependencies in keyname that match the dependency\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
\fBSolvable *whatmatchessolvable(Id\fR \fIkeyname\fR\fB, Solvable\fR \fIsolvable\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR
my \fI@solvables\fR \fB=\fR \fI$pool\fR\fB\->whatmatchessolvable(\fR\fI$keyname\fR\fB,\fR \fI$solvable\fR\fB)\fR
\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.whatmatchessolvable(\fR\fIkeyname\fR\fB,\fR \fIsolvable\fR\fB)\fR
.\}
.sp
The id of this dependency\&.
-.SH "METHODS"
+.SS "METHODS"
.sp
.if n \{\
.RS 4
.\" Title: Libsolv-Pool
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 10/22/2018
+.\" Date: 01/21/2020
.\" Manual: LIBSOLV
.\" Source: libsolv
.\" Language: English
.\"
-.TH "LIBSOLV\-POOL" "3" "10/22/2018" "libsolv" "LIBSOLV"
+.TH "LIBSOLV\-POOL" "3" "01/21/2020" "libsolv" "LIBSOLV"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.sp
There can be multiple equivalence classes, the set of allowed vendor changes for an installed package is calculated by building the union of all of the equivalence classes the vendor of the installed package is part of\&.
.sp
-You can turn off the architecture replacement checks with the Solver\(cqs SOLVER_FLAG_ALLOW_VENDORCHANGE flag\&.
+You can turn off the vendor replacement checks with the Solver\(cqs SOLVER_FLAG_ALLOW_VENDORCHANGE flag\&.
.SH "BOOLEAN DEPENDENCIES"
.sp
Boolean Dependencies allow to build complex expressions from simple dependencies\&. Note that depending on the package manager only a subset of those may be useful\&. For example, debian currently only allows an "OR" expression\&.
of all of the equivalence classes the vendor of the installed package
is part of.
-You can turn off the architecture replacement checks with the Solver's
+You can turn off the vendor replacement checks with the Solver's
SOLVER_FLAG_ALLOW_VENDORCHANGE flag.
} RpmHead;
+static inline void
+headinit(RpmHead *h, unsigned int cnt, unsigned int dcnt)
+{
+ h->cnt = (int)cnt;
+ h->dcnt = dcnt;
+ h->dp = h->data + 16 * cnt;
+ h->dp[dcnt] = 0;
+}
+
static inline unsigned char *
headfindtag(RpmHead *h, int tag)
{
char *rootdir;
RpmHead *rpmhead; /* header storage space */
- int rpmheadsize;
+ unsigned int rpmheadsize;
};
#endif
#ifndef ENABLE_RPMPKG_LIBRPM
-static int
-headfromfp(struct rpmdbstate *state, const char *name, FILE *fp, unsigned char *lead, unsigned int cnt, unsigned int dsize, unsigned int pad, Chksum *chk1, Chksum *chk2)
+static inline RpmHead *
+realloc_head(struct rpmdbstate *state, unsigned int len)
{
- RpmHead *rpmhead;
- unsigned int len = 16 * cnt + dsize + pad;
- if (len + 1 > state->rpmheadsize)
+ if (len > state->rpmheadsize)
{
state->rpmheadsize = len + 128;
state->rpmhead = solv_realloc(state->rpmhead, sizeof(*state->rpmhead) + state->rpmheadsize);
}
- rpmhead = state->rpmhead;
+ return state->rpmhead;
+}
+
+static int
+headfromfp(struct rpmdbstate *state, const char *name, FILE *fp, unsigned char *lead, unsigned int cnt, unsigned int dsize, unsigned int pad, Chksum *chk1, Chksum *chk2)
+{
+ unsigned int len = 16 * cnt + dsize + pad;
+ RpmHead *rpmhead = realloc_head(state, len + 1);
if (fread(rpmhead->data, len, 1, fp) != 1)
return pool_error(state->pool, 0, "%s: unexpected EOF", name);
if (chk1)
solv_chksum_add(chk1, rpmhead->data, len);
if (chk2)
solv_chksum_add(chk2, rpmhead->data, len);
- rpmhead->data[len] = 0;
- rpmhead->cnt = cnt;
- rpmhead->dcnt = dsize;
- rpmhead->dp = rpmhead->data + cnt * 16;
+ headinit(rpmhead, cnt, dsize);
return 1;
}
-#if defined(ENABLE_RPMDB_BYRPMHEADER)
-static void
-headfromblob(struct rpmdbstate *state, const unsigned char *blob, unsigned int cnt, unsigned int dsize)
+# if defined(ENABLE_RPMDB) && (!defined(ENABLE_RPMDB_LIBRPM) || defined(HAVE_RPMDBNEXTITERATORHEADERBLOB))
+
+static int
+headfromhdrblob(struct rpmdbstate *state, const unsigned char *data, unsigned int size)
{
+ unsigned int dsize, cnt, len;
RpmHead *rpmhead;
- unsigned int len = 16 * cnt + dsize;
- if (len + 1 > state->rpmheadsize)
- {
- state->rpmheadsize = len + 128;
- state->rpmhead = solv_realloc(state->rpmhead, sizeof(*state->rpmhead) + state->rpmheadsize);
- }
- rpmhead = state->rpmhead;
- memcpy(rpmhead->data, blob, len);
- rpmhead->data[len] = 0;
- rpmhead->cnt = cnt;
- rpmhead->dcnt = dsize;
- rpmhead->dp = rpmhead->data + cnt * 16;
+ if (size < 8)
+ return pool_error(state->pool, 0, "corrupt rpm database (size)");
+ cnt = getu32(data);
+ dsize = getu32(data + 4);
+ if (cnt >= MAX_HDR_CNT || dsize >= MAX_HDR_DSIZE)
+ return pool_error(state->pool, 0, "corrupt rpm database (cnt/dcnt)");
+ if (8 + cnt * 16 + dsize > size)
+ return pool_error(state->pool, 0, "corrupt rpm database (data size)");
+ len = 16 * cnt + dsize;
+ rpmhead = realloc_head(state, len + 1);
+ memcpy(rpmhead->data, data + 8, len);
+ headinit(rpmhead, cnt, dsize);
+ return 1;
}
-#endif
+
+# endif
#else
struct rpmdbstate *state = rpmstate;
#ifndef ENABLE_RPMPKG_LIBRPM
const unsigned char *uh;
- unsigned int dsize, cnt;
+ unsigned int dsize, cnt, len;
+ RpmHead *rpmhead;
if (!h)
return 0;
free((void *)uh);
return 0;
}
- headfromblob(state, uh + 8, cnt, dsize);
+ len = 16 * cnt + dsize;
+ rpmhead = realloc_head(state, len + 1);;
+ memcpy(rpmhead->data, uh + 8, len);
+ headinit(rpmhead, cnt, dsize);
free((void *)uh);
#else
if (!h)
char *rootdir;
RpmHead *rpmhead; /* header storage space */
- int rpmheadsize;
+ unsigned int rpmheadsize;
int dbenvopened; /* database environment opened */
int pkgdbopened; /* package database openend */
- int is_ostree; /* read-only db that lives in /usr/share/rpm */
+ const char *dbpath; /* path to the database */
DB_ENV *dbenv; /* database environment */
DB *db; /* packages database */
}
static void
-detect_ostree(struct rpmdbstate *state)
+detect_dbpath(struct rpmdbstate *state)
{
- state->is_ostree = access_rootdir(state, "/var/lib/rpm", W_OK) == -1 &&
- access_rootdir(state, "/usr/share/rpm/Packages", R_OK) == 0 ? 1 : -1;
+ state->dbpath = access_rootdir(state, "/var/lib/rpm", W_OK) == -1
+ && access_rootdir(state, "/usr/share/rpm/Packages", R_OK) == 0
+ ? "/usr/share/rpm" : "/var/lib/rpm";
}
static int
stat_database_name(struct rpmdbstate *state, char *dbname, struct stat *statbuf, int seterror)
{
char *dbpath;
- dbpath = solv_dupjoin(state->rootdir, state->is_ostree > 0 ? "/usr/share/rpm/" : "/var/lib/rpm/", dbname);
+ if (!state->dbpath)
+ detect_dbpath(state);
+ dbpath = solv_dupjoin(state->rootdir, state->dbpath, dbname);
if (stat(dbpath, statbuf))
{
if (seterror)
static int
stat_database(struct rpmdbstate *state, struct stat *statbuf)
{
- if (!state->is_ostree)
- detect_ostree(state);
- return stat_database_name(state, "Packages", statbuf, 1);
+ return stat_database_name(state, "/Packages", statbuf, 1);
}
static int
opendbenv(struct rpmdbstate *state)
{
- const char *rootdir = state->rootdir;
char *dbpath;
DB_ENV *dbenv = 0;
int r;
#if (defined(FEDORA) || defined(MAGEIA)) && (DB_VERSION_MAJOR >= 5 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 5))
dbenv->set_thread_count(dbenv, 8);
#endif
- dbpath = solv_dupjoin(rootdir, "/var/lib/rpm", 0);
- state->is_ostree = -1;
+ state->dbpath = "/var/lib/rpm";
+ dbpath = solv_dupjoin(state->rootdir, state->dbpath, 0);
if (access(dbpath, W_OK) == -1)
{
- free(dbpath);
- dbpath = solv_dupjoin(rootdir, "/usr/share/rpm/Packages", 0);
- if (access(dbpath, R_OK) == 0)
- state->is_ostree = 1;
- free(dbpath);
- dbpath = solv_dupjoin(rootdir, state->is_ostree > 0 ? "/usr/share/rpm" : "/var/lib/rpm", 0);
+ if (access_rootdir(state, "/usr/share/rpm/Packages", R_OK) == 0)
+ {
+ state->dbpath = "/usr/share/rpm";
+ free(dbpath);
+ dbpath = solv_dupjoin(state->rootdir, state->dbpath, 0);
+ }
r = dbenv->open(dbenv, dbpath, DB_CREATE|DB_PRIVATE|DB_INIT_MPOOL, 0);
}
else
return entries;
}
-/* common code, return dbid on success, -1 on error */
-static int
-getrpm_dbdata(struct rpmdbstate *state, DBT *dbdata, int dbid)
-{
- unsigned int dsize, cnt, l;
- RpmHead *rpmhead;
-
- if (dbdata->size < 8)
- return pool_error(state->pool, -1, "corrupt rpm database (size)");
- cnt = getu32((const unsigned char *)dbdata->data);
- dsize = getu32((const unsigned char *)dbdata->data + 4);
- if (cnt >= MAX_HDR_CNT || dsize >= MAX_HDR_DSIZE)
- return pool_error(state->pool, -1, "corrupt rpm database (cnt/dcnt)");
- l = cnt * 16 + dsize;
- if (8 + l > dbdata->size)
- return pool_error(state->pool, -1, "corrupt rpm database (data size)");
- if (l + 1 > state->rpmheadsize)
- {
- state->rpmheadsize = l + 128;
- state->rpmhead = solv_realloc(state->rpmhead, sizeof(*rpmhead) + state->rpmheadsize);
- }
- rpmhead = state->rpmhead;
- rpmhead->cnt = cnt;
- rpmhead->dcnt = dsize;
- memcpy(rpmhead->data, (unsigned char *)dbdata->data + 8, l);
- rpmhead->data[l] = 0;
- rpmhead->dp = rpmhead->data + cnt * 16;
- return dbid;
-}
+static int headfromhdrblob(struct rpmdbstate *state, const unsigned char *data, unsigned int size);
/* retrive header by rpmdbid, returns 0 if not found, -1 on error */
static int
dbdata.size = 0;
if (state->db->get(state->db, NULL, &dbkey, &dbdata, 0))
return 0;
- return getrpm_dbdata(state, &dbdata, dbid);
+ if (!headfromhdrblob(state, (const unsigned char *)dbdata.data, (unsigned int)dbdata.size))
+ return -1;
+ return dbid;
}
static int
DBT dbkey;
DBT dbdata;
- if (stat_database_name(state, "Name", &statbuf, 0))
+ if (stat_database_name(state, "/Name", &statbuf, 0))
return 0;
memset(&dbkey, 0, sizeof(dbkey));
memset(&dbdata, 0, sizeof(dbdata));
if (dbkey.size != 4)
return pool_error(state->pool, -1, "corrupt Packages database (key size)");
dbid = db2rpmdbid(dbkey.data, state->byteswapped);
- if (dbid) /* ignore join key */
- return getrpm_dbdata(state, &dbdata, dbid);
+ if (!dbid)
+ continue; /* ignore join key */
+ if (!headfromhdrblob(state, (const unsigned char *)dbdata.data, (unsigned int)dbdata.size))
+ return -1;
+ return dbid;
}
return 0; /* no more entries */
}
int fd, l;
char buf[4096];
- dbpath = solv_dupjoin(state->rootdir, state->is_ostree > 0 ? "/usr/share/rpm/" : "/var/lib/rpm/", "Name");
+ if (!state->dbpath)
+ detect_dbpath(state);
+ dbpath = solv_dupjoin(state->rootdir, state->dbpath, "/Name");
if ((fd = open(dbpath, O_RDONLY)) < 0)
return -1;
while ((l = read(fd, buf, sizeof(buf))) > 0)
return 0;
}
-
char *rootdir;
RpmHead *rpmhead; /* header storage space */
- int rpmheadsize;
+ unsigned int rpmheadsize;
int dbenvopened; /* database environment opened */
- int is_ostree; /* read-only db that lives in /usr/share/rpm */
+ const char *dbpath; /* path to the database */
rpmts ts;
rpmdbMatchIterator mi; /* iterator over packages database */
}
static void
-detect_ostree(struct rpmdbstate *state)
+detect_dbpath(struct rpmdbstate *state)
{
- state->is_ostree = access_rootdir(state, "/var/lib/rpm", W_OK) == -1 &&
- access_rootdir(state, "/usr/share/rpm/Packages", R_OK) == 0 ? 1 : -1;
+ state->dbpath = access_rootdir(state, "/var/lib/rpm", W_OK) == -1
+ && access_rootdir(state, "/usr/share/rpm/Packages", R_OK) == 0
+ ? "/usr/share/rpm" : "/var/lib/rpm";
}
static int
stat_database(struct rpmdbstate *state, struct stat *statbuf)
{
static const char *dbname[] = {
- "Packages",
- "Packages.db",
- "rpmdb.sqlite",
- "data.mdb",
- "Packages", /* for error reporting */
+ "/Packages",
+ "/Packages.db",
+ "/rpmdb.sqlite",
+ "/data.mdb",
+ "/Packages", /* for error reporting */
0,
};
int i;
if (state->dbenvopened == 1)
return rpmdbFStat(rpmtsGetRdb(state->ts), statbuf);
#endif
- if (!state->is_ostree)
- detect_ostree(state);
+ if (!state->dbpath)
+ detect_dbpath(state);
for (i = 0; ; i++)
{
- char *dbpath = solv_dupjoin(state->rootdir, state->is_ostree > 0 ? "/usr/share/rpm/" : "/var/lib/rpm/", dbname[i]);
+ char *dbpath = solv_dupjoin(state->rootdir, state->dbpath, dbname[i]);
if (!stat(dbpath, statbuf))
{
free(dbpath);
static int
opendbenv(struct rpmdbstate *state)
{
- const char *rootdir = state->rootdir;
rpmts ts;
char *dbpath;
- detect_ostree(state);
- dbpath = solv_dupjoin("_dbpath ", rootdir, state->is_ostree > 0 ? "/usr/share/rpm" : "/var/lib/rpm");
+
+ if (!state->dbpath)
+ detect_dbpath(state);
+ dbpath = solv_dupjoin("_dbpath ", state->rootdir, state->dbpath);
rpmDefineMacro(NULL, dbpath, 0);
solv_free(dbpath);
ts = rpmtsCreate();
}
#if defined(HAVE_RPMDBNEXTITERATORHEADERBLOB) && !defined(ENABLE_RPMPKG_LIBRPM)
-static int
-rpm_byrpmhdrblob(struct rpmdbstate *state, const unsigned char *data, unsigned int size)
-{
- unsigned int dsize, cnt, len;
- RpmHead *rpmhead;
- if (size < 8)
- return pool_error(state->pool, 0, "corrupt rpm database (size)");
- cnt = getu32(data);
- dsize = getu32(data + 4);
- if (cnt >= MAX_HDR_CNT || dsize >= MAX_HDR_DSIZE)
- return pool_error(state->pool, 0, "corrupt rpm database (cnt/dcnt)");
- if (8 + cnt * 16 + dsize > size)
- return pool_error(state->pool, 0, "corrupt rpm database (data size)");
- len = 16 * cnt + dsize;
- if (len + 1 > state->rpmheadsize)
- {
- state->rpmheadsize = len + 128;
- state->rpmhead = solv_realloc(state->rpmhead, sizeof(*state->rpmhead) + state->rpmheadsize);
- }
- rpmhead = state->rpmhead;
- memcpy(rpmhead->data, data + 8, len);
- rpmhead->data[len] = 0;
- rpmhead->cnt = cnt;
- rpmhead->dcnt = dsize;
- rpmhead->dp = rpmhead->data + cnt * 16;
- return 1;
-}
+static int headfromhdrblob(struct rpmdbstate *state, const unsigned char *data, unsigned int size);
#endif
/* retrive header by rpmdbid, returns 0 if not found, -1 on error */
rpmdbFreeIterator(mi);
return 0;
}
- if (!rpm_byrpmhdrblob(state, uh, uhlen))
+ if (!headfromhdrblob(state, uh, uhlen))
{
rpmdbFreeIterator(mi);
return -1;
while ((uh = rpmdbNextIteratorHeaderBlob(state->mi, &uhlen)) != 0)
{
Id dbid = rpmdbGetIteratorOffset(state->mi);
- if (!rpm_byrpmhdrblob(state, uh, uhlen))
+ if (!headfromhdrblob(state, uh, uhlen))
continue;
return dbid;
}
}
if (++p < endp && (*p & 0x80) != 0)
{
- *dp = p[-3] ^ (p[-2] << 7) ^ (p[1] << 14) ^ ((p[0] ^ 0x80) << 21);
+ *dp = p[-3] ^ (p[-2] << 7) ^ (p[-1] << 14) ^ ((p[0] ^ 0x80) << 21);
return p + 1;
}
if (++p < endp && (*p & 0xf0) == 0x80)
{
- *dp = p[-4] ^ (p[-3] << 7) ^ (p[2] << 14) ^ (p[1] << 21) ^ ((p[0] ^ 0x80) << 28);
+ *dp = p[-4] ^ (p[-3] << 7) ^ (p[-2] << 14) ^ (p[-1] << 21) ^ ((p[0] ^ 0x80) << 28);
return p + 1;
}
return 0;
-------------------------------------------------------------------
+Wed Jan 22 13:52:48 CET 2020 - mls@suse.de
+
+- fixed solv_zchunk decoding error if large chunks are used
+- treat retracted pathes as irrelevant
+- made add_update_target work with multiversion installs
+- bump version to 0.7.11
+
+-------------------------------------------------------------------
+Thu Dec 19 16:29:52 CET 2019 - mls@suse.de
+
+- fix solv_zchunk decoding error if large chunks are used
+ [bnc#1159314]
+
+-------------------------------------------------------------------
+Tue Dec 10 21:02:31 CET 2019 - mls@suse.de
+
+- build with -DENABLE_RPMDB_LIBRPM=1 on SUSE to support
+ multiple rpm database backends
+
+-------------------------------------------------------------------
Tue Dec 10 14:18:36 CET 2019 - mls@suse.de
- added two new function to make libzypp independent of the rpm
}
}
if (first)
- continue;
+ continue; /* not the first in the group */
+
+ if (!bestscore)
+ continue; /* did not find a score for this group */
/* speed up common case where installed package already has best arch */
if (allowedarchs.count == 1 && bests && allowedarchs.elements[0] == bests->arch)
allowedarchs.count--; /* installed arch is best */
- if (allowedarchs.count && pool->implicitobsoleteusescolors && installed && bestscore)
+ if (allowedarchs.count && pool->implicitobsoleteusescolors && installed)
{
/* need an extra pass for lockstep checking: we only allow to keep an inferior arch
* if the corresponding installed package is not lock-stepped */
if (ps->name != s->name || !MAPTST(addedmap, p))
continue;
a = pool_arch2score(pool, ps->arch);
- if (a != 1 && bestscore && ((a ^ bestscore) & 0xffff0000) != 0)
+ if (a != 1 && ((a ^ bestscore) & 0xffff0000) != 0)
{
if (installed && ps->repo == installed)
{
if (s->repo == installed)
{
queue_push2(solv->update_targets, p, p);
+ FOR_PROVIDES(pi, pip, s->name)
+ {
+ Solvable *si = pool->solvables + pi;
+ if (si->repo == installed && si->name == s->name && pi != p)
+ queue_push2(solv->update_targets, pi, p);
+ }
return;
}
identicalp = 0;
#cmakedefine LIBSOLVEXT_FEATURE_LZMA_COMPRESSION
#cmakedefine LIBSOLVEXT_FEATURE_BZIP2_COMPRESSION
#cmakedefine LIBSOLVEXT_FEATURE_ZSTD_COMPRESSION
+#cmakedefine LIBSOLVEXT_FEATURE_ZCHUNK_COMPRESSION
/* see tools/common_write.c for toolversion history */
#define LIBSOLV_TOOLVERSION "1.1"
Pool *pool = s->repo->pool;
Id con, *conp;
int hadpatchpackage = 0;
+ const char *status;
+ status = solvable_lookup_str(s, UPDATE_STATUS);
+ if (status && !strcmp(status, "retracted"))
+ return 1;
if (!s->conflicts)
return 0;
conp = s->repo->idarraydata + s->conflicts;