Skip to content

Commit

Permalink
Update uses of product values from anaconda
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirSlavik committed Aug 3, 2023
1 parent 12cd5a5 commit 29fcb28
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions org_fedora_oscap/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
from pyanaconda.core import constants
from pyanaconda.core.dbus import DBus
from pyanaconda.core.constants import PAYLOAD_TYPE_DNF
from pyanaconda.core.product import get_product_short_name, get_product_version
from pyanaconda.modules.common.constants.namespaces import ADDONS_NAMESPACE
from pyanaconda.modules.common.constants.services import NETWORK, PAYLOADS
from pyanaconda.modules.common.structures.packages import PackagesSelectionData
Expand Down Expand Up @@ -85,16 +86,17 @@ def N_(string): return string
# Enable patches that set the content name at package-time
DEFAULT_SSG_CONTENT_NAME = ""
SSG_CONTENT = DEFAULT_SSG_CONTENT_NAME
SHORT_PRODUCT_NAME = get_product_short_name()
if not SSG_CONTENT:
if constants.shortProductName != 'anaconda':
if constants.shortProductName == 'fedora':
if SHORT_PRODUCT_NAME != 'anaconda':
if SHORT_PRODUCT_NAME == 'fedora':
SSG_CONTENT = "ssg-fedora-ds.xml"
else:
SSG_CONTENT = (
"ssg-{name}{version}-ds.xml"
.format(
name=constants.shortProductName,
version=constants.productVersion.strip(".")[0]))
name=SHORT_PRODUCT_NAME,
version=get_product_version().strip(".")[0]))

RESULTS_PATH = utils.join_paths(TARGET_CONTENT_DIR,
"eval_remediate_results.xml")
Expand Down

0 comments on commit 29fcb28

Please sign in to comment.