rust/treefile: Fix has_modules_enable check
Signed-off-by: chenmaodong <chenmaodong@xfusion.com>
This commit is contained in:
parent
84be889dac
commit
8b8eb9ca91
@ -0,0 +1,26 @@
|
|||||||
|
From 0b2f5f0533def11cf38c6b86b7ee6b10aa28123c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jonathan Lebon <jonathan@jlebon.com>
|
||||||
|
Date: Thu, 21 Apr 2022 13:06:20 -0400
|
||||||
|
Subject: [PATCH] rust/treefile: Fix has_modules_enable() check
|
||||||
|
|
||||||
|
We need to check that the set is actually non-empty.
|
||||||
|
---
|
||||||
|
rust/src/treefile.rs | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/rust/src/treefile.rs b/rust/src/treefile.rs
|
||||||
|
index dfc8fbc0..884e33f7 100644
|
||||||
|
--- a/rust/src/treefile.rs
|
||||||
|
+++ b/rust/src/treefile.rs
|
||||||
|
@@ -863,7 +863,7 @@ impl Treefile {
|
||||||
|
self.parsed
|
||||||
|
.modules
|
||||||
|
.as_ref()
|
||||||
|
- .map(|m| m.enable.is_some())
|
||||||
|
+ .map(|m| m.enable.as_ref().map(|e| !e.is_empty()).unwrap_or_default())
|
||||||
|
.unwrap_or_default()
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
||||||
@ -4,12 +4,13 @@
|
|||||||
|
|
||||||
Name: rpm-ostree
|
Name: rpm-ostree
|
||||||
Version: 2022.8
|
Version: 2022.8
|
||||||
Release: 3
|
Release: 4
|
||||||
Summary: Hybrid image/package system
|
Summary: Hybrid image/package system
|
||||||
License: Apache-2.0 or MIT and GPL-2.0-or-later and LGPL-2.0-or-later
|
License: Apache-2.0 or MIT and GPL-2.0-or-later and LGPL-2.0-or-later
|
||||||
URL: https://github.com/coreos/rpm-ostree
|
URL: https://github.com/coreos/rpm-ostree
|
||||||
Source0: https://github.com/coreos/rpm-ostree/releases/download/v2022.8/%{name}-%{version}.tar.xz
|
Source0: https://github.com/coreos/rpm-ostree/releases/download/v2022.8/%{name}-%{version}.tar.xz
|
||||||
Patch0: fix-compose-err.patch
|
Patch0: fix-compose-err.patch
|
||||||
|
Patch1: backport-0001-rust-treefile-Fix-has_modules_enable-check.patch
|
||||||
%if %{with rust}
|
%if %{with rust}
|
||||||
|
|
||||||
%if !%{defined rust_arches}
|
%if !%{defined rust_arches}
|
||||||
@ -114,6 +115,9 @@ install -pm 0644 src/daemon/org.projectatomic.rpmostree1.conf %{buildroot}/etc/d
|
|||||||
%{_mandir}/man*/*
|
%{_mandir}/man*/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Dec 29 2022 chenmaodong <chenmaodong@xfusion.com> - 2022.8-4
|
||||||
|
- Fix has_modules_enable() check
|
||||||
|
|
||||||
* Mon Oct 10 2022 fushanqing <fushanqing@kylinos.cn> - 2022.8-3
|
* Mon Oct 10 2022 fushanqing <fushanqing@kylinos.cn> - 2022.8-3
|
||||||
- add fix-compose-err.patch
|
- add fix-compose-err.patch
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user