When caching Packages file from binhost, ignore failure to write in cases
authorZac Medico <zmedico@gentoo.org>
Fri, 9 Apr 2010 19:28:09 +0000 (12:28 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 9 Apr 2010 19:28:09 +0000 (12:28 -0700)
when the cache directory is not writable.

pym/portage/dbapi/bintree.py

index 997d629a875bb40405cacea52d76001db2ea2119..7e05f0869e6120581d611a32868a42f19f02e76d 100644 (file)
@@ -775,8 +775,7 @@ class binarytree(object):
                                        pkgindex.write(f)
                                        f.close()
                                except PortageException:
-                                       if os.access(os.path.join(
-                                               self.settings["ROOT"], CACHE_PATH), os.W_OK):
+                                       if os.access(os.path.dirname(pkgindex_file), os.W_OK):
                                                raise
                                        # The current user doesn't have permission to cache the
                                        # file, but that's alright.