summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-25 02:48:41 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-25 02:48:41 +0000
commitb79ca41219177d109e77e80d7429d8eeb04fa4c0 (patch)
tree2caa9b84bd96feaccbca9623710bf72cf97f0a3b
parent035e266a3680f26c20f8811b91ef2ffbf7cbd8b1 (diff)
downloadportage-b79ca41219177d109e77e80d7429d8eeb04fa4c0.tar.gz
portage-b79ca41219177d109e77e80d7429d8eeb04fa4c0.tar.bz2
portage-b79ca41219177d109e77e80d7429d8eeb04fa4c0.zip
Fix resume logic in binarytree.gettbz2().
svn path=/main/trunk/; revision=7018
-rw-r--r--pym/portage/dbapi/bintree.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index a007106c9..2b5dacd1d 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -848,17 +848,17 @@ 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(tbz2name):
if (tbz2name not in self.invalids):
return
else:
resume = True
writemsg("Resuming download of this tbz2, but it is possible that it is corrupt.\n",
noiselevel=-1)
- tbz2_path = self.getname(pkgname)
+
mydest = os.path.dirname(self.getname(pkgname))
try:
os.makedirs(mydest, 0775)