From 1bd2c378d3ec3cf690152ea15dc3bc61eae5c76e Mon Sep 17 00:00:00 2001 From: cherry530 Date: Tue, 8 Feb 2022 16:01:26 +0800 Subject: [PATCH] Fix incorrect usage of the fail_unless macro Signed-off-by: cherry530 (cherry picked from commit 7389d8c020f08d5bed3ee416dab393d34c15c369) --- ...rrect-usage-of-the-fail_unless-macro.patch | 36 +++++++++++++++++++ rpm-ostree.spec | 9 ++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 Fix-incorrect-usage-of-the-fail_unless-macro.patch diff --git a/Fix-incorrect-usage-of-the-fail_unless-macro.patch b/Fix-incorrect-usage-of-the-fail_unless-macro.patch new file mode 100644 index 0000000..f147029 --- /dev/null +++ b/Fix-incorrect-usage-of-the-fail_unless-macro.patch @@ -0,0 +1,36 @@ +From 4f3f747cdf3e5d7ab0dadc4f25bca56fb16ce923 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hr=C3=A1zk=C3=BD?= +Date: Thu, 6 Aug 2020 10:59:59 +0200 +Subject: [PATCH] tests: Fix incorrect usage of the fail_unless macro + +--- +libdnf/tests/hawkey/test_query.cpp | 2 +- +libdnf/tests/hawkey/test_sack.cpp | 2 +- +2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libdnf/tests/hawkey/test_query.cpp b/libdnf/tests/hawkey/test_query.cpp +index bf9626a..4235681 100644 +--- a/libdnf/tests/hawkey/test_query.cpp ++++ b/libdnf/tests/hawkey/test_query.cpp +@@ -303,7 +303,7 @@ START_TEST(test_query_pkg) + hy_query_filter(q, HY_PKG_NAME, HY_EQ, "jay"); + pset = hy_query_run_set(q); + hy_query_free(q); +- fail_unless(dnf_packageset_count(pset), 2); ++ fail_unless(dnf_packageset_count(pset) == 2); + + // use hy_query_filter_package_in(): + q = hy_query_create(test_globals.sack); +diff --git a/libdnf/tests/hawkey/test_sack.cpp b/libdnf/tests/hawkey/test_sack.cpp +index 2bb67f4..e5ed31b 100644 +--- a/libdnf/tests/hawkey/test_sack.cpp ++++ b/libdnf/tests/hawkey/test_sack.cpp +@@ -84,7 +84,7 @@ START_TEST(test_list_arches) + const char ** arches = dnf_sack_list_arches(sack); + + /* noarch, x86_64, athlon, i686, i586, i486, i386 */ +- fail_unless(g_strv_length((gchar**)arches), 7); ++ fail_unless(g_strv_length((gchar**)arches) == 7); + ck_assert_str_eq(arches[3], "i686"); + + g_free(arches); diff --git a/rpm-ostree.spec b/rpm-ostree.spec index 248eb24..b780e29 100644 --- a/rpm-ostree.spec +++ b/rpm-ostree.spec @@ -4,13 +4,14 @@ Name: rpm-ostree Version: 2018.8 -Release: 4 +Release: 5 Summary: Hybrid image/package system License: LGPLv2+ URL: https://github.com/projectatomic/rpm-ostree Source0: https://github.com/coreos/rpm-ostree/archive/v%{version}.tar.xz#/%{name}-%{version}.tar.xz Patch0: eliminate-rpmostree-differences.patch +Patch1: Fix-incorrect-usage-of-the-fail_unless-macro.patch %if %{with rust} @@ -110,6 +111,12 @@ echo "%{_libdir}/%{name}" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf %{_mandir}/man*/* %changelog +* Tue Feb 08 2022 xu_ping - 2018.8-5 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: Fix incorrect usage of the fail_unless macro + * Fri Sep 10 2021 gaihuiying - 2018.8-4 - Type:bugfix - ID:NA