Bug #198492 - Make quickpkg create $PKGDIR if it doesn't
authorZac Medico <zmedico@gentoo.org>
Tue, 20 Nov 2007 19:36:37 +0000 (19:36 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 20 Nov 2007 19:36:37 +0000 (19:36 -0000)
already exist. (trunk r8464)

svn path=/main/branches/2.1.2/; revision=8546

bin/quickpkg

index fe7f4dbcc7658a69abed6f51504d0730fffc8e82..fedb1b3fe7c09f283b99e20373b95c162d73f9bc 100755 (executable)
@@ -70,6 +70,7 @@ def quickpkg_main(options, args, eout):
        from portage_dep import use_reduce, paren_reduce
        from portage_util import ConfigProtect, ensure_dirs
        from portage_exception import InvalidData, InvalidDependString
+       import portage_exception
        from portage_checksum import perform_md5
        import tarfile
        import portage
@@ -78,6 +79,10 @@ def quickpkg_main(options, args, eout):
        vartree = trees["vartree"]
        vardb = vartree.dbapi
        bintree = trees["bintree"]
+       try:
+               ensure_dirs(bintree.pkgdir)
+       except portage_exception.PortageException:
+               pass
        if not os.access(bintree.pkgdir, os.W_OK):
                eout.eerror("No write access to '%s'" % bintree.pkgdir)
                return errno.EACCES