diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-06-25 02:59:26 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-06-25 02:59:26 +0000 |
commit | 3364386de1065777a6310b575f88dd50c99c9f8c (patch) | |
tree | 9298bae71cf64f80823cbd90bcefe934104d0dd0 | |
parent | 2996589fcbe536878e19c0b0113a0082291029ae (diff) | |
download | portage-3364386de1065777a6310b575f88dd50c99c9f8c.tar.gz portage-3364386de1065777a6310b575f88dd50c99c9f8c.tar.bz2 portage-3364386de1065777a6310b575f88dd50c99c9f8c.zip |
Fix resume logic in binarytree.gettbz2(). (trunk r7017:7019)
svn path=/main/branches/2.1.2/; revision=7020
-rw-r--r-- | pym/portage.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pym/portage.py b/pym/portage.py index 99ae092d6..9307ce8be 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -6803,12 +6803,12 @@ class binarytree(object): """Fetches the package from a remote site, if necessary. Attempts to resume if the file appears to be partially downloaded.""" print "Fetching '"+str(pkgname)+"'" - mysplit = pkgname.split("/") - tbz2name = mysplit[1]+".tbz2" + tbz2_path = self.getname(pkgname) + tbz2name = os.path.basename(tbz2_path) resume = False - if not self.isremote(pkgname): + if os.path.exists(tbz2_path): if (tbz2name not in self.invalids): - return + return 1 else: resume = True writemsg("Resuming download of this tbz2, but it is possible that it is corrupt.\n", |