Fix binarytree.gettbz2() so that it works without $PKGDIR/All/ and inserts the downlo...
authorZac Medico <zmedico@gentoo.org>
Mon, 28 May 2007 23:41:13 +0000 (23:41 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 28 May 2007 23:41:13 +0000 (23:41 -0000)
svn path=/main/trunk/; revision=6656

pym/portage/dbapi/bintree.py

index 0589c75b811c1a81a256f184284d500beffbb1c6..ab4b88ae91067dfca374ffe3fac6d5053bbe1c7b 100644 (file)
@@ -743,14 +743,16 @@ class binarytree(object):
                        else:
                                writemsg("Resuming download of this tbz2, but it is possible that it is corrupt.\n",
                                        noiselevel=-1)
-               mydest = self.pkgdir + "/All/"
+               mydest = os.path.dirname(self.getname(pkgname))
                try:
                        os.makedirs(mydest, 0775)
                except (OSError, IOError):
                        pass
-               return portage.getbinpkg.file_get(
+               success = portage.getbinpkg.file_get(
                        self.settings["PORTAGE_BINHOST"] + "/" + tbz2name,
                        mydest, fcmd=self.settings["RESUMECOMMAND"])
+               self.inject(pkgname)
+               return success
 
        def getslot(self, mycatpkg):
                "Get a slot for a catpkg; assume it exists."