For compatibility with float timestamps in python-2.5, convert st_mtime attributes...
authorZac Medico <zmedico@gentoo.org>
Fri, 22 Sep 2006 20:24:06 +0000 (20:24 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 22 Sep 2006 20:24:06 +0000 (20:24 -0000)
svn path=/main/trunk/; revision=4500

bin/emerge
pym/cache/flat_list.py
pym/eclass_cache.py
pym/portage.py
pym/portage_update.py

index afd107080b03c338216688855b384379973d1caa..bf980104bd2c6d69f2ccf05a237d74223fbfdc2c 100755 (executable)
@@ -2479,7 +2479,7 @@ def chk_updated_info_files(root, infodirs, prev_mtimes, retval):
                                continue
                        inforoot=normpath(root+z)
                        if os.path.isdir(inforoot):
-                               infomtime = os.stat(inforoot).st_mtime
+                               infomtime = long(os.stat(inforoot).st_mtime)
                                if inforoot not in prev_mtimes or \
                                        prev_mtimes[inforoot] != infomtime:
                                                regen_infodirs.append(inforoot)
@@ -2526,7 +2526,7 @@ def chk_updated_info_files(root, infodirs, prev_mtimes, retval):
                                        icount=icount+1
 
                                #update mtime so we can potentially avoid regenerating.
-                               prev_mtimes[inforoot] = os.stat(inforoot).st_mtime
+                               prev_mtimes[inforoot] = long(os.stat(inforoot).st_mtime)
 
                        if badcount:
                                print " "+yellow("*")+" Processed",icount,"info files;",badcount,"errors."
index 0cd3edb0eecf5fed914f73cdfef24f72c6e99992..65fe5a781876a8ff20177ae52f554d14e886ee1a 100644 (file)
@@ -35,7 +35,8 @@ class database(fs_template.FsBased):
                                raise KeyError(cpv)
                        raise cache_errors.CacheCorruption(cpv, e)
 
-               try:    d["_mtime_"] = os.fstat(myf.fileno()).st_mtime
+               try:
+                       d["_mtime_"] = long(os.fstat(myf.fileno()).st_mtime)
                except OSError, e:      
                        myf.close()
                        raise cache_errors.CacheCorruption(cpv, e)
index 1847cbf765c51c6de8ff43bda8db67d6517f0752..8d2a2bb813325121803b30e39869de95db0a6023 100644 (file)
@@ -44,7 +44,7 @@ class cache:
                                continue
                        for y in [y for y in os.listdir(x) if y.endswith(".eclass")]:
                                try:
-                                       mtime=os.stat(x+"/"+y).st_mtime
+                                       mtime = long(os.stat(os.path.join(x, y)).st_mtime)
                                except OSError:
                                        continue
                                ys=y[:-eclass_len]
index 104f1a27917aabae18c2dfadcb7d45ba83a936bc..b8f984f5c00d1aefd163bdcfbc578181520d9c4a 100644 (file)
@@ -6706,7 +6706,7 @@ def global_updates(mysettings, trees, prev_mtimes):
                        if len(errors) == 0:
                                # Update our internal mtime since we
                                # processed all of our directives.
-                               timestamps[mykey] = mystat.st_mtime
+                               timestamps[mykey] = long(mystat.st_mtime)
                        else:
                                for msg in errors:
                                        writemsg("%s\n" % msg, noiselevel=-1)
index 0184f04e3659cd0a0888a9ca1efb754b186d9f51..671e9bc139867b87f9a389dc8a7bc580ca35ac05 100644 (file)
@@ -80,7 +80,7 @@ def grab_updates(updpath, prev_mtimes=None):
                file_path = os.path.join(updpath, myfile)
                mystat = os.stat(file_path)
                if file_path not in prev_mtimes or \
-               prev_mtimes[file_path] != mystat.st_mtime:
+               long(prev_mtimes[file_path]) != long(mystat.st_mtime):
                        f = open(file_path)
                        content = f.read()
                        f.close()