Fix equery check to convert mtime to an integer so that comparisions always work.
authorfuzzyray <fuzzyray@gentoo.org>
Thu, 24 Jul 2008 16:03:19 +0000 (16:03 -0000)
committerfuzzyray <fuzzyray@gentoo.org>
Thu, 24 Jul 2008 16:03:19 +0000 (16:03 -0000)
svn path=/; revision=502

trunk/ChangeLog
trunk/src/equery/equery

index 5e3cb9f11c96d4b32d77e121e7789ff63d1c9576..4ec5c13084876726b344a4952041435071037ce8 100644 (file)
@@ -1,3 +1,8 @@
+2008-07-24: Paul Varner <fuzzyray@gentoo.org>
+       * equery: Fix equery check to convert mtime to an integer so that
+       comparisions always work. Thanks to Alexey Parshin for discovering the
+       problem and providing a patch. (Bug 232803)
+
 2008-07-22: Paul Varner <fuzzyray@gentoo.org>
        * gentoolkit: Fix gentoolkit.split_package_name to work with
        newer portage.catpkgsplit that now returns a tuple instead of a
index 9d8f876b18a54d32827bf9ae0aaffeb19363c6d3..ed8c5c4d51b5f9b49bc8781d30ceb2de8a3117a1 100755 (executable)
@@ -976,7 +976,7 @@ class CmdCheckIntegrity(Command):
                                                        if self.getMD5sum(file) != md5sum:
                                                                raise CheckException(file + " has incorrect md5sum")
                                                if opts["checkTimestamp"]:
-                                                       if st.st_mtime != int(mtime):
+                                                       if int(st.st_mtime) != int(mtime):
                                                                raise CheckException(file + (" has wrong mtime (is %d, should be %s)" % (st.st_mtime, mtime)))
                                        elif type == "sym":
                                                # FIXME: nastry strippery; portage should have this fixed!