Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
5e4f753fce
!21 backport patch from upstream
From: @zhangruifang2020 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2024-08-09 09:29:46 +00:00
zhangruifang2020
ed5622c590 backport patch from upstream 2024-08-01 20:18:02 +08:00
openeuler-ci-bot
ba528fe723
!16 update version to 0.1.19
From: @fly_fzc 
Reviewed-by: @lvying6 
Signed-off-by: @lvying6
2023-01-29 01:38:15 +00:00
fly_fzc
4f621c09b5 update version to 0.1.19 2023-01-28 17:18:40 +08:00
openeuler-ci-bot
596e2b3d7f
!15 【轻量级 PR】:Rebuild for next release
From: @dongyuzhen 
Reviewed-by: @xiezhipeng1 
Signed-off-by: @xiezhipeng1
2022-11-01 09:16:44 +00:00
dongyuzhen
02a66e1fb9
update for mass rebuild and upgrade verification 2022-10-29 03:27:14 +00:00
openeuler-ci-bot
a81d194703
!11 update to 0.1.18
From: @wangchen2020 
Reviewed-by: @xiezhipeng1 
Signed-off-by: @xiezhipeng1
2022-02-15 03:39:19 +00:00
wangchen2020
2ab0f514f2 update to 0.1.18 2021-12-31 14:26:05 +08:00
openeuler-ci-bot
b8ab69ef6f !7 add yaml file
Merge pull request !7 from Hugel/master
2020-08-11 11:32:32 +08:00
Hugel
c2abcd87ba add yaml file 2020-08-11 11:09:33 +08:00
5 changed files with 119 additions and 4 deletions

BIN
0.1.19.tar.gz Normal file

Binary file not shown.

View File

@ -0,0 +1,88 @@
From 2899e8e49f9cbab70661e8ddf2c3ff743ffa97c2 Mon Sep 17 00:00:00 2001
From: Pavla Kratochvilova <pkratoch@redhat.com>
Date: Thu, 5 Oct 2023 10:43:16 +0200
Subject: [PATCH] tests: Don't print parsing errors during tests
The tests are unnecessarily chatty and print many errors that are actually
expected. In case of unexpected errors, it wouldn't print all of them
anyway, and would need to be enabled, since there are other parsers
initialized to not print the logs.
---
libcomps/tests/check_comps.c | 2 +-
libcomps/tests/check_parse.c | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/libcomps/tests/check_comps.c b/libcomps/tests/check_comps.c
index 1455734..e14fd43 100644
--- a/libcomps/tests/check_comps.c
+++ b/libcomps/tests/check_comps.c
@@ -595,7 +595,7 @@ START_TEST(test_doc_defaults) {
tmp = comps2xml_str(doc, NULL, NULL);
//printf("tmp %s\n", tmp);
parsed = comps_parse_parsed_create();
- fail_if(comps_parse_parsed_init(parsed, "UTF-8", 1) == 0);
+ fail_if(comps_parse_parsed_init(parsed, "UTF-8", 0) == 0);
comps_parse_str(parsed, tmp, NULL);
doc2 = parsed->comps_doc;
groups = comps_doc_groups(doc2);
diff --git a/libcomps/tests/check_parse.c b/libcomps/tests/check_parse.c
index e5935e1..cfa721c 100644
--- a/libcomps/tests/check_parse.c
+++ b/libcomps/tests/check_parse.c
@@ -72,7 +72,7 @@ START_TEST(test_comps_parse1)
fprintf(stderr, "## Running test_parse1\n\n");
parsed = comps_parse_parsed_create();
- fail_if(comps_parse_parsed_init(parsed, "UTF-8", 1) == 0);
+ fail_if(comps_parse_parsed_init(parsed, "UTF-8", 0) == 0);
fp = fopen("sample-comps.xml", "r");
@@ -171,7 +171,7 @@ START_TEST(test_comps_parse1)
comps_parse_parsed_destroy(parsed);
parsed = comps_parse_parsed_create();
- fail_if(comps_parse_parsed_init(parsed, "UTF-8", 1) == 0);
+ fail_if(comps_parse_parsed_init(parsed, "UTF-8", 0) == 0);
comps_parse_file(parsed, fp, NULL);
ret = comps_parse_validate_dtd("sample-bad-elem.xml", "comps.dtd");
fail_if(ret >0, "XML shouldn't be valid. Validation returned: %d", ret);
@@ -280,7 +280,7 @@ START_TEST(test_comps_parse2)
// COMPS_ERR_ELEM_REQUIRED, 1201, 2, 0);
parsed = comps_parse_parsed_create();
- fail_if(comps_parse_parsed_init(parsed, "UTF-8", 1) == 0);
+ fail_if(comps_parse_parsed_init(parsed, "UTF-8", 0) == 0);
fp = fopen("sample_comps.xml", "r");
comps_parse_file(parsed, fp, NULL);
@@ -320,7 +320,7 @@ START_TEST(test_comps_parse3)
comps_num(188), comps_num(2));
parsed = comps_parse_parsed_create();
- fail_if(comps_parse_parsed_init(parsed, "UTF-8", 1) == 0);
+ fail_if(comps_parse_parsed_init(parsed, "UTF-8", 0) == 0);
fp = fopen("sample_comps_bad1.xml", "r");
comps_parse_file(parsed, fp, NULL);
@@ -413,7 +413,7 @@ START_TEST(test_comps_parse4)
comps_num(1244), comps_num(4));
parsed = comps_parse_parsed_create();
- fail_if(comps_parse_parsed_init(parsed, "UTF-8", 1) == 0);
+ fail_if(comps_parse_parsed_init(parsed, "UTF-8", 0) == 0);
fp = fopen("sample_comps_bad2.xml", "r");
comps_parse_file(parsed, fp, NULL);
@@ -446,7 +446,7 @@ START_TEST(test_comps_parse5)
comps_num(2));
parsed = comps_parse_parsed_create();
- fail_if(comps_parse_parsed_init(parsed, "UTF-8", 1) == 0);
+ fail_if(comps_parse_parsed_init(parsed, "UTF-8", 0) == 0);
fp = fopen("sample_comps_bad3.xml", "r");
comps_parse_file(parsed, fp, NULL);
//comps_log_print(parsed->log);
--
2.33.0

