diff --git a/0001-Dont-print-empty-requires.patch b/0001-Dont-print-empty-requires.patch deleted file mode 100644 index acdd2cd2e3cab204ce969d30d6e9b8847a1d06f6..0000000000000000000000000000000000000000 --- a/0001-Dont-print-empty-requires.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 7c999e57303d9b0afffde7354742988388fade3f Mon Sep 17 00:00:00 2001 -From: Aleš Matěj -Date: Thu, 15 Apr 2021 09:35:06 +0200 -Subject: [PATCH] Don't print empty requires - -The function `comps_object_tostr` used to get the string returns either -a valid value or if there is none it returns allocated "0" char. - -Closes: https://github.com/rpm-software-management/libcomps/issues/23 ---- - libcomps/src/comps_docpackage.c | 5 +++-- - libcomps/src/python/tests/__test.py | 2 +- - 2 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/libcomps/src/comps_docpackage.c b/libcomps/src/comps_docpackage.c -index 07cc30a..331036e 100644 ---- a/libcomps/src/comps_docpackage.c -+++ b/libcomps/src/comps_docpackage.c -@@ -169,8 +169,9 @@ signed char comps_docpackage_xml(COMPS_DocGroupPackage *pkg, - - if (pkg->requires) { - str = comps_object_tostr((COMPS_Object*)pkg->requires); -- ret = xmlTextWriterWriteAttribute(writer, (xmlChar*) "requires", -- BAD_CAST str); -+ if (str && *str) { -+ ret = xmlTextWriterWriteAttribute(writer, (xmlChar*) "requires", BAD_CAST str); -+ } - free(str); - } - COMPS_XMLRET_CHECK() -diff --git a/libcomps/src/python/tests/__test.py b/libcomps/src/python/tests/__test.py -index 2b321e3..35a41f7 100644 ---- a/libcomps/src/python/tests/__test.py -+++ b/libcomps/src/python/tests/__test.py -@@ -626,7 +626,7 @@ class PackageTest(unittest.TestCase): - self.comps.groups[0].packages.append(libcomps.Package("kernel", libcomps.PACKAGE_TYPE_MANDATORY)) - - out = self.comps.xml_str() -- self.assertTrue("kernel" in out) -+ self.assertTrue("kernel" in out) - - #@unittest.skip("skip") - class DictTest(unittest.TestCase): --- -libgit2 1.0.1 - diff --git a/download b/download new file mode 100644 index 0000000000000000000000000000000000000000..aa26136018de29ca3d356bae2e0af7c1fff05397 --- /dev/null +++ b/download @@ -0,0 +1 @@ +68cba4a88933667cb6c2c1f496ad014d libcomps-0.1.18.tar.gz diff --git a/libcomps-0.1.16.tar.gz b/libcomps-0.1.16.tar.gz deleted file mode 100644 index 25cedb7e518545e723bfaaa0822ce4647dfa6865..0000000000000000000000000000000000000000 Binary files a/libcomps-0.1.16.tar.gz and /dev/null differ diff --git a/libcomps.spec b/libcomps.spec index 281f2c3cc1e3beeea113b6c9a02f127d834f0b36..4b066a690a40dd4e0de761ac1f2b0866618b7adf 100644 --- a/libcomps.spec +++ b/libcomps.spec @@ -1,14 +1,13 @@ %define __cmake_in_source_build 1 Name: libcomps -Version: 0.1.16 -Release: 2%{?dist} +Version: 0.1.18 +Release: 1%{?dist} Summary: Comps XML file manipulation library License: GPLv2+ URL: https://github.com/rpm-software-management/libcomps Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz -Patch1: 0001-Dont-print-empty-requires.patch BuildRequires: gcc-c++ BuildRequires: cmake @@ -115,6 +114,11 @@ popd %{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info %changelog +* Tue Nov 09 2021 Pavla Kratochvilova - 0.1.18-1 +- Update to 0.1.18 +- Fix issues detected by static analyzers +- Remove Python 2 support + * Fri May 21 2021 Pavla Kratochvilova - 0.1.16-2 - Backport patch: Don't print empty requires