[oe] [PATCH] ipkg-utils: convert mtime to int before comparing it

Khem Raj raj.khem at gmail.com
Mon Jun 21 18:35:18 UTC 2010


On (21/06/10 20:31), Enrico Scholz wrote:
> 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)
> 
> 

OK

Acked-by: Khem Raj <raj.khem at gmail.com>


> > -+          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