Binary file not shown.

View File

@ -1,10 +1,12 @@
Name: libcomps
Version: 0.1.15
Release: 1
Version: 0.1.19
Release: 2
Summary: Comps XML file manipulation library
License: GPLv2+
URL: https://github.com/rpm-software-management/libcomps
Source0: %{url}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz
Source0: %{url}/archive/refs/tags/%{version}.tar.gz
Patch6000: backport-tests-Don-t-print-parsing-errors-during-tests.patch
BuildRequires: gcc gcc-c++ cmake zlib-devel libxml2-devel check-devel expat-devel
@ -40,7 +42,7 @@ Obsoletes: platform-python-%{name} < %{version}-%{release}
Python3 bindings for libcomps library.
%prep
%autosetup -n %{name}-%{name}-%{version} -p1
%autosetup -n %{name}-%{version} -p1
%build
mkdir build-py3
@ -89,6 +91,27 @@ popd
%{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info
%changelog
* Thu Aug 01 2024 zhangruifang <zhangruifang@h-partners.com> - 0.1.19-2
- backport patch from upstream
* Sat Jan 28 2023 fuanan <fuanan3@h-partners.com> - 0.1.19-1
- Type:update
- ID:NA
- SUG:NA
- DESC:update version to 0.1.19
* Sat Oct 29 2022 dongyuzhen <dongyuzhen@h-partners.com> - 0.1.18-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Rebuild for next release
* Fri Dec 31 2021 wangchen <wangchen137@huawei.com> - 0.1.18-1
- Type:requirement
- ID:NA
- SUG:NA
- DESC:update to 0.1.18
* Tue Apr 28 2020 zhouyihang <zhouyihang3@huawei.com> - 0.1.15-1
- Type:requirement
- ID:NA

4
libcomps.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: rpm-software-management/libcomps
tag_prefix: "^libcomps-"
seperator: "."