[node-patches] Change in ovirt-node[master]: edit-node: shown correct info for files ovirt-node-plugin-xx...
jboggs at redhat.com
jboggs at redhat.com
Thu Jun 27 16:17:04 UTC 2013
Hello hadong,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/16210
to review the following change.
Change subject: edit-node: shown correct info for files ovirt-node-plugin-xxx and delta-manifest-rpm/srpm/file.txt
......................................................................
edit-node: shown correct info for files ovirt-node-plugin-xxx and delta-manifest-rpm/srpm/file.txt
Previously after install some plugin, shown error info for file
"ovirt-node-plugin-xxx" and null info for these files "delta-manifest
-rpm/srpm/file.txt"
Now shown correct info for them.
This also adds in missing manifest-{deps,owns}
Change-Id: Ia07182a46e2c6cf91fb0fa3d497b0b4929ab286c
Signed-off-by: hadong <hadong0720 at gmail.com>
Signed-off-by: Joey Boggs <jboggs at redhat.com>
---
M tools/edit-node
1 file changed, 22 insertions(+), 12 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/10/16210/1
diff --git a/tools/edit-node b/tools/edit-node
index 2b78c83..7d2f961 100755
--- a/tools/edit-node
+++ b/tools/edit-node
@@ -754,24 +754,22 @@
pkg = "password-set"
print "Creating Manifests"
# Create post-image processing manifests
- cmd = "LC_ALL=C rpm -qa --qf '%%{name}-%%{version}-%%{release}.'" \
- "'%%{arch} (%%{SIGPGP:pgpsig})\n' | sort -u > " \
- "/manifest-%s-rpm.txt" % pkg
+ cmd = "LC_ALL=C rpm -qa --qf '%{name}-%{version}-%{release}." \
+ "%{arch} (%{SIGPGP:pgpsig})\n' | sort -u > " \
+ "/manifest-rpm.txt"
f = subprocess.Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT,
preexec_fn=self._chroot)
output, err = f.communicate()
- cmd = "LC_ALL=C rpm -qa --qf '%%{sourcerpm}\n' | sort -u > " \
+ cmd = "LC_ALL=C rpm -qa --qf '%{sourcerpm}\n' | sort -u > " \
"/manifest-srpm.txt"
f = subprocess.Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT,
preexec_fn=self._chroot)
output, err = f.communicate()
# collect all included licenses rhbz#601927
- cmd = "LC_ALL=C rpm -qa --qf '%%{license}\n' | sort -u > " \
+ cmd = "LC_ALL=C rpm -qa --qf '%{license}\n' | sort -u > " \
"/manifest-license.txt"
- cmd = "LC_ALL=C rpm -qa --qf '%%{license}\n' | sort -u > " \
- "/manifest-%s-%s-license.txt" % (timestamp, pkg)
f = subprocess.Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT,
preexec_fn=self._chroot)
output, err = f.communicate()
@@ -782,6 +780,17 @@
output, err = f.communicate()
cmd = "du -x --exclude=/var/cache/yum / > /manifest-dir.txt"
+ f = subprocess.Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT,
+ preexec_fn=self._chroot)
+ output, err = f.communicate()
+
+ cmd = "find / -xdev |sed \"s#\$#\\t\\t\\tNot owned by any package#\"" \
+ "| sort -u -k1,1 | sed \"s#\\t\\t\\t#\\n#\" > /manifest-owns.txt"
+ f = subprocess.Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT,
+ preexec_fn=self._chroot)
+ output, err = f.communicate()
+
+ cmd = "rpm -qa | xargs -n1 rpm -e --test 2> /manifest-deps.txt"
f = subprocess.Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT,
preexec_fn=self._chroot)
output, err = f.communicate()
@@ -840,12 +849,13 @@
output, err = f.communicate()
else:
cmd = "bzcat %s/iso/isolinux/manifest-%s.txt.bz2|sort > " \
- "%s/manifest-%s.txt" % \
+ "%s/manifest-tmp-%s.txt" % \
(self._ImageCreator__builddir, i, self._instroot, i)
f = subprocess.Popen(cmd, shell=True, stdout=PIPE,
stderr=STDOUT)
output, err = f.communicate()
- cmd = "diff -u /manifest-%s.txt /manifest-%s.txt | egrep" \
+
+ cmd = "diff -u /manifest-tmp-%s.txt /manifest-%s.txt | egrep" \
" -v \"^@|^ \"> /delta-manifest-%s.txt" % \
(i, i, i)
f = subprocess.Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT,
@@ -855,19 +865,19 @@
if os.path.exists("%s/iso/isolinux/current-manifest-%s.txt" %
(self._ImageCreator__builddir, i)):
cmd = "cat %s/iso/isolinux/current-manifest-%s.txt|sort -u " \
- "> %s/manifest-%s.txt" % \
+ "> %s/manifest-tmp-%s.txt" % \
(self._ImageCreator__builddir, i, self._instroot, i)
f = subprocess.Popen(cmd, shell=True, stdout=PIPE,
stderr=STDOUT)
output, err = f.communicate()
else:
cmd = "cat %s/iso/isolinux/manifest-%s.txt|sort -u >" \
- " %s/manifest-%s.txt" % \
+ " %s/manifest-tmp-%s.txt" % \
(self._ImageCreator__builddir, i, self._instroot, i)
f = subprocess.Popen(cmd, shell=True, stdout=PIPE,
stderr=STDOUT)
output, err = f.communicate()
- cmd = "diff -u /manifest-%s.txt /manifest-%s.txt |egrep " \
+ cmd = "diff -u /manifest-tmp-%s.txt /manifest-%s.txt |egrep " \
"-v \"^@|^ \" > /delta-manifest-%s.txt" % \
(i, i, i)
f = subprocess.Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT,
--
To view, visit http://gerrit.ovirt.org/16210
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia07182a46e2c6cf91fb0fa3d497b0b4929ab286c
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Joey Boggs <jboggs at redhat.com>
Gerrit-Reviewer: hadong <hadong0720 at gmail.com>
More information about the node-patches
mailing list