Blame SOURCES/no_profile_no_ks_section_1241395.patch

fd2bce
From b9461ffa94293b0c75a62f08fdb751dca1c3c6b0 Mon Sep 17 00:00:00 2001
fd2bce
From: Vratislav Podzimek <vpodzime@redhat.com>
fd2bce
Date: Tue, 21 Jul 2015 16:35:34 +0200
fd2bce
Subject: [PATCH 4/7] Only output the kickstart section with content and
fd2bce
 profile set
fd2bce
fd2bce
There may be a default content used (e.g. the SCAP Security Guide) with no
fd2bce
profile selected. Nothing related to the addon should appear in the resulting
fd2bce
kickstart in such case.
fd2bce
fd2bce
Resolves: rhbz#1241395
fd2bce
Signed-off-by: Vratislav Podzimek <vpodzime@redhat.com>
fd2bce
---
fd2bce
 org_fedora_oscap/ks/oscap.py | 2 +-
fd2bce
 1 file changed, 1 insertion(+), 1 deletion(-)
fd2bce
fd2bce
diff --git a/org_fedora_oscap/ks/oscap.py b/org_fedora_oscap/ks/oscap.py
fd2bce
index 1a185d5..8352236 100644
fd2bce
--- a/org_fedora_oscap/ks/oscap.py
fd2bce
+++ b/org_fedora_oscap/ks/oscap.py
fd2bce
@@ -110,7 +110,7 @@ class OSCAPdata(AddonData):
fd2bce
 
fd2bce
         """
fd2bce
 
fd2bce
-        if self.dry_run:
fd2bce
+        if self.dry_run or not self.profile_id:
fd2bce
             # the addon was run in the dry run mode, omit it from the kickstart
fd2bce
             return ""
fd2bce
 
fd2bce
-- 
fd2bce
2.4.3
fd2bce