Hello community,

here is the log from the commit of package createrepo_c for openSUSE:Factory 
checked in at 2020-01-21 20:57:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/createrepo_c (Old)
 and      /work/SRC/openSUSE:Factory/.createrepo_c.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "createrepo_c"

Tue Jan 21 20:57:11 2020 rev:9 rq:765581 version:0.15.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/createrepo_c/createrepo_c.changes        
2019-12-11 12:03:49.840773024 +0100
+++ /work/SRC/openSUSE:Factory/.createrepo_c.new.26092/createrepo_c.changes     
2020-01-21 20:57:13.676761206 +0100
@@ -1,0 +2,12 @@
+Sun Jan 19 14:36:38 UTC 2020 - Neal Gompa <[email protected]>
+
+- Update to 0.15.6
+  + Set global_exit_status on sigint so that .repodata are cleaned up
+  + Fix various issues discovered by covscans (rh#1789707)
+  + Enhance error handling when locating repositories (rh#1762697)
+  + Switch updateinfo to explicitly include bool values (rh#1772466)
+  + add --recycle-pkglist option
+  + use pkg href for cache lookup with --update
+  + Sync --excludes matching for dir-walk vs. --pkglist
+
+-------------------------------------------------------------------

Old:
----
  createrepo_c-0.15.4.tar.gz

New:
----
  createrepo_c-0.15.6.tar.gz

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

Other differences:
------------------
++++++ createrepo_c.spec ++++++
--- /var/tmp/diff_new_pack.BMsC3Q/_old  2020-01-21 20:57:14.972761810 +0100
+++ /var/tmp/diff_new_pack.BMsC3Q/_new  2020-01-21 20:57:14.972761810 +0100
@@ -2,7 +2,7 @@
 # spec file for package createrepo_c
 #
 # Copyright (c) 2019 SUSE LLC
-# Copyright (c) 2019 Neal Gompa <[email protected]>.
+# Copyright (c) 2020 Neal Gompa <[email protected]>.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -54,7 +54,7 @@
 %define devname lib%{name}-devel
 
 Name:           createrepo_c
-Version:        0.15.4
+Version:        0.15.6
 Release:        0
 Summary:        RPM repository metadata generation utility
 License:        GPL-2.0-or-later

++++++ createrepo_c-0.15.4.tar.gz -> createrepo_c-0.15.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/createrepo_c-0.15.4/VERSION.cmake 
new/createrepo_c-0.15.6/VERSION.cmake
--- old/createrepo_c-0.15.4/VERSION.cmake       2019-12-06 12:46:02.000000000 
+0100
+++ new/createrepo_c-0.15.6/VERSION.cmake       2020-01-17 23:23:36.000000000 
+0100
@@ -1,3 +1,3 @@
 SET(CR_MAJOR "0")
 SET(CR_MINOR "15")
-SET(CR_PATCH "4")
+SET(CR_PATCH "6")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/createrepo_c-0.15.4/createrepo_c.bash 
new/createrepo_c-0.15.6/createrepo_c.bash
--- old/createrepo_c-0.15.4/createrepo_c.bash   2019-12-06 12:46:02.000000000 
+0100
+++ new/createrepo_c-0.15.6/createrepo_c.bash   2020-01-17 23:23:36.000000000 
+0100
@@ -70,7 +70,7 @@
             --retain-old-md-by-age --cachedir --local-sqlite
             --cut-dirs --location-prefix
             --deltas --oldpackagedirs
-            --num-deltas --max-delta-rpm-size' -- "$2" ) )
+            --num-deltas --max-delta-rpm-size --recycle-pkglist' -- "$2" ) )
     else
         COMPREPLY=( $( compgen -d -- "$2" ) )
     fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/createrepo_c-0.15.4/createrepo_c.spec 
new/createrepo_c-0.15.6/createrepo_c.spec
--- old/createrepo_c-0.15.4/createrepo_c.spec   2019-12-06 12:46:02.000000000 
+0100
+++ new/createrepo_c-0.15.6/createrepo_c.spec   2020-01-17 23:23:36.000000000 
+0100
@@ -35,7 +35,7 @@
 
 Summary:        Creates a common metadata repository
 Name:           createrepo_c
-Version:        0.15.4
+Version:        0.15.6
 Release:        1%{?dist}
 License:        GPLv2+
 URL:            https://github.com/rpm-software-management/createrepo_c
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/createrepo_c-0.15.4/doc/createrepo_c.8 
new/createrepo_c-0.15.6/doc/createrepo_c.8
--- old/createrepo_c-0.15.4/doc/createrepo_c.8  2019-12-06 12:46:02.000000000 
+0100
+++ new/createrepo_c-0.15.6/doc/createrepo_c.8  2020-01-17 23:23:36.000000000 
+0100
@@ -47,7 +47,10 @@
 Run verbosely.
 .SS \-x \-\-excludes PACKAGE_NAME_GLOB
 .sp
-File globs to exclude, can be specified multiple times.
+Path patterns to exclude, can be specified multiple times.  The patterns are
+matched against relative paths to RPMs.  Note that the feature uses
+\fBg\_pattern\_match()\fR function, not \fBglob()\fR, for semantic differences
+see 
https://developer.gnome.org/glib/stable/glib-Glob-style-pattern-matching.html
 .SS \-\-basedir BASEDIR
 .sp
 Basedir for path to directories.
@@ -74,7 +77,7 @@
 If metadata already exists in the outputdir and an rpm is unchanged (based on 
file size and mtime) since the metadata was generated, reuse the existing 
metadata rather than recalculating it. In the case of a large repository with 
only a few new or modified rpms this can significantly reduce I/O and 
processing time.
 .SS \-\-update\-md\-path
 .sp
-Use the existing repodata for \-\-update from this path.
+Existing metadata from this path are loaded and reused in addition to those 
present in the outputdir (works only with \-\-update). Can be specified 
multiple times.
 .SS \-\-skip\-stat
 .sp
 Skip the stat() call on a \-\-update, assumes if the filename is the same then 
the file is still the same (only use this if you\(aqre fairly trusting or 
gullible).
@@ -87,6 +90,14 @@
 .SS \-n \-\-includepkg PACKAGE
 .sp
 Specify pkgs to include on the command line. Takes urls as well as local paths.
+.SS \-\-recycle\-pkglist
+.sp
+Useful only with \fB\-\-update\fR.  Read the list of packages from old 
metadata,
+and reuse it instead of (perhaps expensive) directory traversal.  This doesn't
+collide with explicitly selected packages by \fB\-\-pkglist\fR or
+\fB\-\-includepkg\fR, such packages are appended to the recycled list.
+This option is useful for I/O optimal repo modifications (package removal by
+\fB\-\-exclude\fR, and additions with \fB\-\-pkglist\fR).
 .SS \-o \-\-outputdir URL
 .sp
 Optional output directory.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/createrepo_c-0.15.4/examples/python/contenthash_calculation.py 
new/createrepo_c-0.15.6/examples/python/contenthash_calculation.py
--- old/createrepo_c-0.15.4/examples/python/contenthash_calculation.py  
2019-12-06 12:46:02.000000000 +0100
+++ new/createrepo_c-0.15.6/examples/python/contenthash_calculation.py  
2020-01-17 23:23:36.000000000 +0100
@@ -41,11 +41,11 @@
 
     contenthash = hashlib.new("sha256")
     for pkgid in sorted(pkgids):
-        contenthash.update(pkgid)
+        contenthash.update(pkgid.encode('utf-8'))
     return contenthash.hexdigest()
 
 if __name__ == "__main__":
     path = REPO_PATH
     if len(sys.argv) == 2:
         path = sys.argv[1]
-    print calculate_contenthash(path)
+    print(calculate_contenthash(path))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/createrepo_c-0.15.4/examples/python/repodata_parsing.py 
new/createrepo_c-0.15.6/examples/python/repodata_parsing.py
--- old/createrepo_c-0.15.4/examples/python/repodata_parsing.py 2019-12-06 
12:46:02.000000000 +0100
+++ new/createrepo_c-0.15.6/examples/python/repodata_parsing.py 2020-01-17 
23:23:36.000000000 +0100
@@ -11,70 +11,70 @@
 def print_package_info(pkg):
     def print_pcors(lst, requires=False):
         for item in lst:
-            print "    Name: %s" % item[cr.PCOR_ENTRY_NAME]
-            print "    Flags: %s" % item[cr.PCOR_ENTRY_FLAGS]
-            print "    Epoch: %s" % item[cr.PCOR_ENTRY_EPOCH]
-            print "    Version: %s" % item[cr.PCOR_ENTRY_VERSION]
-            print "    Release: %s" % item[cr.PCOR_ENTRY_RELEASE]
+            print("    Name: %s" % item[cr.PCOR_ENTRY_NAME])
+            print("    Flags: %s" % item[cr.PCOR_ENTRY_FLAGS])
+            print("    Epoch: %s" % item[cr.PCOR_ENTRY_EPOCH])
+            print("    Version: %s" % item[cr.PCOR_ENTRY_VERSION])
+            print("    Release: %s" % item[cr.PCOR_ENTRY_RELEASE])
             if requires:
-                print "    Pre: %s" % item[cr.PCOR_ENTRY_PRE]
-            print "    +-----------------------------------+"
+                print("    Pre: %s" % item[cr.PCOR_ENTRY_PRE])
+            print("    +-----------------------------------+")
 
     def print_files(lst):
         for item in lst:
-            print "    Name: %s" % item[cr.FILE_ENTRY_NAME]
-            print "    Path: %s" % item[cr.FILE_ENTRY_PATH]
-            print "    Type: %s" % item[cr.FILE_ENTRY_TYPE]
-            print "    +-----------------------------------+"
+            print("    Name: %s" % item[cr.FILE_ENTRY_NAME])
+            print("    Path: %s" % item[cr.FILE_ENTRY_PATH])
+            print("    Type: %s" % item[cr.FILE_ENTRY_TYPE])
+            print("    +-----------------------------------+")
 
     def print_changelogs(lst):
         for item in lst:
-            print "    Author: %s" % item[cr.CHANGELOG_ENTRY_AUTHOR]
-            print "    Date: %s" % item[cr.CHANGELOG_ENTRY_DATE]
-            print "    Changelog: %s" % item[cr.CHANGELOG_ENTRY_CHANGELOG]
-            print "    +-----------------------------------+"
-
-    print "+=======================================+"
-    print "  %s" % pkg.name
-    print "+=======================================+"
-    print "NEVRA: %s" % pkg.nevra()
-    print "NVRA: %s" % pkg.nvra()
-    print "Name: %s" % pkg.name
-    print "Checksum (pkgId): %s" % pkg.pkgId
-    print "Checksum type: %s" % pkg.checksum_type
-    print "Arch: %s" % pkg.arch
-    print "Version: %s" % pkg.version
-    print "Epoch: %s" % pkg.epoch
-    print "Release: %s" % pkg.release
-    print "Summary: %s" % pkg.summary
-    print "Description: %s" % pkg.description
-    print "URL: %s" % pkg.url
-    print "Time file: %s" % pkg.time_file
-    print "Time build: %s" % pkg.time_build
-    print "License: %s" % pkg.rpm_license
-    print "Vendor: %s" % pkg.rpm_vendor
-    print "Group: %s" % pkg.rpm_group
-    print "Buildhost: %s" % pkg.rpm_buildhost
-    print "Source RPM: %s" % pkg.rpm_sourcerpm
-    print "Header start: %s" % pkg.rpm_header_start
-    print "Header end: %s" % pkg.rpm_header_end
-    print "Packager: %s" % pkg.rpm_packager
-    print "Size package: %s" % pkg.size_package
-    print "Size installed: %s" % pkg.size_installed
-    print "Size archive: %s" % pkg.size_archive
-    print "Location href: %s" % pkg.location_href
-    print "Location base: %s" % pkg.location_base
-    print "Requires:"
+            print("    Author: %s" % item[cr.CHANGELOG_ENTRY_AUTHOR])
+            print("    Date: %s" % item[cr.CHANGELOG_ENTRY_DATE])
+            print("    Changelog: %s" % item[cr.CHANGELOG_ENTRY_CHANGELOG])
+            print("    +-----------------------------------+")
+
+    print("+=======================================+")
+    print("  %s" % pkg.name)
+    print("+=======================================+")
+    print("NEVRA: %s" % pkg.nevra())
+    print("NVRA: %s" % pkg.nvra())
+    print("Name: %s" % pkg.name)
+    print("Checksum (pkgId): %s" % pkg.pkgId)
+    print("Checksum type: %s" % pkg.checksum_type)
+    print("Arch: %s" % pkg.arch)
+    print("Version: %s" % pkg.version)
+    print("Epoch: %s" % pkg.epoch)
+    print("Release: %s" % pkg.release)
+    print("Summary: %s" % pkg.summary)
+    print("Description: %s" % pkg.description)
+    print("URL: %s" % pkg.url)
+    print("Time file: %s" % pkg.time_file)
+    print("Time build: %s" % pkg.time_build)
+    print("License: %s" % pkg.rpm_license)
+    print("Vendor: %s" % pkg.rpm_vendor)
+    print("Group: %s" % pkg.rpm_group)
+    print("Buildhost: %s" % pkg.rpm_buildhost)
+    print("Source RPM: %s" % pkg.rpm_sourcerpm)
+    print("Header start: %s" % pkg.rpm_header_start)
+    print("Header end: %s" % pkg.rpm_header_end)
+    print("Packager: %s" % pkg.rpm_packager)
+    print("Size package: %s" % pkg.size_package)
+    print("Size installed: %s" % pkg.size_installed)
+    print("Size archive: %s" % pkg.size_archive)
+    print("Location href: %s" % pkg.location_href)
+    print("Location base: %s" % pkg.location_base)
+    print("Requires:")
     print_pcors(pkg.requires, requires=True)
-    print "Provides:"
+    print("Provides:")
     print_pcors(pkg.provides)
-    print "Conflicts:"
+    print("Conflicts:")
     print_pcors(pkg.conflicts)
-    print "Obsoletes:"
+    print("Obsoletes:")
     print_pcors(pkg.obsoletes)
-    print "Files:"
+    print("Files:")
     print_files(pkg.files)
-    print "Changelogs:"
+    print("Changelogs:")
     print_changelogs(pkg.changelogs)
 
 def first_method():
@@ -156,7 +156,7 @@
                              the XML_WARNING_* constants.
         :param message: String message.
         """
-        print "PARSER WARNING: %s" % message
+        print("PARSER WARNING: %s" % message)
         return True
 
     repomd2 = cr.Repomd()
@@ -208,16 +208,16 @@
                        newpkgcb=newpkgcb,
                        warningcb=warningcb)
 
-    for pkg in packages.itervalues():
+    for pkg in packages.values():
         print_package_info(pkg)
 
 
 if __name__ == "__main__":
-    print '"All in one shot" method:'
+    print('"All in one shot" method:')
     first_method()
 
-    print
+    print()
 
-    print "Callback based method:"
+    print("Callback based method:")
     second_method()
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/createrepo_c-0.15.4/examples/python/repomd_parsing.py 
new/createrepo_c-0.15.6/examples/python/repomd_parsing.py
--- old/createrepo_c-0.15.4/examples/python/repomd_parsing.py   2019-12-06 
12:46:02.000000000 +0100
+++ new/createrepo_c-0.15.6/examples/python/repomd_parsing.py   2020-01-17 
23:23:36.000000000 +0100
@@ -9,28 +9,28 @@
 
 def parse_repomd(path):
     repomd = cr.Repomd(path)
-    print "Revision:", repomd.revision
+    print("Revision:", repomd.revision)
     if repomd.contenthash:
-        print "Contenthash:", repomd.contenthash
-        print "Contenthash type:", repomd.contenthash_type
-    print "Repo tags:", repomd.repo_tags
-    print "Content tags:", repomd.content_tags
-    print "Distro tags:", repomd.distro_tags
-    print
+        print("Contenthash:", repomd.contenthash)
+        print("Contenthash type:", repomd.contenthash_type)
+    print("Repo tags:", repomd.repo_tags)
+    print("Content tags:", repomd.content_tags)
+    print("Distro tags:", repomd.distro_tags)
+    print()
     for rec in repomd.records:
-        print "Type:", rec.type
-        print "Location href:", rec.location_href
-        print "Location base:", rec.location_base
-        print "Checksum:", rec.checksum
-        print "Checksum type:", rec.checksum_type
-        print "Checksum open:", rec.checksum_open
-        print "Checksum open type:", rec.checksum_open_type
-        print "Timestamp:", rec.timestamp
-        print "Size:", rec.size
-        print "Size open:", rec.size_open
+        print("Type:", rec.type)
+        print("Location href:", rec.location_href)
+        print("Location base:", rec.location_base)
+        print("Checksum:", rec.checksum)
+        print("Checksum type:", rec.checksum_type)
+        print("Checksum open:", rec.checksum_open)
+        print("Checksum open type:", rec.checksum_open_type)
+        print("Timestamp:", rec.timestamp)
+        print("Size:", rec.size)
+        print("Size open:", rec.size_open)
         if rec.db_ver:
-            print "Db version:", rec.db_ver
-        print
+            print("Db version:", rec.db_ver)
+        print()
 
 if __name__ == "__main__":
     repomd_path = os.path.join(REPO_PATH, "repodata/repomd.xml")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/createrepo_c-0.15.4/examples/python/simple_createrepo.py 
new/createrepo_c-0.15.6/examples/python/simple_createrepo.py
--- old/createrepo_c-0.15.4/examples/python/simple_createrepo.py        
2019-12-06 12:46:02.000000000 +0100
+++ new/createrepo_c-0.15.6/examples/python/simple_createrepo.py        
2020-01-17 23:23:36.000000000 +0100
@@ -50,7 +50,7 @@
     for filename in pkg_list:
         pkg = cr.package_from_rpm(filename)
         pkg.location_href = os.path.basename(filename)
-        print "Processing: %s" % pkg.nevra()
+        print("Processing: %s" % pkg.nevra())
         pri_xml.add_pkg(pkg)
         fil_xml.add_pkg(pkg)
         oth_xml.add_pkg(pkg)
@@ -90,9 +90,9 @@
 
 if __name__ == "__main__":
     if len(sys.argv) != 2 or not os.path.isdir(sys.argv[1]):
-        print "Usage: %s <directory>" % (sys.argv[0])
+        print("Usage: %s <directory>" % (sys.argv[0]))
         sys.exit(1)
 
     do_repodata(sys.argv[1])
 
-    print "Repository created in %s" % sys.argv[1]
+    print("Repository created in %s" % sys.argv[1])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/createrepo_c-0.15.4/examples/python/simple_modifyrepo.py 
new/createrepo_c-0.15.6/examples/python/simple_modifyrepo.py
--- old/createrepo_c-0.15.4/examples/python/simple_modifyrepo.py        
2019-12-06 12:46:02.000000000 +0100
+++ new/createrepo_c-0.15.6/examples/python/simple_modifyrepo.py        
2020-01-17 23:23:36.000000000 +0100
@@ -21,12 +21,12 @@
     repomd_xml = os.path.join(repodata, 'repomd.xml')
     repomd = cr.Repomd(repomd_xml)
     repomd.set_record(uinfo_rec)
-    with file(repomd_xml, 'w') as repomd_file:
+    with open(repomd_xml, 'w') as repomd_file:
         repomd_file.write(repomd.xml_dump())
 
 
 if __name__ == '__main__':
     # Generate the updateinfo.xml
-    execfile('updateinfo_gen_02.py')
+    exec(open("./updateinfo_gen_02.py").read())
 
     modifyrepo(OUT_FILE, REPO_PATH)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/createrepo_c-0.15.4/examples/python/updateinfo_gen_01.py 
new/createrepo_c-0.15.6/examples/python/updateinfo_gen_01.py
--- old/createrepo_c-0.15.4/examples/python/updateinfo_gen_01.py        
2019-12-06 12:46:02.000000000 +0100
+++ new/createrepo_c-0.15.6/examples/python/updateinfo_gen_01.py        
2020-01-17 23:23:36.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import datetime
 import createrepo_c as cr
@@ -46,7 +46,7 @@
     ui = cr.UpdateInfo()
     ui.append(rec)
 
-    print ui.xml_dump(),
+    print(ui.xml_dump())
 
 if __name__ == "__main__":
     generate()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/createrepo_c-0.15.4/examples/python/updateinfo_gen_02.py 
new/createrepo_c-0.15.6/examples/python/updateinfo_gen_02.py
--- old/createrepo_c-0.15.4/examples/python/updateinfo_gen_02.py        
2019-12-06 12:46:02.000000000 +0100
+++ new/createrepo_c-0.15.6/examples/python/updateinfo_gen_02.py        
2020-01-17 23:23:36.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import datetime
 import createrepo_c as cr
@@ -50,7 +50,7 @@
     f.add_chunk(chunk)
     f.close()
 
-    print "See the %s" % OUT_FILE
+    print("See the %s" % OUT_FILE)
 
 
 if __name__ == "__main__":
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/createrepo_c-0.15.4/examples/python/updateinfo_parsing.py 
new/createrepo_c-0.15.6/examples/python/updateinfo_parsing.py
--- old/createrepo_c-0.15.4/examples/python/updateinfo_parsing.py       
2019-12-06 12:46:02.000000000 +0100
+++ new/createrepo_c-0.15.6/examples/python/updateinfo_parsing.py       
2020-01-17 23:23:36.000000000 +0100
@@ -10,46 +10,46 @@
 def parse_updateinfo(path):
     uinfo = cr.UpdateInfo(path)
     for update in uinfo.updates:
-        print "From:         %s" % update.fromstr
-        print "Status:       %s" % update.status
-        print "Type:         %s" % update.type
-        print "Version:      %s" % update.version
-        print "Id:           %s" % update.id
-        print "Title:        %s" % update.title
-        print "Issued date:  %s" % update.issued_date
-        print "Updated date: %s" % update.updated_date
-        print "Rights:       %s" % update.rights
-        print "Release:      %s" % update.release
-        print "Pushcount:    %s" % update.pushcount
-        print "Severity:     %s" % update.severity
-        print "Summary:      %s" % update.summary
-        print "Description:  %s" % update.description
-        print "Solution:     %s" % update.solution
-        print "References:"
+        print("From:         %s" % update.fromstr)
+        print("Status:       %s" % update.status)
+        print("Type:         %s" % update.type)
+        print("Version:      %s" % update.version)
+        print("Id:           %s" % update.id)
+        print("Title:        %s" % update.title)
+        print("Issued date:  %s" % update.issued_date)
+        print("Updated date: %s" % update.updated_date)
+        print("Rights:       %s" % update.rights)
+        print("Release:      %s" % update.release)
+        print("Pushcount:    %s" % update.pushcount)
+        print("Severity:     %s" % update.severity)
+        print("Summary:      %s" % update.summary)
+        print("Description:  %s" % update.description)
+        print("Solution:     %s" % update.solution)
+        print("References:")
         for ref in update.references:
-            print "  Href:  %s" % ref.href
-            print "  Id:    %s" % ref.id
-            print "  Type:  %s" % ref.type
-            print "  Title: %s" % ref.title
-            print "  ----------------------------"
-        print "Pkglist (collections):"
+            print("  Href:  %s" % ref.href)
+            print("  Id:    %s" % ref.id)
+            print("  Type:  %s" % ref.type)
+            print("  Title: %s" % ref.title)
+            print("  ----------------------------")
+        print("Pkglist (collections):")
         for col in update.collections:
-            print "  Short: %s" % col.shortname
-            print "  name:  %s" % col.name
-            print "  Packages:"
+            print("  Short: %s" % col.shortname)
+            print("  name:  %s" % col.name)
+            print("  Packages:")
             for pkg in col.packages:
-                print "    Name:     %s" % pkg.name
-                print "    Version:  %s" % pkg.version
-                print "    Release:  %s" % pkg.release
-                print "    Epoch:    %s" % pkg.epoch
-                print "    Arch:     %s" % pkg.arch
-                print "    Src:      %s" % pkg.src
-                print "    Filename: %s" % pkg.filename
-                print "    Sum:      %s" % pkg.sum
-                print "    Sum type: %s (%s)" % (pkg.sum_type, 
cr.checksum_name_str(pkg.sum_type))
-                print "    Reboot suggested: %s" % pkg.reboot_suggested
-            print "  ----------------------------"
-        print "=============================="
+                print("    Name:     %s" % pkg.name)
+                print("    Version:  %s" % pkg.version)
+                print("    Release:  %s" % pkg.release)
+                print("    Epoch:    %s" % pkg.epoch)
+                print("    Arch:     %s" % pkg.arch)
+                print("    Src:      %s" % pkg.src)
+                print("    Filename: %s" % pkg.filename)
+                print("    Sum:      %s" % pkg.sum)
+                print("    Sum type: %s (%s)" % (pkg.sum_type, 
cr.checksum_name_str(pkg.sum_type)))
+                print("    Reboot suggested: %s" % pkg.reboot_suggested)
+            print("  ----------------------------")
+        print("==============================")
 
 
 if __name__ == "__main__":
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/createrepo_c-0.15.4/src/cmd_parser.c 
new/createrepo_c-0.15.6/src/cmd_parser.c
--- old/createrepo_c-0.15.4/src/cmd_parser.c    2019-12-06 12:46:02.000000000 
+0100
+++ new/createrepo_c-0.15.6/src/cmd_parser.c    2020-01-17 23:23:36.000000000 
+0100
@@ -64,6 +64,7 @@
 
         .zck_compression            = FALSE,
         .zck_dict_dir               = NULL,
+        .recycle_pkglist            = FALSE,
     };
 
 
@@ -79,7 +80,7 @@
     { "verbose", 'v', 0, G_OPTION_ARG_NONE, &(_cmd_options.verbose),
       "Run verbosely.", NULL },
     { "excludes", 'x', 0, G_OPTION_ARG_FILENAME_ARRAY, 
&(_cmd_options.excludes),
-      "File globs to exclude, can be specified multiple times.", 
"PACKAGE_NAME_GLOB" },
+      "Path patterns to exclude, can be specified multiple times.", 
"PACKAGE_NAME_GLOB" },
     { "basedir", 0, 0, G_OPTION_ARG_FILENAME, &(_cmd_options.basedir),
       "Basedir for path to directories.", "BASEDIR" },
     { "baseurl", 'u', 0, G_OPTION_ARG_FILENAME, &(_cmd_options.location_base),
@@ -103,7 +104,8 @@
       "large repository with only a few new or modified rpms "
       "this can significantly reduce I/O and processing time.", NULL },
     { "update-md-path", 0, 0, G_OPTION_ARG_FILENAME_ARRAY, 
&(_cmd_options.update_md_paths),
-      "Use the existing repodata for --update from this path.", NULL },
+      "Existing metadata from this path are loaded and reused in addition to 
those "
+      "present in the outputdir (works only with --update). Can be specified 
multiple times.", NULL },
     { "skip-stat", 0, 0, G_OPTION_ARG_NONE, &(_cmd_options.skip_stat),
       "Skip the stat() call on a --update, assumes if the filename is the same 
"
       "then the file is still the same (only use this if you're fairly "
@@ -202,6 +204,10 @@
       "Checksum type to be used in repomd.xml", "CHECKSUM_TYPE"},
     { "error-exit-val", 0, 0, G_OPTION_ARG_NONE, 
&(_cmd_options.error_exit_val),
       "Exit with retval 2 if there were any errors during processing", NULL },
+    { "recycle-pkglist", 0, 0, G_OPTION_ARG_NONE, 
&(_cmd_options.recycle_pkglist),
+      "Read the list of packages from old metadata directory and re-use it.  
This "
+      "option is only useful with --update (complements --pkglist and 
friends).",
+      NULL },
     { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL },
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/createrepo_c-0.15.4/src/cmd_parser.h 
new/createrepo_c-0.15.6/src/cmd_parser.h
--- old/createrepo_c-0.15.4/src/cmd_parser.h    2019-12-06 12:46:02.000000000 
+0100
+++ new/createrepo_c-0.15.6/src/cmd_parser.h    2020-01-17 23:23:36.000000000 
+0100
@@ -136,6 +136,7 @@
     char *checksum_cachedir;    /*!< Path to cachedir */
     GSList *oldpackagedirs_paths; /*!< paths to look for older pkgs to delta 
against */
 
+    gboolean recycle_pkglist;
 };
 
 /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/createrepo_c-0.15.4/src/compression_wrapper.c 
new/createrepo_c-0.15.6/src/compression_wrapper.c
--- old/createrepo_c-0.15.4/src/compression_wrapper.c   2019-12-06 
12:46:02.000000000 +0100
+++ new/createrepo_c-0.15.6/src/compression_wrapper.c   2020-01-17 
23:23:36.000000000 +0100
@@ -951,7 +951,7 @@
 cr_read(CR_FILE *cr_file, void *buffer, unsigned int len, GError **err)
 {
     int bzerror;
-    int ret;
+    int ret = CR_CW_ERR;
 
     assert(cr_file);
     assert(buffer);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/createrepo_c-0.15.4/src/createrepo_c.c 
new/createrepo_c-0.15.6/src/createrepo_c.c
--- old/createrepo_c-0.15.4/src/createrepo_c.c  2019-12-06 12:46:02.000000000 
+0100
+++ new/createrepo_c-0.15.6/src/createrepo_c.c  2020-01-17 23:23:36.000000000 
+0100
@@ -135,7 +135,8 @@
     if (cmd_options->pkglist && !cmd_options->include_pkgs) {
         g_warning("Used pkglist doesn't contain any useful items");
     } else if (!(cmd_options->include_pkgs)) {
-        // --pkglist (or --includepkg) is not supplied -> do dir walk
+        // --pkglist (or --includepkg, or --recycle-pkglist) is not supplied
+        //  --> do dir walk
 
         g_message("Directory walk started");
 
@@ -243,7 +244,7 @@
             else    // Use only a last part of the path
                 filename = relative_path + x + 1;
 
-            if (allowed_file(filename, cmd_options->exclude_masks)) {
+            if (allowed_file(relative_path, cmd_options->exclude_masks)) {
                 // Check filename against exclude glob masks
                 gchar *full_path = g_strconcat(in_dir, relative_path, NULL);
                 //     ^^^ /path/to/in_repo/packages/i386/foobar.rpm
@@ -440,6 +441,69 @@
     }
 }
 
+static void
+load_old_metadata(cr_Metadata **md,
+                  struct cr_MetadataLocation **md_location,
+                  GSList *current_pkglist,
+                  struct CmdOptions *cmd_options,
+                  gchar *dir,
+                  GThreadPool *pool,
+                  GError *tmp_err)
+{
+    *md_location = cr_locate_metadata(dir, TRUE, &tmp_err);
+    if (tmp_err) {
+        if (tmp_err->domain == CRE_MODULEMD) {
+            g_thread_pool_free(pool, FALSE, FALSE);
+            g_clear_pointer(md_location, cr_metadatalocation_free);
+            g_critical("%s\n",tmp_err->message);
+            exit(tmp_err->code);
+        } else {
+            g_debug("Old metadata from default outputdir not found: 
%s",tmp_err->message);
+            g_clear_error(&tmp_err);
+        }
+    }
+
+    *md = cr_metadata_new(CR_HT_KEY_HREF, 1, current_pkglist);
+    cr_metadata_set_dupaction(*md, CR_HT_DUPACT_REMOVEALL);
+
+    int ret;
+
+    if (*md_location) {
+        ret = cr_metadata_load_xml(*md, *md_location, &tmp_err);
+        assert(ret == CRE_OK || tmp_err);
+
+        if (ret == CRE_OK) {
+            g_debug("Old metadata from: %s - loaded",
+                    (*md_location)->original_url);
+        } else {
+            g_debug("Old metadata from %s - loading failed: %s",
+                    (*md_location)->original_url, tmp_err->message);
+            g_clear_error(&tmp_err);
+        }
+    }
+
+    // Load repodata from --update-md-path
+    GSList *element = cmd_options->l_update_md_paths;
+    for (; element; element = g_slist_next(element)) {
+        char *path = (char *) element->data;
+        g_message("Loading metadata from md-path: %s", path);
+
+        ret = cr_metadata_locate_and_load_xml(*md, path, &tmp_err);
+        assert(ret == CRE_OK || tmp_err);
+
+        if (ret == CRE_OK) {
+            g_debug("Metadata from md-path %s - loaded", path);
+        } else {
+            g_warning("Metadata from md-path %s - loading failed: %s",
+                      path, tmp_err->message);
+            g_clear_error(&tmp_err);
+        }
+    }
+
+    g_message("Loaded information about %d packages",
+              g_hash_table_size(cr_metadata_hashtable(*md)));
+}
+
 int
 main(int argc, char **argv)
 {
@@ -602,6 +666,33 @@
     GSList *current_pkglist = NULL;
     /* ^^^ List with basenames of files which will be processed */
 
+    // Load old metadata if --update
+    struct cr_MetadataLocation *old_metadata_location = NULL;
+    cr_Metadata *old_metadata = NULL;
+
+    gchar *old_metadata_dir = cmd_options->outputdir ? out_dir : in_dir;
+
+    if (cmd_options->recycle_pkglist) {
+        // load the old metadata early, so we can read the list of RPMs
+        load_old_metadata(&old_metadata,
+                          &old_metadata_location,
+                          NULL /* no filter wanted in this case */,
+                          cmd_options,
+                          old_metadata_dir,
+                          pool,
+                          tmp_err);
+
+        GHashTableIter iter;
+        g_hash_table_iter_init(&iter, cr_metadata_hashtable(old_metadata));
+        gpointer pkg_pointer;
+        while (g_hash_table_iter_next(&iter, NULL, &pkg_pointer)) {
+            cr_Package *pkg = (cr_Package *)pkg_pointer;
+            cmd_options->include_pkgs = g_slist_prepend(
+                    cmd_options->include_pkgs,
+                    (gpointer) g_strdup(pkg->location_href));
+        }
+    }
+
     for (int media_id = 1; media_id < argc; media_id++ ) {
         gchar *tmp_in_dir = cr_normalize_dir_path(argv[media_id]);
         // Thread pool - Fill with tasks
@@ -617,69 +708,19 @@
     g_debug("Package count: %ld", task_count);
     g_message("Directory walk done - %ld packages", task_count);
 
-
-    // Load old metadata if --update
-    cr_Metadata *old_metadata = NULL;
-    struct cr_MetadataLocation *old_metadata_location = NULL;
-
-    if (!task_count)
-        g_debug("No packages found - skipping metadata loading");
-
-    if (task_count && cmd_options->update) {
-        int ret;
-        old_metadata = cr_metadata_new(CR_HT_KEY_FILENAME, 1, current_pkglist);
-        cr_metadata_set_dupaction(old_metadata, CR_HT_DUPACT_REMOVEALL);
-
-        if (cmd_options->outputdir)
-            old_metadata_location = cr_locate_metadata(out_dir, TRUE, 
&tmp_err);
+    if (cmd_options->update) {
+        if (old_metadata)
+            g_debug("Old metadata already loaded.");
+        else if (!task_count)
+            g_debug("No packages found - skipping metadata loading");
         else
-            old_metadata_location = cr_locate_metadata(in_dir, TRUE, &tmp_err);
-
-        if (tmp_err){
-            if (tmp_err->domain == CRE_MODULEMD){
-                g_thread_pool_free(pool, FALSE, FALSE);
-                g_clear_pointer(&old_metadata_location, 
cr_metadatalocation_free);
-                g_critical("%s\n",tmp_err->message);
-                exit(tmp_err->code);
-            }
-        }
-
-        if (old_metadata_location) {
-            ret = cr_metadata_load_xml(old_metadata,
-                                       old_metadata_location,
-                                       &tmp_err);
-            assert(ret == CRE_OK || tmp_err);
-
-            if (ret == CRE_OK) {
-                g_debug("Old metadata from: %s - loaded",
-                        old_metadata_location->original_url);
-            } else {
-                g_debug("Old metadata from %s - loading failed: %s",
-                        old_metadata_location->original_url, tmp_err->message);
-                g_clear_error(&tmp_err);
-            }
-        }
-
-        // Load repodata from --update-md-path
-        GSList *element = cmd_options->l_update_md_paths;
-        for (; element; element = g_slist_next(element)) {
-            char *path = (char *) element->data;
-            g_message("Loading metadata from md-path: %s", path);
-
-            ret = cr_metadata_locate_and_load_xml(old_metadata, path, 
&tmp_err);
-            assert(ret == CRE_OK || tmp_err);
-
-            if (ret == CRE_OK) {
-                g_debug("Metadata from md-path %s - loaded", path);
-            } else {
-                g_warning("Metadata from md-path %s - loading failed: %s",
-                          path, tmp_err->message);
-                g_clear_error(&tmp_err);
-            }
-        }
-
-        g_message("Loaded information about %d packages",
-                  g_hash_table_size(cr_metadata_hashtable(old_metadata)));
+            load_old_metadata(&old_metadata,
+                              &old_metadata_location,
+                              current_pkglist,
+                              cmd_options,
+                              old_metadata_dir,
+                              pool,
+                              tmp_err);
     }
 
     g_slist_free(current_pkglist);
@@ -1167,12 +1208,12 @@
         GThreadPool *rewrite_pkg_count_pool = 
g_thread_pool_new(cr_rewrite_pkg_count_thread,
                                                                 &user_data, 3, 
FALSE, NULL);
 
-        cr_CompressionTask *pri_rewrite_pkg_count_task;
-        cr_CompressionTask *fil_rewrite_pkg_count_task;
-        cr_CompressionTask *oth_rewrite_pkg_count_task;
-        cr_CompressionTask *pri_zck_rewrite_pkg_count_task;
-        cr_CompressionTask *fil_zck_rewrite_pkg_count_task;
-        cr_CompressionTask *oth_zck_rewrite_pkg_count_task;
+        cr_CompressionTask *pri_rewrite_pkg_count_task     = NULL;
+        cr_CompressionTask *fil_rewrite_pkg_count_task     = NULL;
+        cr_CompressionTask *oth_rewrite_pkg_count_task     = NULL;
+        cr_CompressionTask *pri_zck_rewrite_pkg_count_task = NULL;
+        cr_CompressionTask *fil_zck_rewrite_pkg_count_task = NULL;
+        cr_CompressionTask *oth_zck_rewrite_pkg_count_task = NULL;
 
         pri_rewrite_pkg_count_task = cr_compressiontask_new(pri_xml_filename,
                                                             NULL,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/createrepo_c-0.15.4/src/createrepo_shared.c 
new/createrepo_c-0.15.6/src/createrepo_shared.c
--- old/createrepo_c-0.15.4/src/createrepo_shared.c     2019-12-06 
12:46:02.000000000 +0100
+++ new/createrepo_c-0.15.6/src/createrepo_shared.c     2020-01-17 
23:23:36.000000000 +0100
@@ -65,6 +65,7 @@
 sigint_catcher(int sig)
 {
     g_message("%s catched: Terminating...", strsignal(sig));
+    *global_exit_status = 1;
     exit(1);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/createrepo_c-0.15.4/src/dumper_thread.c 
new/createrepo_c-0.15.6/src/dumper_thread.c
--- old/createrepo_c-0.15.4/src/dumper_thread.c 2019-12-06 12:46:02.000000000 
+0100
+++ new/createrepo_c-0.15.6/src/dumper_thread.c 2020-01-17 23:23:36.000000000 
+0100
@@ -441,15 +441,17 @@
 
     // Update stuff
     if (udata->old_metadata) {
+        char *cache_key = cr_get_cleaned_href(location_href);
+
         // We have old metadata
         g_mutex_lock(&(udata->mutex_old_md));
         md = (cr_Package *) g_hash_table_lookup(
                                 cr_metadata_hashtable(udata->old_metadata),
-                                task->filename);
+                                cache_key);
         // Remove the pkg from the hash table of old metadata, so that no other
         // thread can use it as CACHE, because later we modify it destructively
         g_hash_table_steal(cr_metadata_hashtable(udata->old_metadata),
-                                                 task->filename);
+                                                 cache_key);
         g_mutex_unlock(&(udata->mutex_old_md));
 
         if (md) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/createrepo_c-0.15.4/src/load_metadata.c 
new/createrepo_c-0.15.6/src/load_metadata.c
--- old/createrepo_c-0.15.4/src/load_metadata.c 2019-12-06 12:46:02.000000000 
+0100
+++ new/createrepo_c-0.15.6/src/load_metadata.c 2020-01-17 23:23:36.000000000 
+0100
@@ -575,6 +575,9 @@
             case CR_HT_KEY_FILENAME:
                 new_key = cr_get_filename(pkg->location_href);
                 break;
+            case CR_HT_KEY_HREF:
+                new_key = cr_get_cleaned_href(pkg->location_href);
+                break;
             case CR_HT_KEY_HASH:
                 new_key = pkg->pkgId;
                 break;
@@ -679,9 +682,6 @@
     }
 
     ret = cr_metadata_load_xml(md, ml, err);
-    if (ret != CRE_OK) {
-        return ret;
-    }
 
     cr_metadatalocation_free(ml);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/createrepo_c-0.15.4/src/load_metadata.h 
new/createrepo_c-0.15.6/src/load_metadata.h
--- old/createrepo_c-0.15.4/src/load_metadata.h 2019-12-06 12:46:02.000000000 
+0100
+++ new/createrepo_c-0.15.6/src/load_metadata.h 2020-01-17 23:23:36.000000000 
+0100
@@ -62,6 +62,7 @@
     CR_HT_KEY_NAME,                     /*!< pkg name (cr_Package ->name) */
     CR_HT_KEY_FILENAME,                 /*!< pkg filename (cr_Package
                                              ->location_href) */
+    CR_HT_KEY_HREF,                     /*!< pkg location */
     CR_HT_KEY_SENTINEL,                 /*!< last element, terminator, .. */
 } cr_HashTableKey;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/createrepo_c-0.15.4/src/locate_metadata.c 
new/createrepo_c-0.15.6/src/locate_metadata.c
--- old/createrepo_c-0.15.4/src/locate_metadata.c       2019-12-06 
12:46:02.000000000 +0100
+++ new/createrepo_c-0.15.6/src/locate_metadata.c       2020-01-17 
23:23:36.000000000 +0100
@@ -355,8 +355,11 @@
         ret = cr_get_local_metadata(repopath, ignore_sqlite);
     }
 
-    if (ret)
+    if (ret) {
         ret->original_url = g_strdup(repopath);
+    } else {
+        g_set_error(err, ERR_DOMAIN, CRE_IO, "Metadata not found at %s.", 
repopath);
+    }
 
 #ifndef WITH_LIBMODULEMD
     if (ret) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/createrepo_c-0.15.4/src/mergerepo_c.c 
new/createrepo_c-0.15.6/src/mergerepo_c.c
--- old/createrepo_c-0.15.4/src/mergerepo_c.c   2019-12-06 12:46:02.000000000 
+0100
+++ new/createrepo_c-0.15.6/src/mergerepo_c.c   2020-01-17 23:23:36.000000000 
+0100
@@ -943,6 +943,9 @@
         cr_contentstat_free(pri_stat, NULL);
         cr_contentstat_free(fil_stat, NULL);
         cr_contentstat_free(oth_stat, NULL);
+        cr_contentstat_free(pri_zck_stat, NULL);
+        cr_contentstat_free(fil_zck_stat, NULL);
+        cr_contentstat_free(oth_zck_stat, NULL);
         g_free(pri_xml_filename);
         g_free(fil_xml_filename);
         g_free(oth_xml_filename);
@@ -960,6 +963,9 @@
         cr_contentstat_free(pri_stat, NULL);
         cr_contentstat_free(fil_stat, NULL);
         cr_contentstat_free(oth_stat, NULL);
+        cr_contentstat_free(pri_zck_stat, NULL);
+        cr_contentstat_free(fil_zck_stat, NULL);
+        cr_contentstat_free(oth_zck_stat, NULL);
         g_free(pri_xml_filename);
         g_free(fil_xml_filename);
         g_free(oth_xml_filename);
@@ -978,6 +984,9 @@
         cr_contentstat_free(pri_stat, NULL);
         cr_contentstat_free(fil_stat, NULL);
         cr_contentstat_free(oth_stat, NULL);
+        cr_contentstat_free(pri_zck_stat, NULL);
+        cr_contentstat_free(fil_zck_stat, NULL);
+        cr_contentstat_free(oth_zck_stat, NULL);
         g_free(pri_xml_filename);
         g_free(fil_xml_filename);
         g_free(oth_xml_filename);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/createrepo_c-0.15.4/src/misc.c 
new/createrepo_c-0.15.6/src/misc.c
--- old/createrepo_c-0.15.4/src/misc.c  2019-12-06 12:46:02.000000000 +0100
+++ new/createrepo_c-0.15.6/src/misc.c  2020-01-17 23:23:36.000000000 +0100
@@ -367,6 +367,21 @@
     return filename;
 }
 
+char *
+cr_get_cleaned_href(const char *filepath)
+{
+    char *filename;
+
+    if (!filepath)
+        return NULL;
+
+    filename = (char *) filepath;
+
+    while (filename[0] == '.' && filename[1] == '/')
+        filename += 2;
+
+    return filename;
+}
 
 gboolean
 cr_copy_file(const char *src, const char *in_dst, GError **err)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/createrepo_c-0.15.4/src/misc.h 
new/createrepo_c-0.15.6/src/misc.h
--- old/createrepo_c-0.15.4/src/misc.h  2019-12-06 12:46:02.000000000 +0100
+++ new/createrepo_c-0.15.6/src/misc.h  2020-01-17 23:23:36.000000000 +0100
@@ -139,6 +139,13 @@
  */
 char *cr_get_filename(const char *filepath);
 
+/** Return pointer to the rest of string after './' prefix.
+ * (e.g. for "././foo/bar" returns "foo/bar")
+ * @param filepath      path
+ * @return              pointer into the path
+ */
+char *cr_get_cleaned_href(const char *filepath);
+
 /** Download a file from the URL into the in_dst via curl handle.
  * @param handle        CURL handle
  * @param url           source url
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/createrepo_c-0.15.4/src/python/load_metadata-py.c 
new/createrepo_c-0.15.6/src/python/load_metadata-py.c
--- old/createrepo_c-0.15.4/src/python/load_metadata-py.c       2019-12-06 
12:46:02.000000000 +0100
+++ new/createrepo_c-0.15.6/src/python/load_metadata-py.c       2020-01-17 
23:23:36.000000000 +0100
@@ -148,8 +148,7 @@
     if (check_MetadataStatus(self))
         return NULL;
 
-    cr_metadata_load_xml(self->md, MetadataLocation_FromPyObject(ml), 
&tmp_err);
-    if (tmp_err) {
+    if (cr_metadata_load_xml(self->md, MetadataLocation_FromPyObject(ml), 
&tmp_err) != CRE_OK) {
         nice_exception(&tmp_err, NULL);
         return NULL;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/createrepo_c-0.15.4/src/xml_dump.c 
new/createrepo_c-0.15.6/src/xml_dump.c
--- old/createrepo_c-0.15.4/src/xml_dump.c      2019-12-06 12:46:02.000000000 
+0100
+++ new/createrepo_c-0.15.6/src/xml_dump.c      2020-01-17 23:23:36.000000000 
+0100
@@ -285,15 +285,15 @@
     result.filelists = NULL;
     result.other     = NULL;
 
+    if (!pkg)
+        return result;
+
     if (cr_Package_contains_forbidden_control_chars(pkg)) {
         g_set_error(err, CREATEREPO_C_ERROR, CRE_XMLDATA,
                     "Forbidden control chars found (ASCII values <32 except 9, 
10 and 13).");
         return result;
     }
 
-    if (!pkg)
-        return result;
-
     result.primary = cr_xml_dump_primary(pkg, &tmp_err);
     if (tmp_err) {
         g_propagate_error(err, tmp_err);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/createrepo_c-0.15.4/src/xml_dump_updateinfo.c 
new/createrepo_c-0.15.6/src/xml_dump_updateinfo.c
--- old/createrepo_c-0.15.4/src/xml_dump_updateinfo.c   2019-12-06 
12:46:02.000000000 +0100
+++ new/createrepo_c-0.15.6/src/xml_dump_updateinfo.c   2020-01-17 
23:23:36.000000000 +0100
@@ -61,9 +61,9 @@
         }
 
         if (pkg->reboot_suggested)
-            xmlNewChild(package, NULL, BAD_CAST "reboot_suggested", NULL);
+            xmlNewChild(package, NULL, BAD_CAST "reboot_suggested", "True");
         if (pkg->restart_suggested)
-            xmlNewChild(package, NULL, BAD_CAST "restart_suggested", NULL);
+            xmlNewChild(package, NULL, BAD_CAST "restart_suggested", "True");
     }
 }
 
@@ -168,7 +168,7 @@
     cr_xmlNewTextChild_c(update, NULL, BAD_CAST "solution", BAD_CAST 
rec->solution);
 
     if (rec->reboot_suggested)
-        xmlNewChild(update, NULL, BAD_CAST "reboot_suggested", NULL);
+        xmlNewChild(update, NULL, BAD_CAST "reboot_suggested", "True");
 
     // References
     cr_xml_dump_updateinforecord_references(update, rec->references);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/createrepo_c-0.15.4/src/xml_file.c 
new/createrepo_c-0.15.6/src/xml_file.c
--- old/createrepo_c-0.15.4/src/xml_file.c      2019-12-06 12:46:02.000000000 
+0100
+++ new/createrepo_c-0.15.6/src/xml_file.c      2020-01-17 23:23:36.000000000 
+0100
@@ -395,13 +395,12 @@
         if (zck_dict_file){
             gchar *zck_dict = NULL;
             size_t zck_dict_size = 0;
-            g_file_get_contents(zck_dict_file, &zck_dict, &zck_dict_size, 
&tmp_err);
-            if (!tmp_err)
+            if (g_file_get_contents(zck_dict_file, &zck_dict, &zck_dict_size, 
&tmp_err)){
                 cr_set_dict(new_file->f, zck_dict, zck_dict_size, &tmp_err);
-            if (tmp_err) {
+            } else {
                 g_propagate_prefixed_error(err, tmp_err, "Error encountered 
setting zck dict:");
                 cr_xmlfile_close(new_file, NULL);
-                cr_close(original_file, NULL); 
+                cr_close(original_file, NULL);
                 g_free(tmp_xml_filename);
                 return;
             }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/createrepo_c-0.15.4/src/xml_parser_updateinfo.c 
new/createrepo_c-0.15.6/src/xml_parser_updateinfo.c
--- old/createrepo_c-0.15.4/src/xml_parser_updateinfo.c 2019-12-06 
12:46:02.000000000 +0100
+++ new/createrepo_c-0.15.6/src/xml_parser_updateinfo.c 2020-01-17 
23:23:36.000000000 +0100
@@ -145,7 +145,6 @@
     // Shortcuts
     cr_UpdateRecord *rec = pd->updaterecord;
     cr_UpdateCollection *collection = pd->updatecollection;
-    cr_UpdateCollectionModule *module = pd->updatecollectionmodule;
     cr_UpdateCollectionPackage *package = pd->updatecollectionpackage;
 
     switch(pd->state) {
@@ -280,7 +279,9 @@
         assert(!pd->updatecollectionmodule);
         assert(!pd->updatecollectionpackage);
 
-        module = cr_updatecollectionmodule_new();
+        cr_UpdateCollectionModule *module = cr_updatecollectionmodule_new();
+        assert(module);
+
         if (module)
             collection->module = module;
 
@@ -323,6 +324,8 @@
         assert(!pd->updatecollectionpackage);
 
         package = cr_updatecollectionpackage_new();
+        assert(package);
+
         cr_updatecollection_append_package(collection, package);
         pd->updatecollectionpackage = package;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/createrepo_c-0.15.4/tests/python/tests/test_updateinfo.py 
new/createrepo_c-0.15.6/tests/python/tests/test_updateinfo.py
--- old/createrepo_c-0.15.4/tests/python/tests/test_updateinfo.py       
2019-12-06 12:46:02.000000000 +0100
+++ new/createrepo_c-0.15.6/tests/python/tests/test_updateinfo.py       
2020-01-17 23:23:36.000000000 +0100
@@ -114,7 +114,7 @@
     <summary>summary</summary>
     <description>description</description>
     <solution>solution</solution>
-    <reboot_suggested/>
+    <reboot_suggested>True</reboot_suggested>
     <references/>
     <pkglist/>
   </update>
@@ -208,8 +208,8 @@
         <package name="foo" version="1.2" release="3" epoch="0" arch="x86" 
src="foo.src.rpm">
           <filename>foo.rpm</filename>
           <sum type="sha1">abcdef</sum>
-          <reboot_suggested/>
-          <restart_suggested/>
+          <reboot_suggested>True</reboot_suggested>
+          <restart_suggested>True</restart_suggested>
         </package>
       </collection>
     </pkglist>
@@ -295,7 +295,7 @@
         <package name="foo" version="1.2" release="3" epoch="0" arch="x86" 
src="foo.src.rpm">
           <filename>foo.rpm</filename>
           <sum type="sha1">abcdef</sum>
-          <reboot_suggested/>
+          <reboot_suggested>True</reboot_suggested>
         </package>
       </collection>
     </pkglist>
@@ -380,7 +380,7 @@
     <summary>summary</summary>
     <description>description</description>
     <solution>solution</solution>
-    <reboot_suggested/>
+    <reboot_suggested>True</reboot_suggested>
     <references>
       <reference href="href" id="id" type="type" title="title"/>
     </references>
@@ -391,8 +391,8 @@
         <package name="foo" version="1.2" release="3" epoch="0" arch="x86" 
src="foo.src.rpm">
           <filename>foo.rpm</filename>
           <sum type="sha1">abcdef</sum>
-          <reboot_suggested/>
-          <restart_suggested/>
+          <reboot_suggested>True</reboot_suggested>
+          <restart_suggested>True</restart_suggested>
         </package>
       </collection>
     </pkglist>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/createrepo_c-0.15.4/tests/python/tests/test_updaterecord.py 
new/createrepo_c-0.15.6/tests/python/tests/test_updaterecord.py
--- old/createrepo_c-0.15.4/tests/python/tests/test_updaterecord.py     
2019-12-06 12:46:02.000000000 +0100
+++ new/createrepo_c-0.15.6/tests/python/tests/test_updaterecord.py     
2020-01-17 23:23:36.000000000 +0100
@@ -134,7 +134,7 @@
     <summary>summary</summary>
     <description>description</description>
     <solution>solution</solution>
-    <reboot_suggested/>
+    <reboot_suggested>True</reboot_suggested>
     <references/>
     <pkglist/>
   </update>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/createrepo_c-0.15.4/utils/gen_rst.py 
new/createrepo_c-0.15.6/utils/gen_rst.py
--- old/createrepo_c-0.15.4/utils/gen_rst.py    2019-12-06 12:46:02.000000000 
+0100
+++ new/createrepo_c-0.15.6/utils/gen_rst.py    2020-01-17 23:23:36.000000000 
+0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import re
@@ -70,13 +70,13 @@
     try:
         content = open(filename, "r").read()
     except IOError:
-        print "Error: Cannot open file %s" % filename
+        print("Error: Cannot open file %s" % filename)
         return args
 
     re_cmd_entries = re.compile(r"\s*(static|const)[ 
]+GOptionEntry[^{]*{(?P<entries>.*)\s*NULL\s*}[,]?\s*};", 
re.MULTILINE|re.DOTALL)
     match = re_cmd_entries.search(content)
     if not match:
-        print "Warning: Cannot find GOptionEntry section in %s" % filename
+        print("Warning: Cannot find GOptionEntry section in %s" % filename)
         return args
 
     re_single_entry = re.compile(r"""{\s*"(?P<long_name>[^"]*)"\s*,        # 
long name
@@ -134,7 +134,7 @@
         entry_match = re_single_entry.search(raw_entries_str[start:])
     # End while
 
-    print >> sys.stderr, "Loaded %2d arguments" % (i,)
+    print("Loaded %2d arguments" % (i,), file=sys.stderr)
     return args
 
 
@@ -147,7 +147,7 @@
     options, args = parser.parse_args()
 
     if len(args) < 1:
-        print >> sys.stderr, "Error: Must specify a input filename. (Example: 
../src/cmd_parser.c)"
+        print("Error: Must specify a input filename. (Example: 
../src/cmd_parser.c)", file=sys.stderr)
         sys.exit(1)
 
     args = parse_arguments_from_c_file(args[0])
@@ -181,7 +181,7 @@
 
     ret = info.gen_rst()
     if not ret:
-        print >> sys.stderr, "Error: Rst has not been generated"
+        print("Error: Rst has not been generated", file=sys.stderr)
         sys.exit(1)
 
-    print ret
+    print(ret)


Reply via email to