[node-patches] Change in ovirt-node[master]: prevent file error when building manifest for local rpm
jboggs at redhat.com
jboggs at redhat.com
Wed Aug 29 16:48:02 UTC 2012
Joey Boggs has uploaded a new change for review.
Change subject: prevent file error when building manifest for local rpm
......................................................................
prevent file error when building manifest for local rpm
Change-Id: Ib2c985b1ab1d659f14dc181e09d771ece658c1c4
Signed-off-by: Joey Boggs <jboggs at redhat.com>
---
M tools/edit-node
1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/87/7587/1
diff --git a/tools/edit-node b/tools/edit-node
index 7f15117..1b842f3 100755
--- a/tools/edit-node
+++ b/tools/edit-node
@@ -757,6 +757,11 @@
f = subprocess.Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT, \
preexec_fn = self._chroot)
install_date, err = f.communicate()
+ if os.path.isfile(pkg):
+ #get rpm name
+ cmd = "rpm -qp %s --qf '%%{name}'" % pkg
+ f = subprocess.Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT)
+ pkg, err = f.communicate()
plugin_file = "%s/%s" % (plugin_info_dir, pkg)
pfile = open(plugin_file, "w")
pfile.write("Name:%s\n" % pkg)
@@ -1410,7 +1415,7 @@
elif options.printmanifests:
editor._print_manifests(LiveOS)
mount = False
- elif options.repo is None and len(p) > 0:
+ elif options.repo is None and len(p) < 0:
print "An Editing Option Must Be Specified"
return False
# only mount rootfs as required since it's not necesary for all operations
--
To view, visit http://gerrit.ovirt.org/7587
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2c985b1ab1d659f14dc181e09d771ece658c1c4
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Joey Boggs <jboggs at redhat.com>
More information about the node-patches
mailing list