On 12/14/2011 06:00 PM, James Antill wrote: > On Fri, 2011-12-02 at 21:51 +0200, Ville Skyttä wrote: > >> I would like that, yes, but haven't got around to starting it yet. I >> also have a feeling that the CLI code isn't too reusable everywhere so >> some refactoring or copy/pasting would be needed. > > Some of yum-utils (like repoquery) does the: > > import sys > sys.path.insert(0, '/usr/share/yum-cli') > > ...hack, and given that we'd be shipping this with yum itself I see no > reason why we can't do that (we just have to remember to check that we > don't break it).
What I have so far installs a completion helper into /usr/share/yum-cli and the bash completion snippet invokes it directly with a full path, so the cli classes are available to it. That's not a problem. What I meant with the reusability concerns is for example GroupsCommand's "list" stuff which uses cli's returnGroupSummary; it does not actually return its results, it prints them out in a form that requires further parsing, which means it isn't reusable in this context. But I've already found a way around that. _______________________________________________ Yum-devel mailing list [email protected] http://lists.baseurl.org/mailman/listinfo/yum-devel
