summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2018-11-30 12:40:43 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2018-11-30 12:40:43 +0900
commite1659dc4ce74d3c47f465103951dafff8fc0cf9f (patch)
treee135d41257133e53a1a09571fbdf3cb284b49bba /ext
parent97330b5a608c2213fdf3f49bfbaa268bf9627920 (diff)
downloadlibsolv-e1659dc4ce74d3c47f465103951dafff8fc0cf9f.tar.gz
libsolv-e1659dc4ce74d3c47f465103951dafff8fc0cf9f.tar.bz2
libsolv-e1659dc4ce74d3c47f465103951dafff8fc0cf9f.zip
Imported Upstream version 0.6.28upstream/0.6.28
Change-Id: I7eea26ff3eb092805c915018606cc185fa47e21f Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'ext')
-rw-r--r--ext/CMakeLists.txt2
-rw-r--r--ext/repo_rpmdb.c4
-rw-r--r--ext/testcase.c19
-rw-r--r--ext/testcase.h3
4 files changed, 21 insertions, 7 deletions
diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt
index bdc6ee9..b8917a2 100644
--- a/ext/CMakeLists.txt
+++ b/ext/CMakeLists.txt
@@ -143,7 +143,7 @@ SET_TARGET_PROPERTIES(libsolvext PROPERTIES SOVERSION ${LIBSOLVEXT_SOVERSION})
SET_TARGET_PROPERTIES(libsolvext PROPERTIES INSTALL_NAME_DIR ${LIB_INSTALL_DIR})
INSTALL (FILES ${libsolvext_HEADERS} DESTINATION "${INCLUDE_INSTALL_DIR}/solv")
-INSTALL (TARGETS libsolvext LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
+INSTALL (TARGETS libsolvext LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR} RUNTIME DESTINATION bin)
IF (ENABLE_STATIC AND NOT DISABLE_SHARED)
ADD_LIBRARY (libsolvext_static STATIC ${libsolvext_SRCS})
diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c
index 40a1e3e..b98720a 100644
--- a/ext/repo_rpmdb.c
+++ b/ext/repo_rpmdb.c
@@ -262,7 +262,7 @@ headint64array(RpmHead *h, int tag, int *cnt)
for (o = 0; o < i; o++, d += 8)
{
unsigned int x = d[0] << 24 | d[1] << 16 | d[2] << 8 | d[3];
- r[o] = (unsigned long long)x << 32 | (d[4] << 24 | d[5] << 16 | d[6] << 8 | d[7]);
+ r[o] = (unsigned long long)x << 32 | (unsigned int)(d[4] << 24 | d[5] << 16 | d[6] << 8 | d[7]);
}
return r;
}
@@ -281,7 +281,7 @@ headint64(RpmHead *h, int tag)
return 0;
d = h->dp + o;
i = d[0] << 24 | d[1] << 16 | d[2] << 8 | d[3];
- return (unsigned long long)i << 32 | (d[4] << 24 | d[5] << 16 | d[6] << 8 | d[7]);
+ return (unsigned long long)i << 32 | (unsigned int)(d[4] << 24 | d[5] << 16 | d[6] << 8 | d[7]);
}
static unsigned int *
diff --git a/ext/testcase.c b/ext/testcase.c
index f515057..26acefa 100644
--- a/ext/testcase.c
+++ b/ext/testcase.c
@@ -23,6 +23,9 @@
#include "testcase.h"
#include "selection.h"
#include "solv_xfopen.h"
+#if ENABLE_TESTCASE_HELIXREPO
+#include "ext/repo_helix.h"
+#endif
#define DISABLE_JOIN2
#include "tools_util.h"
@@ -175,6 +178,9 @@ static const char *features[] = {
#ifdef ENABLE_COMPLEX_DEPS
"complex_deps",
#endif
+#if ENABLE_TESTCASE_HELIXREPO
+ "testcase_helixrepo",
+#endif
0
};
@@ -2266,7 +2272,7 @@ testcase_write_mangled(Solver *solv, const char *dir, int resultflags, const cha
strqueue_push(&sq, cmd);
}
- if (resultflags)
+ if ((resultflags & ~TESTCASE_RESULT_REUSE_SOLVER) != 0)
{
char *result;
cmd = 0;
@@ -2513,6 +2519,10 @@ testcase_read(Pool *pool, FILE *fp, const char *testcase, Queue *job, char **res
int ngenid = 0;
Queue autoinstq;
+ if (resultp)
+ *resultp = 0;
+ if (resultflagsp)
+ *resultflagsp = 0;
if (!fp && !(fp = fopen(testcase, "r")))
{
pool_debug(pool, SOLV_ERROR, "testcase_read: could not open '%s'\n", testcase);
@@ -2617,10 +2627,9 @@ testcase_read(Pool *pool, FILE *fp, const char *testcase, Queue *job, char **res
repo_add_solv(repo, rfp, 0);
fclose(rfp);
}
-#if 0
+#if ENABLE_TESTCASE_HELIXREPO
else if (!strcmp(repotype, "helix"))
{
- extern int repo_add_helix(Repo *repo, FILE *fp, int flags);
repo_add_helix(repo, rfp, 0);
fclose(rfp);
}
@@ -2794,8 +2803,10 @@ testcase_read(Pool *pool, FILE *fp, const char *testcase, Queue *job, char **res
if (resultflagsp)
*resultflagsp = resultflags;
}
- else if (!strcmp(pieces[0], "nextjob") && npieces == 1)
+ else if (!strcmp(pieces[0], "nextjob"))
{
+ if (npieces == 2 && resultflagsp && !strcmp(pieces[1], "reusesolver"))
+ *resultflagsp |= TESTCASE_RESULT_REUSE_SOLVER;
break;
}
else if (!strcmp(pieces[0], "disable") && npieces == 3)
diff --git a/ext/testcase.h b/ext/testcase.h
index d3ad505..341b9c2 100644
--- a/ext/testcase.h
+++ b/ext/testcase.h
@@ -19,6 +19,9 @@
#define TESTCASE_RESULT_GENID (1 << 7)
#define TESTCASE_RESULT_REASON (1 << 8)
+/* reuse solver hack, testsolv use only */
+#define TESTCASE_RESULT_REUSE_SOLVER (1 << 31)
+
extern Id testcase_str2dep(Pool *pool, const char *s);
extern const char *testcase_dep2str(Pool *pool, Id id);
extern const char *testcase_repoid2str(Pool *pool, Id repoid);