Note that there are some explanatory texts on larger screens.

plurals
  1. PODetermine if package installed with Yum Python API?
    primarykey
    data
    text
    <p><strong>TLDR</strong>; I need simple a Python call given a package name (e.g., 'make') to see if it's installed; if not, install it (I can do the latter part).</p> <p><strong>Problem:</strong></p> <p>So there are a few code examples given in <a href="http://yum.baseurl.org/wiki/YumCodeSnippets">http://yum.baseurl.org/wiki/YumCodeSnippets</a>, but other than kludging around inside ipython and guessing at what each method does, there doesn't appear to be any actual documentation for the Python API for yum. It's apparently all tribal knowledge. </p> <p><strong>[edit]</strong> Apparently I just accidentally discovered the <strong>API documentation</strong> (after receiving an acceptable answer, of course). It's not linked from the main page, but here it is for future reference: <a href="http://yum.baseurl.org/api/yum/">http://yum.baseurl.org/api/yum/</a></p> <p><strong>What I need to do:</strong></p> <p>I have a deployment configuration script that relies on other system packages (make, gcc, etc.). I know I can install them like this: <a href="http://yum.baseurl.org/wiki/YumCodeSnippet/SimplestTransaction">http://yum.baseurl.org/wiki/YumCodeSnippet/SimplestTransaction</a> but I'd like to have the option to query if they're already installed before doing so, so I can have the additional option of simply failing if the packages aren't present instead of forcing installation. What's the proper call to do this (or better, has anyone actually bothered to properly document the API outside of code samples?)</p> <p>I've never touched Python prior to this project, and I'm really liking it, but... some of the module documentation is more elusive than unicorn-riding leprechauns. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload