[yum-git] yum/packages.py

James Antill james at linux.duke.edu
Thu Feb 28 07:39:04 UTC 2008


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

New commits:
commit 779009784a08c7c171b1ed209b1e61ace27e81c6
Author: James Antill <james at and.org>
Date:   Thu Feb 28 02:37:26 2008 -0500

    Add the magic readlink from DB call, thanks Panu

diff --git a/yum/packages.py b/yum/packages.py
index 6f1b6d6..403d6da 100644
--- a/yum/packages.py
+++ b/yum/packages.py
@@ -922,6 +922,19 @@ class YumInstalledPackage(YumHeaderPackage):
 
                 isdir = stat.S_ISDIR(my_st.st_mode)
                 islnk = stat.S_ISLNK(my_st.st_mode)
+
+                if islnk:
+                    fnl    = fi.FLink() # fi.foo is magic, don't think about it
+                    my_fnl = os.readlink(fn)
+                    if my_fnl != fnl:
+                        thisproblem = misc.GenericHolder()
+                        thisproblem.type = 'symlink'
+                        thisproblem.message = 'symlink does not match'
+                        thisproblem.database_value = fnl
+                        thisproblem.disk_value = my_fnl
+                        thisproblem.file_types = ftypes
+                        problems.append(thisproblem)
+
                 check_content = True
                 if (isdir or islnk or stat.S_ISFIFO(my_st.st_mode) or
                     stat.S_ISCHR(my_st.st_mode) or



More information about the Yum-cvs-commits mailing list