[oe] [PATCH] ipkg-utils: convert mtime to int before comparing it
Enrico Scholz
enrico.scholz at sigma-chemnitz.de
Mon Jun 21 18:31:00 UTC 2010
Khem Raj <raj.khem at gmail.com> writes:
> On (15/06/10 15:03), Enrico Scholz wrote:
>> The st_mtime attribute (which is a float) is compared against a value
>> from the timestamp database, which was stored as an integer there.
>
>
> Is it stored as integer or long int? Did you try it on x86_64 box.
As 'int'. The ipkg-make-index-track-stamps.patch stores them as
+ pkgsStamps[basename] = fnameStat.st_mtime
...
+ pkgsStampsFile.write("%d %s\n" % (pkgsStamps[f], f))
and reads them back as
+ s, f = l.split(" ", 1)
+ pkgsStamps[f] = int(s)
> -+ if pkgsStamps.has_key(basename) and fnameStat.st_mtime == pkgsStamps[basename]:
> ++ if pkgsStamps.has_key(basename) and int(fnameStat.st_mtime) == pkgsStamps[basename]:
Enrico
More information about the Openembedded-devel
mailing list