yumcmd update package resend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

So of course I would forget to attach the patch.

used this patch today to update a package across a few machines we're
managing with func.
added functionality to specify a specific package to update instead of
forcing a blanket update.

- --
- --
Dan Radez, RHCE
System Release Engineer
dradez@xxxxxxxxxx
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkh3v3UACgkQjH+5mc+ED5LfMgCgk9UmCgeqnBpGQfB6EIrjZ8FW
L04An01By3QA+5VNeNakXQQ1BNF+gldQ
=qLk8
-----END PGP SIGNATURE-----
>From 4a47a128093dfe87d531647d61a96917cb2e27f6 Mon Sep 17 00:00:00 2001
From: Dan Radez <dradez@xxxxxxxxxx>
Date: Fri, 11 Jul 2008 13:22:28 -0400
Subject: [PATCH] added logic to update a single specified package via yumcmd update

---
 func/minion/modules/yumcmd.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/func/minion/modules/yumcmd.py b/func/minion/modules/yumcmd.py
index f952372..f06c504 100644
--- a/func/minion/modules/yumcmd.py
+++ b/func/minion/modules/yumcmd.py
@@ -24,14 +24,17 @@ class Yum(func_module.FuncModule):
     api_version = "0.0.1"
     description = "Package updates through yum."
 
-    def update(self):
+    def update(self, pkg=None):
         # XXX support updating specific rpms
         ayum = yum.YumBase()
         ayum.doGenericSetup()
         ayum.doRepoSetup()
         try:
             ayum.doLock()
-            ayum.update()
+            if pkg != None:
+                ayum.update(name=pkg)
+            else:
+                ayum.update()
             ayum.buildTransaction()
             ayum.processTransaction(
                     callback=DummyCallback())
-- 
1.5.5.1

Attachment: 0001-added-logic-to-update-a-single-specified-package-via.patch.sig
Description: Binary data

_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux