Backport workaround for lack of excludeWeakDeps with EL7 pykickstart

This commit is contained in:
Neal Gompa 2018-11-22 11:22:18 -05:00
parent 74e6de4b76
commit e6aeb2e218
2 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,28 @@
From 4412b55ed2eb6db1180933701b66d7ae4a7fcbd3 Mon Sep 17 00:00:00 2001
From: Pablo Greco <pablo@fliagreco.com.ar>
Date: Thu, 22 Nov 2018 16:12:40 +0000
Subject: [PATCH] Fix excludeWeakdeps for older pykickstart versions
---
imgcreate/kickstart.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/imgcreate/kickstart.py b/imgcreate/kickstart.py
index 1b8ac88..aa587b6 100644
--- a/imgcreate/kickstart.py
+++ b/imgcreate/kickstart.py
@@ -614,7 +614,10 @@ def exclude_docs(ks):
return ks.handler.packages.excludeDocs
def exclude_weakdeps(ks):
- return ks.handler.packages.excludeWeakdeps
+ if hasattr(ks.handler.packages, "excludeWeakdeps"):
+ if ks.handler.packages.excludeWeakdeps:
+ return ks.handler.packages.excludeWeakdeps
+ return None
def nocore(ks):
return ks.handler.packages.nocore
--
2.17.2

View File

@ -17,7 +17,7 @@
Summary: Tools for building live CDs
Name: livecd-tools
Version: 25.0
Release: 13%{?dist}
Release: 14%{?dist}
Epoch: 1
License: GPLv2
Group: System Environment/Base
@ -33,6 +33,8 @@ Patch2: 0001-DNF-3-workaround-a-bug-with-config-values-that-are-l.patch
# Work around same issue again, for DNF 3.6 changes:
# https://github.com/livecd-tools/livecd-tools/pull/108
Patch3: 0001-Handle-dnf-config-option-showing-as-tuple-not-list-i.patch
# Workaround lack of excludeWeakDeps with EL7 pykickstart
Patch4: 0001-Fix-excludeWeakdeps-for-older-pykickstart-versions.patch
%if %{with python2}
BuildRequires: python2-devel
@ -224,6 +226,9 @@ rm -rfv %{buildroot}%{_mandir}/man8/livecd-iso-to-*
%endif
%changelog
* Thu Nov 22 2018 Neal Gompa <ngompa13@gmail.com> - 1:25.0-14
- Backport workaround for lack of excludeWeakDeps with EL7 pykickstart
* Thu Nov 15 2018 Neal Gompa <ngompa13@gmail.com> - 1:25.0-13
- Fix when Python 2 subpackage is obsoleted
- Fix up EL7 support