[yum-commits] Branch 'yum-3_2_X' - yum/packages.py

James Antill james at osuosl.org
Thu Feb 4 20:50:18 UTC 2010


 yum/packages.py |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 3dffdd1a713865004921a99bca5fa78a32abad7e
Author: James Antill <james at and.org>
Date:   Thu Feb 4 15:47:33 2010 -0500

    Another fix for verify, shell=True doesn't work with array args.

diff --git a/yum/packages.py b/yum/packages.py
index 1cedb38..849b972 100644
--- a/yum/packages.py
+++ b/yum/packages.py
@@ -1550,13 +1550,14 @@ class YumInstalledPackage(YumHeaderPackage):
                         #  This is how rpm -V works, try and if that fails try
                         # again with prelink.
                         p = Popen([prelink_cmd, "-y", fn], 
-                            shell=True, bufsize=-1, stdin=PIPE, 
+                            bufsize=-1, stdin=PIPE,
                             stdout=PIPE, stderr=PIPE, close_fds=True)
                         (ig, fp, er) = (p.stdin, p.stdout, p.stderr)
                         # er.read(1024 * 1024) # Try and get most of the stderr
                         fp = _CountedReadFile(fp)
+                        tcsum = misc.checksum(csum_type, fp)
                         if fp.read_size: # If prelink worked
-                            my_csum = misc.checksum(csum_type, fp)
+                            my_csum = tcsum
                             my_st_size = fp.read_size
 
                     if (csum and vflags & _RPMVERIFY_DIGEST and gen_csum and


More information about the Yum-commits mailing list