Bug #338267 - Fix broken PORTAGE_BUILDDIR assertion in Binpkg when
authorZac Medico <zmedico@gentoo.org>
Tue, 21 Sep 2010 18:26:27 +0000 (11:26 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 21 Sep 2010 18:28:15 +0000 (11:28 -0700)
PORTAGE_TMPDIR is a symlink.

pym/_emerge/Binpkg.py

index 06f0fd28c8ad05b3ccc4aceb5b78bf655f51a495..aadd625bf2e515a4d94628103ed7025763fb13ff 100644 (file)
@@ -39,7 +39,9 @@ class Binpkg(CompositeTask):
                self._bintree = self.pkg.root_config.trees[self._tree]
                self._verify = not self.opts.pretend
 
-               dir_path = os.path.join(settings["PORTAGE_TMPDIR"],
+               # Use realpath like doebuild_environment() does, since we assert
+               # that this is path is literally identical to PORTAGE_BUILDDIR.
+               dir_path = os.path.join(os.path.realpath(settings["PORTAGE_TMPDIR"]),
                        "portage", pkg.category, pkg.pf)
                self._image_dir = os.path.join(dir_path, "image")
                self._infloc = os.path.join(dir_path, "build-info")