Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update anaconda variables source
Browse files Browse the repository at this point in the history
Anaconda IsFinal property use to be processed out of ANACONDA_ISFINAL
environmental variable. This commit changes this behaviour to use
RELEASE_TYPE variable out of /etc/os-release instead.

Related change in Fedora spec file:
- https://src.fedoraproject.org/rpms/fedora-release/pull-request/347

Resolves: INSTALLER-4068
elkoniu committed Jan 31, 2025
1 parent eb0aca5 commit ea36cd9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion pyanaconda/core/product.py
Original file line number Diff line number Diff line change
@@ -80,7 +80,17 @@ def get_product_values():
# .buildstamp, environment, stupid last ditch hardcoded defaults.
config = configparser.ConfigParser()
config.add_section("Main")
config.set("Main", "IsFinal", os.environ.get("ANACONDA_ISFINAL", "false"))

# Get IsFinal property from /etc/os-release file
with open('/etc/os-release') as file:
for line in file:
key, value = line.split('=')
if key == 'RELEASE_TYPE':
if value == 'release':
config.set("Main", "IsFinal", True))
else:
config.set("Main", "IsFinal", False))

config.set("Main", "Product", os.environ.get("ANACONDA_PRODUCTNAME", "anaconda"))
config.set("Main", "Version", os.environ.get("ANACONDA_PRODUCTVERSION", "bluesky"))

0 comments on commit ea36cd9

Please sign in to comment.