Re: createrepo/readMetadata.py

Dennis Gregorovic <[email protected]>
Newsgroups gmane.linux.rpm.metadata
Message-ID <1262871655.28381.94.camel@localhost>
On Thu, 2010-01-07 at 05:11 +0000, James Antill wrote: 
> createrepo/readMetadata.py |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> New commits:
> commit c3b157d0ccc2a4c8971c64ec6f9fb4ea3a9c17c5
> Author: Dennis Gregorovic <[email protected]>
> Date:   Thu Jan 7 00:11:14 2010 -0500
> 
>     Convert stat mtime to int so comparison can work, --update, BZ 553030
> 
> diff --git a/createrepo/readMetadata.py b/createrepo/readMetadata.py
> index 285e54d..6a5055e 100644
> --- a/createrepo/readMetadata.py
> +++ b/createrepo/readMetadata.py
> @@ -132,7 +132,7 @@ class MetadataIndex(object):
>                  #ignore non files
>                  return
>              #check size and mtime
> -            if st.st_size != size:
> +            if int(st.st_size) != size:
>                  if self.opts.get('verbose'):
>                      print _("Size (%i -> %i) changed for file %s") % (size,st.st_size,filepath)
>                  return

Looks like this is the wrong change.  It should be a few lines lower:

-            if st.st_mtime != mtime:
+            if int(st.st_mtime) != mtime:

Cheers
-- Dennis
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.