diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-09-25 22:57:23 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-09-25 22:57:23 +0000 |
commit | c659166e86cebba4b6381abe454a09c92d74394b (patch) | |
tree | f2999482c07ba05b223e3ce55f545101be7b1014 | |
parent | For bug #80846, prevent false collisions caused by symlinks. Thanks to Thoma... (diff) | |
download | portage-2.1.1-r1.tar.gz portage-2.1.1-r1.tar.bz2 portage-2.1.1-r1.zip |
Fix fetch resume logic for bug #145601 and document the meaning of the fetched variable. This patch is from trunk r4478.v2.1.1-r1
svn path=/main/branches/2.1.1/; revision=4538
-rw-r--r-- | pym/portage.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pym/portage.py b/pym/portage.py index 9e46cb4d3..8f774d9ee 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -2035,6 +2035,12 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks", return 0 del distlocks_subdir for myfile in filedict.keys(): + """ + fetched status + 0 nonexistent + 1 partially downloaded + 2 completely downloaded + """ myfile_path = os.path.join(mysettings["DISTDIR"], myfile) fetched=0 file_lock = None @@ -2215,6 +2221,8 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks", try: os.unlink(mysettings["DISTDIR"]+"/"+myfile) writemsg(">>> Deleting invalid distfile. (Improper 404 redirect from server.)\n") + fetched = 0 + continue except SystemExit, e: raise except: @@ -2223,6 +2231,7 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks", raise except: pass + fetched = 1 continue if not fetchonly: fetched=2 |