diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-01-14 03:58:08 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-01-14 03:58:08 +0000 |
commit | 99247ec1b0ebd0e3de9a9ef499fcc34d39aff040 (patch) | |
tree | d92c05c89764a8f32bf43a7e0405501ca94c8133 /pym | |
parent | cb960bc4cc45a9131e37c7f1cb79d9b253eda3bd (diff) | |
download | portage-99247ec1b0ebd0e3de9a9ef499fcc34d39aff040.tar.gz portage-99247ec1b0ebd0e3de9a9ef499fcc34d39aff040.tar.bz2 portage-99247ec1b0ebd0e3de9a9ef499fcc34d39aff040.zip |
Inside digestgen(), don't unnecessarily call fetch() in cases when the there
are no hashes for comparison and the file already exists in $DISTDIR.
(trunk r12499)
svn path=/main/branches/2.1.6/; revision=12509
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage/__init__.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 2c33e52b6..a6ef919de 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -4234,7 +4234,12 @@ def digestgen(myarchives, mysettings, overwrite=1, manifestonly=0, myportdb=None for myfile in distfiles_map: myhashes = dist_hashes.get(myfile) if not myhashes: - missing_files.append(myfile) + try: + st = os.stat(os.path.join(mysettings["DISTDIR"], myfile)) + except OSError: + st = None + if st is None or st.st_size == 0: + missing_files.append(myfile) continue size = myhashes.get("size") |