Use stat rather than lstat since portage.fetch() creates symlinks when
authorZac Medico <zmedico@gentoo.org>
Tue, 2 Feb 2010 05:43:01 +0000 (05:43 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 2 Feb 2010 05:43:01 +0000 (05:43 -0000)
PORTAGE_RO_DISTDIRS is used.

svn path=/main/trunk/; revision=15315

pym/_emerge/EbuildFetcher.py

index acb5ead4a68b3c2f74102a63ad5bd07ab17121ad..cf2319b0105bbc3a4eb03c8c372560fd154965a4 100644 (file)
@@ -101,8 +101,10 @@ class EbuildFetcher(SpawnProcess):
 
                sizes = {}
                for filename in uri_map:
+                       # Use stat rather than lstat since portage.fetch() creates
+                       # symlinks when PORTAGE_RO_DISTDIRS is used.
                        try:
-                               st = os.lstat(os.path.join(distdir, filename))
+                               st = os.stat(os.path.join(distdir, filename))
                        except OSError:
                                return False
                        if st.st_size == 0: