import libcomps-0.1.16-2.el8
This commit is contained in:
parent
d6beea75a3
commit
6354773b8f
46
SOURCES/0001-Dont-print-empty-requires.patch
Normal file
46
SOURCES/0001-Dont-print-empty-requires.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
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
|
||||||
|
|
@ -2,12 +2,13 @@
|
|||||||
|
|
||||||
Name: libcomps
|
Name: libcomps
|
||||||
Version: 0.1.16
|
Version: 0.1.16
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Comps XML file manipulation library
|
Summary: Comps XML file manipulation library
|
||||||
|
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: https://github.com/rpm-software-management/libcomps
|
URL: https://github.com/rpm-software-management/libcomps
|
||||||
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||||
|
Patch1: 0001-Dont-print-empty-requires.patch
|
||||||
|
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
@ -114,6 +115,9 @@ popd
|
|||||||
%{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info
|
%{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri May 21 2021 Pavla Kratochvilova <pkratoch@redhat.com> - 0.1.16-2
|
||||||
|
- Backport patch: Don't print empty requires
|
||||||
|
|
||||||
* Fri Apr 30 2021 Pavla Kratochvilova <pkratoch@redhat.com> - 0.1.16-1
|
* Fri Apr 30 2021 Pavla Kratochvilova <pkratoch@redhat.com> - 0.1.16-1
|
||||||
- Update to 0.1.16
|
- Update to 0.1.16
|
||||||
- Make inline function __comps_objmrtree_all also static (RhBug:1793424)
|
- Make inline function __comps_objmrtree_all also static (RhBug:1793424)
|
||||||
|
Loading…
Reference in New Issue
Block a user