diff options
| author | Alex Wood <awood@redhat.com> | 2008-07-24 17:41:53 -0400 |
|---|---|---|
| committer | Alex Wood <awood@redhat.com> | 2008-07-24 17:41:53 -0400 |
| commit | 8f258ef2172ea299beb8fe0e2639fa84f9fff960 (patch) | |
| tree | acdd27b7d6ebc8c8cdf10a6dd0f74b147948e90b /func | |
| parent | da9114829f58ca88b012093130d6a93637b4e534 (diff) | |
| download | func-8f258ef2172ea299beb8fe0e2639fa84f9fff960.tar.gz func-8f258ef2172ea299beb8fe0e2639fa84f9fff960.tar.xz func-8f258ef2172ea299beb8fe0e2639fa84f9fff960.zip | |
Previously the update method returned true even if yum didn't actually update.
Now it returns the list of packages updated.
Diffstat (limited to 'func')
| -rw-r--r-- | func/minion/modules/yumcmd.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/func/minion/modules/yumcmd.py b/func/minion/modules/yumcmd.py index 3f30ec9..0048fc6 100644 --- a/func/minion/modules/yumcmd.py +++ b/func/minion/modules/yumcmd.py @@ -26,23 +26,22 @@ class Yum(func_module.FuncModule): description = "Package updates through yum." def update(self, pkg=None): - # XXX support updating specific rpms ayum = yum.YumBase() ayum.doGenericSetup() ayum.doRepoSetup() try: ayum.doLock() if pkg != None: - ayum.update(name=pkg) + tx_result = ayum.update(name=pkg) else: - ayum.update() + tx_result = ayum.update() ayum.buildTransaction() ayum.processTransaction( callback=DummyCallback()) finally: ayum.closeRpmDB() ayum.doUnlock() - return True + return map(str, tx_result) def check_update(self, filter=[], repo=None): """Returns a list of packages due to be updated |
