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")