|
|
fd2bce |
From 046b160cfce6521c2a126cad267a2b43a54b50db Mon Sep 17 00:00:00 2001
|
|
|
fd2bce |
From: Vratislav Podzimek <vpodzime@redhat.com>
|
|
|
fd2bce |
Date: Mon, 6 Jul 2015 15:01:15 +0200
|
|
|
fd2bce |
Subject: [PATCH 8/9] Do not output redundant/invalid fields for the SSG
|
|
|
fd2bce |
content (#1240285)
|
|
|
fd2bce |
|
|
|
fd2bce |
The SSG content is specific and it doesn't require xccdf-path nor content-url
|
|
|
fd2bce |
fields in the kickstart. Thus we should avoid putting them into the output that
|
|
|
fd2bce |
may be later used as an input for more installations.
|
|
|
fd2bce |
|
|
|
fd2bce |
Signed-off-by: Vratislav Podzimek <vpodzime@redhat.com>
|
|
|
fd2bce |
---
|
|
|
fd2bce |
org_fedora_oscap/ks/oscap.py | 5 +++--
|
|
|
fd2bce |
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
fd2bce |
|
|
|
fd2bce |
diff --git a/org_fedora_oscap/ks/oscap.py b/org_fedora_oscap/ks/oscap.py
|
|
|
fd2bce |
index d0c39b8..475aa2c 100644
|
|
|
fd2bce |
--- a/org_fedora_oscap/ks/oscap.py
|
|
|
fd2bce |
+++ b/org_fedora_oscap/ks/oscap.py
|
|
|
fd2bce |
@@ -108,13 +108,14 @@ class OSCAPdata(AddonData):
|
|
|
fd2bce |
|
|
|
fd2bce |
ret = "%%addon %s" % self.name
|
|
|
fd2bce |
ret += "\n%s" % key_value_pair("content-type", self.content_type)
|
|
|
fd2bce |
- ret += "\n%s" % key_value_pair("content-url", self.content_url)
|
|
|
fd2bce |
|
|
|
fd2bce |
+ if self.content_url:
|
|
|
fd2bce |
+ ret += "\n%s" % key_value_pair("content-url", self.content_url)
|
|
|
fd2bce |
if self.datastream_id:
|
|
|
fd2bce |
ret += "\n%s" % key_value_pair("datastream-id", self.datastream_id)
|
|
|
fd2bce |
if self.xccdf_id:
|
|
|
fd2bce |
ret += "\n%s" % key_value_pair("xccdf-id", self.xccdf_id)
|
|
|
fd2bce |
- if self.xccdf_path:
|
|
|
fd2bce |
+ if self.xccdf_path and self.content_type != "scap-security-guide":
|
|
|
fd2bce |
ret += "\n%s" % key_value_pair("xccdf-path", self.xccdf_path)
|
|
|
fd2bce |
if self.cpe_path:
|
|
|
fd2bce |
ret += "\n%s" % key_value_pair("cpe-path", self.cpe_path)
|
|
|
fd2bce |
--
|
|
|
fd2bce |
2.4.3
|
|
|
fd2bce |
|