[yum-git] yum/packages.py

James Antill james at linux.duke.edu
Tue Feb 26 15:49:42 UTC 2008


 yum/packages.py |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 539444aedb2f1efceb0c534ec7c9f7d857ac5dc1
Author: James Antill <james at and.org>
Date:   Tue Feb 26 10:49:36 2008 -0500

    Fix very checksum with prelink

diff --git a/yum/packages.py b/yum/packages.py
index 48fd524..86fed98 100644
--- a/yum/packages.py
+++ b/yum/packages.py
@@ -894,7 +894,16 @@ class YumInstalledPackage(YumHeaderPackage):
                     
                 # checksum
                 if csum: # don't checksum files that don't have a csum in the rpmdb :)
+                    # Use prelink_undo_cmd macro?
+                    have_prelink = os.path.exists("/usr/sbin/prelink")
+
                     my_csum = misc.checksum('md5', fn)
+                    if my_csum != csum and have_prelink:
+                        #  This is how rpm -V works, try and if that fails try
+                        # again with prelink.
+                        (ig, fp) = os.popen2(["/usr/sbin/prelink", "-y", fn])
+                        my_csum = misc.checksum('md5', fp)
+
                     if my_csum != csum:
                         thisproblem = misc.GenericHolder()
                         thisproblem.type = 'checksum' # maybe replace with a constants type



More information about the Yum-cvs-commits mailing list