[node-patches] Change in ovirt-node[master]: edit-node: Add --update to update packages

fabiand at fedoraproject.org fabiand at fedoraproject.org
Thu Mar 6 12:39:02 UTC 2014


Fabian Deutsch has uploaded a new change for review.

Change subject: edit-node: Add --update to update packages
......................................................................

edit-node: Add --update to update packages

Change-Id: I77bd48746992dd53fe08d74ba4bdd1710e3b8531
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M tools/edit-node
1 file changed, 17 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/70/25470/1

diff --git a/tools/edit-node b/tools/edit-node
index 7c229d2..0dc7e7e 100755
--- a/tools/edit-node
+++ b/tools/edit-node
@@ -879,6 +879,16 @@
         os.system("rm -rf %s" % isodir)
         return
 
+    def _update_pkgs(self, options):
+        self._setup_dns()
+        if not self._setup_yum_repo(options):
+            return False
+        if not self._run_yum_update(options.update.split(",")):
+            return False
+        else:
+            self._cleanup_editing()
+            return True
+
     def _install_pkgs(self, options):
         self._setup_dns()
         if not self._setup_yum_repo(options):
@@ -1300,6 +1310,10 @@
                                                "driver update packages " +
                                                "to install")
 
+    parser.add_option("--update", type="string",
+                      dest="update", help="comma delimited list of packages" +
+                                           " to update (needs --repo)")
+
     parser.add_option("--repo", type="string",
                       dest="repo",
                       help="Specify yum repo file or yum repository on the"
@@ -1501,6 +1515,9 @@
                                       "Package : %s" % options.install_dup)
                         failed = True
                         #raise RuntimeError("Unable to Install Package")
+                if options.update:
+                    print("Updating packages: %s" % options.update)
+                    editor._update_pkgs(options)
                 if not options.password is None:
                     print "Setting Account Passwords"
                     editor._set_password(options)


-- 
To view, visit http://gerrit.ovirt.org/25470
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I77bd48746992dd53fe08d74ba4bdd1710e3b8531
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list