Hello community,

here is the log from the commit of package createrepo_c for openSUSE:Factory 
checked in at 2016-11-01 09:59:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/createrepo_c (Old)
 and      /work/SRC/openSUSE:Factory/.createrepo_c.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "createrepo_c"

Changes:
--------
--- /work/SRC/openSUSE:Factory/createrepo_c/createrepo_c.changes        
2016-09-16 11:01:28.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.createrepo_c.new/createrepo_c.changes   
2016-11-01 09:59:12.000000000 +0100
@@ -1,0 +2,6 @@
+Mon Oct 31 13:19:23 UTC 2016 - [email protected]
+
+- updated upstream sources
+- Added patch 
000-Ensure_that_provides-requires_versions_are_factored_into_dep_filtering.diff
+
+-------------------------------------------------------------------

Old:
----
  createrepo_c-0.10.0.git20160503.7c6fae0.tar.gz

New:
----
  
000-Ensure_that_provides-requires_versions_are_factored_into_dep_filtering.diff
  createrepo_c-0.10.0.git20160929.547b5db.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ createrepo_c.spec ++++++
--- /var/tmp/diff_new_pack.4Z2FyE/_old  2016-11-01 09:59:13.000000000 +0100
+++ /var/tmp/diff_new_pack.4Z2FyE/_new  2016-11-01 09:59:13.000000000 +0100
@@ -20,17 +20,17 @@
 %define libname lib%{name}%{major}
 %define devname lib%{name}-devel
 
-%define version_unconverted 0.10.0.git20160503.7c6fae0
+%define version_unconverted 0.10.0.git20160929.547b5db
 
 Name:           createrepo_c
 Summary:        Creates a common metadata repository
 License:        GPL-2.0
 Group:          System/Packages
-Version:        0.10.0.git20160503.7c6fae0
+Version:        0.10.0.git20160929.547b5db
 Release:        0
 Url:            https://github.com/rpm-software-management/createrepo_c
 Source0:        %{name}-%{version}.tar.gz
-
+Patch0:         
000-Ensure_that_provides-requires_versions_are_factored_into_dep_filtering.diff
 BuildRequires:  bash-completion
 
 %if 0%{?suse_version} >= 1330 
@@ -38,8 +38,8 @@
 %endif
 
 BuildRequires:  cmake
-BuildRequires:  fdupes
 BuildRequires:  doxygen
+BuildRequires:  fdupes
 BuildRequires:  file-devel
 BuildRequires:  glib2-devel >= 2.22.0
 BuildRequires:  libbz2-devel
@@ -87,6 +87,7 @@
 
 %prep
 %setup -q
+%patch0 -p1
 
 %if %{with python3}
 rm -rf py3

++++++ 
000-Ensure_that_provides-requires_versions_are_factored_into_dep_filtering.diff 
++++++
diff --git a/src/parsehdr.c b/src/parsehdr.c
index ceaf884..61f5a89 100644
--- a/src/parsehdr.c
+++ b/src/parsehdr.c
@@ -319,7 +319,10 @@ cr_package_from_header(Header hdr,
     };
 
     // Hastable with filenames from provided
-    GHashTable *provided_hashtable = g_hash_table_new(g_str_hash, g_str_equal);
+    GHashTable *provided_hashtable = g_hash_table_new_full(g_str_hash,
+                                                           g_str_equal,
+                                                           NULL,
+                                                           g_free);
 
     // Hashtable with already processed files from requires
     GHashTable *ap_hashtable = g_hash_table_new_full(g_str_hash,
@@ -358,15 +361,19 @@ cr_package_from_header(Header hdr,
                     }
 
                     // Skip package primary files
-                    if (g_hash_table_lookup_extended(filenames_hashtable, 
filename, NULL, NULL)) {
+                    if (*filename == '/' && 
g_hash_table_lookup_extended(filenames_hashtable, filename, NULL, NULL)) {
                         if (cr_is_primary(filename)) {
                             continue;
                         }
                     }
 
                     // Skip files which are provided
-                    if (g_hash_table_lookup_extended(provided_hashtable, 
filename, NULL, NULL)) {
-                        continue;
+                    gpointer pvalue;
+                    if (g_hash_table_lookup_extended(provided_hashtable, 
filename, NULL, &pvalue)) {
+                        struct ap_value_struct *ap_value = pvalue;
+                        if (!ap_value->flags || !ap_value->flags[0] || !flags 
|| !flags[0] ||
+                            (!g_strcmp0(ap_value->flags, flags) && 
!g_strcmp0(ap_value->version, full_version)))
+                           continue;
                     }
 
                     // Calculate pre value
@@ -413,8 +420,12 @@ cr_package_from_header(Header hdr,
 
                 switch (deptype) {
                     case DEP_PROVIDES:
-                        g_hash_table_replace(provided_hashtable, 
dependency->name, dependency->name);
                         pkg->provides = g_slist_prepend(pkg->provides, 
dependency);
+                        struct ap_value_struct *pvalue = 
g_malloc(sizeof(struct ap_value_struct));
+                        pvalue->flags = flags;
+                        pvalue->version = full_version;
+                        pvalue->pre = dependency->pre;
+                        g_hash_table_replace(provided_hashtable, 
dependency->name, pvalue);
                         break;
                     case DEP_CONFLICTS:
                         pkg->conflicts = g_slist_prepend(pkg->conflicts, 
dependency);
++++++ createrepo_c-0.10.0.git20160503.7c6fae0.tar.gz -> 
createrepo_c-0.10.0.git20160929.547b5db.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/createrepo_c-0.10.0.git20160503.7c6fae0/src/compression_wrapper.c 
new/createrepo_c-0.10.0.git20160929.547b5db/src/compression_wrapper.c
--- old/createrepo_c-0.10.0.git20160503.7c6fae0/src/compression_wrapper.c       
2016-05-03 17:12:18.000000000 +0200
+++ new/createrepo_c-0.10.0.git20160929.547b5db/src/compression_wrapper.c       
2016-09-29 08:49:45.000000000 +0200
@@ -347,6 +347,7 @@
     file = g_malloc0(sizeof(CR_FILE));
     file->mode = mode;
     file->type = type;
+    file->INNERFILE = NULL;
 
     switch (type) {
 
@@ -380,6 +381,7 @@
 
         case (CR_CW_BZ2_COMPRESSION): { // ------------------------------------
             FILE *f = fopen(filename, mode_str);
+            file->INNERFILE = f;
             int bzerror;
 
             if (!f) {
@@ -405,6 +407,8 @@
             if (bzerror != BZ_OK) {
                 const char *err_msg;
 
+                fclose(f);
+
                 switch (bzerror) {
                     case BZ_CONFIG_ERROR:
                         err_msg = "library has been mis-compiled";
@@ -642,6 +646,8 @@
                 BZ2_bzWriteClose(&rc, (BZFILE *) cr_file->FILE,
                                  BZ2_SKIP_FFLUSH, NULL, NULL);
 
+            fclose(cr_file->INNERFILE);
+
             if (rc == BZ_OK) {
                 ret = CRE_OK;
             } else {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/createrepo_c-0.10.0.git20160503.7c6fae0/src/compression_wrapper.h 
new/createrepo_c-0.10.0.git20160929.547b5db/src/compression_wrapper.h
--- old/createrepo_c-0.10.0.git20160503.7c6fae0/src/compression_wrapper.h       
2016-05-03 17:12:18.000000000 +0200
+++ new/createrepo_c-0.10.0.git20160929.547b5db/src/compression_wrapper.h       
2016-09-29 08:49:45.000000000 +0200
@@ -79,6 +79,7 @@
 typedef struct {
     cr_CompressionType  type;           /*!< Type of compression */
     void                *FILE;          /*!< Pointer to gzFile, BZFILE, ... */
+    void                *INNERFILE;     /*!< Pointer to underlying FILE */
     cr_OpenMode         mode;           /*!< Mode */
     cr_ContentStat      *stat;          /*!< Content stats */
     cr_ChecksumCtx      *checksum_ctx;  /*!< Checksum contenxt */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/createrepo_c-0.10.0.git20160503.7c6fae0/src/createrepo_shared.c 
new/createrepo_c-0.10.0.git20160929.547b5db/src/createrepo_shared.c
--- old/createrepo_c-0.10.0.git20160503.7c6fae0/src/createrepo_shared.c 
2016-05-03 17:12:18.000000000 +0200
+++ new/createrepo_c-0.10.0.git20160929.547b5db/src/createrepo_shared.c 
2016-09-29 08:49:45.000000000 +0200
@@ -188,7 +188,6 @@
     assert(!err || *err == NULL);
 
     _cleanup_free_ gchar *lock_dir = NULL;
-    _cleanup_free_ gchar *tmp_repodata_dir = NULL;
     _cleanup_error_free_ GError *tmp_err = NULL;
 
     lock_dir = g_build_filename(repo_dir, ".repodata/", NULL);
@@ -242,10 +241,11 @@
         }
 
         // To data generation use a different one
+        _cleanup_free_ gchar *tmp_repodata_dir = NULL;
         _cleanup_free_ gchar *tmp = NULL;
-        tmp_repodata_dir = g_build_filename(repo_dir, ".repodata.", NULL);
-        tmp = cr_append_pid_and_datetime(tmp_repodata_dir, "/");
-        tmp_repodata_dir = tmp;
+
+        tmp = g_build_filename(repo_dir, ".repodata.", NULL);
+        tmp_repodata_dir = cr_append_pid_and_datetime(tmp, "/");
 
         if (g_mkdir(tmp_repodata_dir, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH)) {
             g_critical("(--ignore-lock enabled) Cannot create %s: %s",
@@ -258,12 +258,11 @@
             g_debug("(--ignore-lock enabled) For data generation is used: %s",
                     tmp_repodata_dir);
         }
-    }
 
-    if (tmp_repodata_dir)
         *tmp_repodata_dir_p = g_strdup(tmp_repodata_dir);
-    else
+    } else {
         *tmp_repodata_dir_p = g_strdup(lock_dir);
+    }
 
     return TRUE;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/createrepo_c-0.10.0.git20160503.7c6fae0/src/mergerepo_c.c 
new/createrepo_c-0.10.0.git20160929.547b5db/src/mergerepo_c.c
--- old/createrepo_c-0.10.0.git20160503.7c6fae0/src/mergerepo_c.c       
2016-05-03 17:12:18.000000000 +0200
+++ new/createrepo_c-0.10.0.git20160929.547b5db/src/mergerepo_c.c       
2016-09-29 08:49:45.000000000 +0200
@@ -402,7 +402,7 @@
     GOptionContext *context;
 
     context = g_option_context_new("--repo=url --repo=url");
-    g_option_context_set_summary(context, "Take 2 or more repositories and "
+    g_option_context_set_summary(context, "Take one or more repositories and "
                                  "merge their metadata into a new repo");
     g_option_context_add_main_entries(context, cmd_entries, NULL);
 
@@ -1623,7 +1623,7 @@
         exit(0);
     }
 
-    if (g_slist_length(cmd_options->repo_list) < 2) {
+    if (g_slist_length(cmd_options->repo_list) < 1) {
         free_options(cmd_options);
         g_printerr("Usage: %s [OPTION...] --repo=url --repo=url\n\n"
                    "%s: take 2 or more repositories and merge their "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/createrepo_c-0.10.0.git20160503.7c6fae0/utils/cleanup.sh 
new/createrepo_c-0.10.0.git20160929.547b5db/utils/cleanup.sh
--- old/createrepo_c-0.10.0.git20160503.7c6fae0/utils/cleanup.sh        
2016-05-03 17:12:18.000000000 +0200
+++ new/createrepo_c-0.10.0.git20160929.547b5db/utils/cleanup.sh        
2016-09-29 08:49:45.000000000 +0200
@@ -1,5 +1,5 @@
 #!/bin/bash
 
 rm -fv createrepo_c-*.tar.xz
-rm -fv createrepo_c-*.rpm python-createrepo_c-*.rpm
+rm -fv createrepo_c-*.rpm python-createrepo_c-*.rpm python3-createrepo_c-*.rpm
 rm -fv deltarepo-*.rpm python-deltarepo-*.rpm


Reply via email to