IF (${have_system} STREQUAL x)
MESSAGE (STATUS "Building for no system")
- ADD_DEFINITIONS (-DNOSYSTEM)
ENDIF (${have_system} STREQUAL x)
IF (${have_system} STRGREATER xx)
MESSAGE (FATAL_ERROR "Can only compile for one system type.")
SET(LIBSOLV_MAJOR "0")
SET(LIBSOLV_MINOR "6")
-SET(LIBSOLV_PATCH "6")
+SET(LIBSOLV_PATCH "7")
.\" Title: Libsolv-Pool
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
-.\" Date: 09/20/2013
+.\" Date: 10/09/2014
.\" Manual: LIBSOLV
.\" Source: libsolv
.\" Language: English
.\"
-.TH "LIBSOLV\-POOL" "3" "09/20/2013" "libsolv" "LIBSOLV"
+.TH "LIBSOLV\-POOL" "3" "10/09/2014" "libsolv" "LIBSOLV"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.RS 4
.\}
.nf
-\fBvoid pool_setdisttype(Pool *\fR\fIpool\fR\fB, int\fR \fIdisttype\fR\fB)\fR;
+\fBint pool_setdisttype(Pool *\fR\fIpool\fR\fB, int\fR \fIdisttype\fR\fB)\fR;
.fi
.if n \{\
.RE
.\}
.sp
-Set the package type of your system\&. The disttype is used for example to define package comparison semantics\&. Libsolv\(cqs default disttype should match the package manager of your system, so you only need to use this function if you want to use the library to solve packaging problems for different systems\&.
+Set the package type of your system\&. The disttype is used for example to define package comparison semantics\&. Libsolv\(cqs default disttype should match the package manager of your system, so you only need to use this function if you want to use the library to solve packaging problems for different systems\&. The Function returns the old disttype on success, and \-1 if the new disttype is not supported\&.
.sp
.if n \{\
.RS 4
You can turn off the architecture 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\&. While rpm does not support boolean expressions in dependencies and debian only allows an "OR" expression, libsolv allows one to arbitrary complex expressions\&. The following basic types are supported:
+Boolean Dependencies allow to build complex expressions from simple dependencies\&. While rpm does not support boolean expressions in dependencies and debian only allows an "OR" expression, libsolv allows arbitrary complex expressions\&. The following basic types are supported:
.PP
\fBREL_OR\fR
.RS 4
=== Functions ===
- void pool_setdisttype(Pool *pool, int disttype);
+ int pool_setdisttype(Pool *pool, int disttype);
Set the package type of your system. The disttype is used for example
to define package comparison semantics. Libsolv's default disttype
should match the package manager of your system, so you only need to
use this function if you want to use the library to solve packaging
-problems for different systems.
+problems for different systems. The Function returns the old
+disttype on success, and -1 if the new disttype is not supported.
int pool_set_flag(Pool *pool, int flag, int value);
Boolean Dependencies allow to build complex expressions from simple
dependencies. While rpm does not support boolean expressions in
dependencies and debian only allows an "OR" expression, libsolv
-allows to arbitrary complex expressions. The following basic types
+allows arbitrary complex expressions. The following basic types
are supported:
*REL_OR*::
+IF (SUSE OR FEDORA OR DEBIAN)
+
ADD_EXECUTABLE (solv solv.c)
TARGET_LINK_LIBRARIES (solv libsolvext libsolv ${SYSTEM_LIBRARIES})
INSTALL(TARGETS
solv
DESTINATION ${BIN_INSTALL_DIR})
+
+ENDIF (SUSE OR FEDORA OR DEBIAN)
#define TYPE_PLAINDIR 3
#define TYPE_DEBIAN 4
-#ifndef NOSYSTEM
static int
read_repoinfos_sort(const void *ap, const void *bp)
{
const struct repoinfo *b = bp;
return strcmp(a->alias, b->alias);
}
-#endif
#if defined(SUSE) || defined(FEDORA)
#endif
-#ifdef NOSYSTEM
-struct repoinfo *
-read_repoinfos(Pool *pool, int *nrepoinfosp)
-{
- *nrepoinfosp = 0;
- return 0;
-}
-#endif
-
void
free_repoinfos(struct repoinfo *repoinfos, int nrepoinfos)
#endif
repo = repo_create(pool, "@System");
+ memset(&stb, 0, sizeof(stb));
#if defined(ENABLE_RPMDB) && (defined(SUSE) || defined(FEDORA))
printf("rpm database:");
if (stat(pool_prepend_rootdir_tmp(pool, "/var/lib/rpm/Packages"), &stb))
if (stat(pool_prepend_rootdir_tmp(pool, "/var/lib/dpkg/status"), &stb))
memset(&stb, 0, sizeof(stb));
#endif
-#ifdef NOSYSTEM
- printf("no installed database:");
- memset(&stb, 0, sizeof(stb));
-#endif
calc_checksum_stat(&stb, REPOKEY_TYPE_SHA256, 0, installedcookie);
if (usecachedrepo(repo, 0, installedcookie, 0))
printf(" cached\n");
repodata_set_str(data, s2 - pool->solvables, PRODUCT_SHORTLABEL, newname);
else if (!strcmp(pn, "product-register-target()") && evr)
repodata_set_str(data, s2 - pool->solvables, PRODUCT_REGISTER_TARGET, newname);
+ else if (!strcmp(pn, "product-register-flavor()") && evr)
+ repodata_set_str(data, s2 - pool->solvables, PRODUCT_REGISTER_FLAVOR, newname);
else if (!strcmp(pn, "product-type()") && evr)
repodata_set_str(data, s2 - pool->solvables, PRODUCT_TYPE, newname);
else if (!strcmp(pn, "product-cpeid()") && evr)
STATE_REGISTER,
STATE_TARGET,
STATE_REGRELEASE,
+ STATE_REGFLAVOR,
STATE_PRODUCTLINE,
STATE_REGUPDATES,
STATE_REGUPDREPO,
{ STATE_LINGUAS, "lang", STATE_LANG, 0 },
{ STATE_REGISTER, "target", STATE_TARGET, 1 },
{ STATE_REGISTER, "release", STATE_REGRELEASE, 1 },
+ { STATE_REGISTER, "flavor", STATE_REGFLAVOR, 1 },
{ STATE_REGISTER, "updates", STATE_REGUPDATES, 0 },
{ STATE_REGUPDATES, "repository", STATE_REGUPDREPO, 0 },
{ NUMSTATES }
case STATE_REGRELEASE:
repodata_set_str(pd->data, pd->handle, PRODUCT_REGISTER_RELEASE, pd->content);
break;
+ case STATE_REGFLAVOR:
+ repodata_set_str(pd->data, pd->handle, PRODUCT_REGISTER_FLAVOR, pd->content);
+ break;
case STATE_CPEID:
if (*pd->content)
repodata_set_str(pd->data, pd->handle, SOLVABLE_CPEID, pd->content);
-------------------------------------------------------------------
+Fri Dec 19 08:59:27 CET 2014 - ma@suse.de
+
+- add product:regflavor attribute [bnc#896224]
+- bump version to 0.6.7
+
+-------------------------------------------------------------------
Tue Oct 7 14:39:23 CEST 2014 - mls@suse.de
- fix bug in reorder_dq_for_jobrules leading to crashes
KNOWNID(SIGNATURE_EXPIRES, "signature:expires"),
KNOWNID(SIGNATURE_DATA, "signature:data"),
+KNOWNID(PRODUCT_REGISTER_FLAVOR, "product:regflavor"), /* installed and available product */
+
KNOWNID(ID_NUM_INTERNAL, 0)
#ifdef KNOWNID_INITIALIZE
pool_free_solvable_block(pool, 2, pool->nsolvables - 2, reuseids);
}
-#ifdef MULTI_SEMANTICS
-void
+int
pool_setdisttype(Pool *pool, int disttype)
{
+#ifdef MULTI_SEMANTICS
+ int olddisttype = pool->disttype;
+ switch(disttype)
+ {
+ case DISTTYPE_RPM:
+ pool->noarchid = ARCH_NOARCH;
+ break;
+ case DISTTYPE_DEB:
+ pool->noarchid = ARCH_ALL;
+ break;
+ case DISTTYPE_ARCH:
+ case DISTTYPE_HAIKU:
+ pool->noarchid = ARCH_ANY;
+ break;
+ default:
+ return -1;
+ }
pool->disttype = disttype;
- if (disttype == DISTTYPE_RPM)
- pool->noarchid = ARCH_NOARCH;
- if (disttype == DISTTYPE_DEB)
- pool->noarchid = ARCH_ALL;
- if (disttype == DISTTYPE_ARCH)
- pool->noarchid = ARCH_ANY;
- if (disttype == DISTTYPE_HAIKU)
- pool->noarchid = ARCH_ANY;
pool->solvables[SYSTEMSOLVABLE].arch = pool->noarchid;
-}
+ return olddisttype;
+#else
+ return pool->disttype == disttype ? disttype : -1;
#endif
+}
int
pool_get_flag(Pool *pool, int flag)
extern void pool_freeallrepos(Pool *pool, int reuseids);
extern void pool_setdebuglevel(Pool *pool, int level);
-#ifdef MULTI_SEMANTICS
-extern void pool_setdisttype(Pool *pool, int disttype);
-#endif
+extern int pool_setdisttype(Pool *pool, int disttype);
extern int pool_set_flag(Pool *pool, int flag, int value);
extern int pool_get_flag(Pool *pool, int flag);
{
Pool *pool = solv->pool;
Queue redoq;
- Queue problem, solution, problems_save;
+ Queue problem, solution, problems_save, branches_save;
int i, j, nsol;
int essentialok;
unsigned int now;
problems_save = solv->problems;
memset(&solv->problems, 0, sizeof(solv->problems));
+ /* save branches queue */
+ branches_save = solv->problems;
+ memset(&solv->branches, 0, sizeof(solv->branches));
+
/* extract problem from queue */
queue_init(&problem);
for (i = solidx + 1; i < solv->solutions.count; i++)
queue_free(&solv->problems);
solv->problems = problems_save;
+ /* restore branches */
+ queue_free(&solv->branches);
+ solv->branches = branches_save;
+
if (solv->cleandeps_mistakes)
{
if (oldmistakes)