Send correct ostree ref to fedmsg
This commit is contained in:
parent
0a2e78d7de
commit
cb25281541
43
0001-ostree-Send-correct-ref-in-the-message.patch
Normal file
43
0001-ostree-Send-correct-ref-in-the-message.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From 5f6dcb37f69734229ce2e94528139640c46583aa Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
|
||||
Date: Wed, 5 Dec 2018 11:20:17 +0100
|
||||
Subject: [PATCH] ostree: Send correct ref in the message
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
If configuration requests a different ref than what treefile has, a
|
||||
wrong message can be sent.
|
||||
|
||||
If the treefile is in JSON, the local copy will be updated in-place and
|
||||
it works. However with YAML the updated version is still written as JSON
|
||||
and thus we are still sending the original value.
|
||||
|
||||
Fixes: https://pagure.io/pungi/issue/1092
|
||||
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
|
||||
---
|
||||
pungi/phases/ostree.py | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/pungi/phases/ostree.py b/pungi/phases/ostree.py
|
||||
index ae8505ac..8bbe4434 100644
|
||||
--- a/pungi/phases/ostree.py
|
||||
+++ b/pungi/phases/ostree.py
|
||||
@@ -93,8 +93,12 @@ class OSTreeThread(WorkerThread):
|
||||
extra_config_file=extra_config_file)
|
||||
|
||||
if compose.notifier:
|
||||
- ref = get_ref_from_treefile(os.path.join(repodir, config['treefile']),
|
||||
- arch, logger=self.pool._logger)
|
||||
+ original_ref = get_ref_from_treefile(
|
||||
+ os.path.join(repodir, config["treefile"]),
|
||||
+ arch,
|
||||
+ logger=self.pool._logger,
|
||||
+ )
|
||||
+ ref = config.get("ostree_ref") or original_ref
|
||||
# 'pungi-make-ostree tree' writes commitid to commitid.log in
|
||||
# logdir, except if there was no new commit we will get None
|
||||
# instead. If the commit id could not be read, an exception will be
|
||||
--
|
||||
2.17.2
|
||||
|
@ -1,12 +1,13 @@
|
||||
Name: pungi
|
||||
Version: 4.1.31
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Distribution compose tool
|
||||
|
||||
Group: Development/Tools
|
||||
License: GPLv2
|
||||
URL: https://pagure.io/pungi
|
||||
Source0: https://pagure.io/releases/%{name}/%{name}-%{version}.tar.bz2
|
||||
Patch0: 0001-ostree-Send-correct-ref-in-the-message.patch
|
||||
|
||||
BuildRequires: python3-nose
|
||||
BuildRequires: python3-mock
|
||||
@ -193,6 +194,9 @@ nosetests-3 --exe
|
||||
%{_bindir}/%{name}-wait-for-signed-ostree-handler
|
||||
|
||||
%changelog
|
||||
* Wed Dec 05 2018 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.31-2
|
||||
- Send correct ostree ref to fedmsg
|
||||
|
||||
* Mon Nov 26 2018 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.31-1
|
||||
- Remove patches keeping old ostree phase ordering
|
||||
- Add script to merge and dump multiple configuration files (lsedlar)
|
||||
|
Loading…
Reference in New Issue
Block a user