Imported Upstream version 0.7.18 upstream/0.7.18
authorDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 23 Dec 2021 05:47:06 +0000 (14:47 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 23 Dec 2021 05:47:06 +0000 (14:47 +0900)
.travis.yml
NEWS
VERSION.cmake
ext/repo_conda.c
ext/repo_conda.h
package/libsolv.changes
src/rules.c
win32/regex.h
win32/regexec.c
win32/tre-mem.c
win32/tre.h

index a115095..4e8fd75 100644 (file)
@@ -7,6 +7,12 @@ matrix:
         apt:
           packages:
           - cmake
+    - os: linux
+      arch: ppc64le
+      addons:
+        apt:
+          packages:
+          - cmake
     - os: osx
       osx_image: xcode9.4
       compiler: clang
diff --git a/NEWS b/NEWS
index 7e91d66..a627131 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,13 @@
 This file contains the major changes between
 libsolv versions:
 
+Version 0.7.18
+- selected bug fixes:
+  * fixed regex code on win32
+  * fixed memory leak in choice rule generation
+- new features:
+  * repo_add_conda: add flag to skip v2 packages
+
 Version 0.7.17
 - selected bug fixes:
   * repo_write: fix handling of nested flexarray
index adf18d2..8a96a14 100644 (file)
@@ -49,5 +49,5 @@ SET(LIBSOLVEXT_SOVERSION "1")
 
 SET(LIBSOLV_MAJOR "0")
 SET(LIBSOLV_MINOR "7")
-SET(LIBSOLV_PATCH "17")
+SET(LIBSOLV_PATCH "18")
 
index 6e9a963..c35dc62 100644 (file)
@@ -258,7 +258,7 @@ parse_packages2(struct parsedata *pd, struct solv_jsonparser *jp)
 }
 
 static int
-parse_main(struct parsedata *pd, struct solv_jsonparser *jp)
+parse_main(struct parsedata *pd, struct solv_jsonparser *jp, int flags)
 {
   int type = JP_OBJECT;
   while (type > 0 && (type = jsonparser_parse(jp)) > 0 && type != JP_OBJECT_END)
@@ -267,9 +267,9 @@ parse_main(struct parsedata *pd, struct solv_jsonparser *jp)
        type = parse_packages(pd, jp);
       else if (type == JP_ARRAY && !strcmp("packages", jp->key))
        type = parse_packages2(pd, jp);
-      else if (type == JP_OBJECT && !strcmp("packages.conda", jp->key))
+      else if (type == JP_OBJECT && !strcmp("packages.conda", jp->key) && !(flags & CONDA_ADD_USE_ONLY_TAR_BZ2))
        type = parse_packages(pd, jp);
-      else if (type == JP_ARRAY && !strcmp("packages.conda", jp->key))
+      else if (type == JP_ARRAY && !strcmp("packages.conda", jp->key) && !(flags & CONDA_ADD_USE_ONLY_TAR_BZ2))
        type = parse_packages2(pd, jp);
       else
        type = jsonparser_skip(jp, type);
@@ -298,7 +298,7 @@ repo_add_conda(Repo *repo, FILE *fp, int flags)
   jsonparser_init(&jp, fp);
   if ((type = jsonparser_parse(&jp)) != JP_OBJECT)
     ret = pool_error(pool, -1, "repository does not start with an object");
-  else if ((type = parse_main(&pd, &jp)) != JP_OBJECT_END)
+  else if ((type = parse_main(&pd, &jp, flags)) != JP_OBJECT_END)
     ret = pool_error(pool, -1, "parse error line %d", jp.line);
   jsonparser_free(&jp);
 
index 7e90a3d..fa626f1 100644 (file)
@@ -5,4 +5,6 @@
  * for further information
  */
 
+#define CONDA_ADD_USE_ONLY_TAR_BZ2  (1 << 8)
+
 extern int repo_add_conda(Repo *repo, FILE *fp, int flags);
index d477d71..32ec121 100644 (file)
@@ -1,4 +1,12 @@
 -------------------------------------------------------------------
+Fri Mar 26 14:17:46 CET 2021 - mls@suse.de
+
+- fixed regex code on win32
+- fixed memory leak in choice rule generation
+- repo_add_conda: add flag to skip v2 packages
+- bump version to 0.7.18
+
+-------------------------------------------------------------------
 Tue Jan 19 15:09:12 CET 2021 - mls@suse.de
 
 - repo_write: fix handling of nested flexarray
index b3609bb..b1b5f09 100644 (file)
@@ -3339,7 +3339,6 @@ solver_addchoicerules(Solver *solv)
       return;
     }
   now = solv_timems(0);
