From e49fddbf8e09440f4177b2b04a8e42302637294c Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Fri, 22 Jun 2018 13:42:31 -0400 Subject: [PATCH] Fix buildopts property not being initialized --- ...d.props.buildopts-at-object-creation.patch | 32 +++++++++++++++++++ libmodulemd.spec | 8 +++-- 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 0001-Allocate-Modulemd.props.buildopts-at-object-creation.patch diff --git a/0001-Allocate-Modulemd.props.buildopts-at-object-creation.patch b/0001-Allocate-Modulemd.props.buildopts-at-object-creation.patch new file mode 100644 index 0000000..7f2a717 --- /dev/null +++ b/0001-Allocate-Modulemd.props.buildopts-at-object-creation.patch @@ -0,0 +1,32 @@ +From 0039d41002629342e245d43350702b502aabe3f1 Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Fri, 22 Jun 2018 13:26:01 -0400 +Subject: [PATCH] Allocate Modulemd.props.buildopts at object creation + +Resolves: https://github.com/fedora-modularity/libmodulemd/issues/72 + +Signed-off-by: Stephen Gallagher +--- + modulemd/modulemd-module.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modulemd/modulemd-module.c b/modulemd/modulemd-module.c +index 9eb391a4ff82f4b1b2f660276cb3f46962f774b7..49c4818a9130c7af31d4abf0cbbb898f06d779a3 100644 +--- a/modulemd/modulemd-module.c ++++ b/modulemd/modulemd-module.c +@@ -3460,10 +3460,12 @@ modulemd_module_class_init (ModulemdModuleClass *klass) + + static void + modulemd_module_init (ModulemdModule *self) + { + /* Allocate the members */ ++ self->buildopts = modulemd_buildopts_new (); ++ + self->buildrequires = + g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); + + self->module_components = + g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref); +-- +2.17.1 + diff --git a/libmodulemd.spec b/libmodulemd.spec index 82b4cd4..307a17c 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -6,7 +6,7 @@ Name: libmodulemd Version: %{majorminorversion}%{?patchversion:.%{patchversion}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Module metadata manipulation library License: MIT @@ -22,7 +22,8 @@ BuildRequires: pkgconfig(gtk-doc) BuildRequires: python3-gobject-base # Patches - +# Address https://pagure.io/fedora-release/pull-request/145 +Patch0001: 0001-Allocate-Modulemd.props.buildopts-at-object-creation.patch %description C Library for manipulating module metadata files. @@ -71,6 +72,9 @@ export LC_CTYPE=C.utf8 %{_datadir}/gtk-doc/html/modulemd/ %changelog +* Fri Jun 22 2018 Stephen Gallagher - 1.5.1-2 +- Fix buildopts property not being initialized + * Tue Jun 19 2018 Stephen Gallagher - 1.5.1-1 - Update to version 1.5.1 - Re-enable build-time tests