[anaconda][master][v2][PATCH] Move version detection out of isys
Martin Kolman
mkolman at redhat.com
Mon May 26 13:20:00 UTC 2014
Based on feedback on the first patch, the patch now:
* has a .gitignore entry for the pyanaconda/version.py file
* Makefile.am has been fixed as per dsheas instructions (thanks!) to include the version module
* the version detection code has been moved to a startup_utils module to reduce code duplication
-> the startup utils module has code used during early startup with minimal dependencies
-> version detection is needed in the main anaconda script and for exception handling, so
both places can now use startup_utils and don't need to duplicate the version detection code
* the version detection code now tries to check if the version module is present instead of
just checking for ImportErrors being raised
-> on the other hand, this adds some additional code (versus the simple try-catch used before)
for checking if a module exists
-> but the code is in a self-contained function and might be useful for some other use cases in the future
* the version detection function has been named in such a way to be apparent it always returns a string
-> it returns either a valid version string or "unknown" if version can't be determined
Martin Kolman (1):
Move Anaconda version detection from isys to Python code
.gitignore | 1 +
anaconda | 18 ++++++-----
configure.ac | 1 +
pyanaconda/Makefile.am | 2 +-
pyanaconda/exception.py | 5 +--
pyanaconda/isys/Makefile.am | 4 +--
pyanaconda/isys/__init__.py | 3 --
pyanaconda/isys/isys.c | 6 ----
pyanaconda/startup_utils.py | 77 +++++++++++++++++++++++++++++++++++++++++++++
pyanaconda/version.py.in | 1 +
10 files changed, 95 insertions(+), 23 deletions(-)
create mode 100644 pyanaconda/startup_utils.py
create mode 100644 pyanaconda/version.py.in
--
1.9.0
More information about the anaconda-patches
mailing list