-  solv->choicerules_info = solv_calloc(solv->pkgrules_end, sizeof(Id));
   queue_init(&q);
   queue_init(&qi);
   queue_init(&qcheck);
index 7996b58..06a1090 100644 (file)
@@ -12,7 +12,8 @@ extern "C" {
 #define CHARCLASS_NAME_MAX 14
 #define RE_DUP_MAX 255
 
-typedef size_t regoff_t;
+#include <BaseTsd.h>
+typedef SSIZE_T regoff_t;
 // #include <bits/alltypes.h>
 
 typedef struct re_pattern_buffer {
index f22586e..61e40a5 100644 (file)
@@ -231,7 +231,7 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string,
     pbytes = sizeof(*reach_pos) * tnfa->num_states;
     xbytes = sizeof(regoff_t) * num_tags;
     total_bytes =
-      (sizeof(long) - 1) * 4 /* for alignment paddings */
+      (sizeof(size_t) - 1) * 4 /* for alignment paddings */
       + (rbytes + xbytes * tnfa->num_states) * 2 + tbytes + pbytes;
 
     /* Allocate the memory. */
@@ -242,16 +242,16 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string,
     /* Get the various pointers within tmp_buf (properly aligned). */
     tmp_tags = (void *)buf;
     tmp_buf = buf + tbytes;
-    tmp_buf += ALIGN(tmp_buf, long);
+    tmp_buf += ALIGN(tmp_buf, size_t);
     reach_next = (void *)tmp_buf;
     tmp_buf += rbytes;
-    tmp_buf += ALIGN(tmp_buf, long);
+    tmp_buf += ALIGN(tmp_buf, size_t);
     reach = (void *)tmp_buf;
     tmp_buf += rbytes;
-    tmp_buf += ALIGN(tmp_buf, long);
+    tmp_buf += ALIGN(tmp_buf, size_t);
     reach_pos = (void *)tmp_buf;
     tmp_buf += pbytes;
-    tmp_buf += ALIGN(tmp_buf, long);
+    tmp_buf += ALIGN(tmp_buf, size_t);
     for (i = 0; i < tnfa->num_states; i++)
       {
   reach[i].tags = (void *)tmp_buf;
index 0fbf7b2..327515b 100644 (file)
@@ -143,7 +143,7 @@ tre_mem_alloc_impl(tre_mem_t mem, int provided, void *provided_block,
     }
 
   /* Make sure the next pointer will be aligned. */
-  size += ALIGN(mem->ptr + size, long);
+  size += ALIGN(mem->ptr + size, size_t);
 
   /* Allocate from current block. */
   ptr = mem->ptr;
index c07c959..390df94 100644 (file)
@@ -32,6 +32,7 @@
 #include <regex.h>
 #include <wchar.h>
 #include <wctype.h>
+#include <stdint.h>
 
 #undef  TRE_MBSTATE
 
@@ -77,8 +78,8 @@ typedef wctype_t tre_ctype_t;
 /* Returns number of bytes to add to (char *)ptr to make it
    properly aligned for the type. */
 #define ALIGN(ptr, type) \
-  ((((long)ptr) % sizeof(type)) \
-   ? (sizeof(type) - (((long)ptr) % sizeof(type))) \
+  ((((uintptr_t)ptr) % sizeof(type)) \
+   ? (sizeof(type) - (((uintptr_t)ptr) % sizeof(type))) \
    : 0)
 
 #undef MAX