Red Hat Bugzilla – Bug 585190
there is no api documentation for yum
Last modified: 2014-01-21 18:14:29 EST
Description of problem:
There is no api documentation for yum, which really makes writing yumBackend.py for PackageKit hard. Short of looking at the yum code and trying to figure out what it does there are no generated docs for people to use.
If you do happen to find a function, you've got no idea when it was added to the yum codebase, and most of the time what kind of data it returns (triple, list, ?). It also doesn't state if this is a trivial unstable helper function, or something that forms part of the stable API (that I can legitimately use and rely on being there in future releases).
For instance, I want to be able to set the uid for the yum transaction so that the output from yum history to not show "System <unset>" but the users login name. Without reading the code it's impossible to find out what to do. Even after looking at the code I'm none-the-wiser.
Steps to Reproduce:
1. Install yum
2. Look for docs
3. Find none
I'm a pretty competent python programmer now, and if I'm finding this hard, people who just want to use yum are going to find it next to impossible.
In regards to the third paragraph, you need to set the loginuid then audit+yum+blah will all know who the logged in uid is.
I'm also unsure if we could ever document the API to the extent that we would iterate all the system/environment settings we are using in each function.
I have started to make epydoc API documentation.
The plan is to make new doc for every release, so it should be easier to track the API for each release.
Yum is a complex system, and there is many levels of API, so the more advanced stuff is hard to use, if you not track the yum development very closely.