[PATCH] size comparison error

Perry Myers <[email protected]>
Newsgroups gmane.linux.rpm.yum
Message-ID <[email protected]>
Small patch to correct a type comparison problem.  The size comparison 
check always returns false.  Casting the returnSimple to an int corrects 
the problem.  The error results in packages being unnecessarily pulled 
on subsequent syncs.

Thanks,

Perry

|/=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 703 362 9622 -=|/

diff -Naur a/reposync.py b/reposync.py
--- a/reposync.py       2007-05-31 15:48:40.000000000 -0400
+++ b/reposync.py       2007-05-31 15:37:27.000000000 -0400
@@ -212,7 +212,7 @@
                 os.makedirs(localdir)
 
             if (os.path.exists(local) and
-                str(os.path.getsize(local)) == 
pkg.returnSimple('packagesize')):
+                os.path.getsize(local) == 
int(pkg.returnSimple('packagesize'))):
                 
                 if not opts.quiet:
                     my.logger.error("[%s: %-5d of %-5d ] Skipping 
existing %s" % (repo.id, n, len(download_list), remote))
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.