TL; DR ; I need a simple Python call with the package name (for example, "make") to find out if it is installed; if not, install it (I can do the last part).
Problem:
So, there are a few code examples provided at http://yum.baseurl.org/wiki/YumCodeSnippets , but besides the fact that they are hidden inside ipython and guess what each method does, it doesnβt appear to be any actual documentation for the Python API for yum. Apparently, this is all tribal knowledge.
[edit] Apparently, I accidentally discovered the API documentation (after receiving an acceptable answer, of course). It is not linked to the homepage, but here it is for future reference: http://yum.baseurl.org/api/yum/
What do I need to do:
I have a script deployment configuration that relies on other system packages (make, gcc, etc.). I know that I can install them as follows: http://yum.baseurl.org/wiki/YumCodeSnippet/SimplestTransaction , but I would like to be able to request if they are already installed before that, so I can have the additional possibility of just crashing, if packages are not present, and do not force installation. What is the proper call for this (or, better, did anyone really bother to correctly document the API outside of the code samples?)
I never touched Python before this project, and I really like it, but ... some of the module documentation is more elusive than swans with a unicorn.
python linux rpm yum
Aaron burke
source share