diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | product.py | 16 |
2 files changed, 15 insertions, 4 deletions
@@ -1,5 +1,8 @@ 2005-10-24 Jeremy Katz <katzj@redhat.com> + * product.py: Allow passing the path to a buildstamp with an + environment variable. Also, allow setting all values with env vars. + * lang-table: Use pl2 keymap (#171583) * ui/anaconda.glade: Make help not visible by default. This fixes diff --git a/product.py b/product.py index 05cc7b495..3c0bff2b7 100644 --- a/product.py +++ b/product.py @@ -16,6 +16,9 @@ if os.access("/tmp/product/.buildstamp", os.R_OK): path = "/tmp/product/.buildstamp" elif os.access("/.buildstamp", os.R_OK): path = "/.buildstamp" +elif os.environ.has_key("PRODBUILDPATH") and \ + os.access(os.environ["PRODBUILDPATH"], os.R_OK): + path = os.environ[PRODBUILDPATH] else: path = None @@ -23,7 +26,7 @@ else: productName = "anaconda" productVersion = "bluesky" productPath = "anaconda" -bugUrl = "your distribution provided bug reporting tool." +bugUrl = "your distribution provided bug reporting tool." if path is not None: f = open(path, "r") @@ -36,6 +39,11 @@ if path is not None: if len(lines) >= 5: bugUrl = lines[4][:-1] - - - +if os.environ.has_key("ANACONDA_PRODUCTNAME"): + productName = os.environ["ANACONDA_PRODUCTNAME"] +if os.environ.has_key("ANACONDA_PRODUCTVERSION"): + productVersion = os.environ["ANACONDA_PRODUCTVERSION"] +if os.environ.has_key("ANACONDA_PRODUCTPATH"): + productPath = os.environ["ANACONDA_PRODUCTPATH"] +if os.environ.has_key("ANACONDA_BUGURL"): + bugUrl = os.environ["ANACONDA_BUGURL"] |