diff options
author | Jeremy Katz <katzj@redhat.com> | 2005-10-24 21:07:02 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2005-10-24 21:07:02 +0000 |
commit | 8c242145781410fb460f1cc26ab23283bf0e0091 (patch) | |
tree | e7c10d06751c585b873056a9c6e4627da43ff4cb | |
parent | ccbc20eebea494a84a8917a6f63dd06378f6ae17 (diff) | |
download | anaconda-8c242145781410fb460f1cc26ab23283bf0e0091.tar.gz anaconda-8c242145781410fb460f1cc26ab23283bf0e0091.tar.xz anaconda-8c242145781410fb460f1cc26ab23283bf0e0091.zip |
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.
-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"] |