import libcomps-0.1.18-1.el8
This commit is contained in:
parent
a62914f41c
commit
bf0f79b3a3
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/libcomps-0.1.16.tar.gz
|
||||
SOURCES/libcomps-0.1.18.tar.gz
|
||||
|
@ -1 +1 @@
|
||||
2837109aca4e610c57e35e43c7cbb0e296cfdaa9 SOURCES/libcomps-0.1.16.tar.gz
|
||||
a05f4e53d6bf80b5ffee70957c946cfaf384cc3c SOURCES/libcomps-0.1.18.tar.gz
|
||||
|
@ -1,46 +0,0 @@
|
||||
From 7c999e57303d9b0afffde7354742988388fade3f Mon Sep 17 00:00:00 2001
|
||||
From: Aleš Matěj <amatej@redhat.com>
|
||||
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("<packagereq type=\"mandatory\" requires=\"\">kernel</packagereq>" in out)
|
||||
+ self.assertTrue("<packagereq type=\"mandatory\">kernel</packagereq>" in out)
|
||||
|
||||
#@unittest.skip("skip")
|
||||
class DictTest(unittest.TestCase):
|
||||
--
|
||||
libgit2 1.0.1
|
||||
|
@ -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 <pkratoch@redhat.com> - 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 <pkratoch@redhat.com> - 0.1.16-2
|
||||
- Backport patch: Don't print empty requires
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user