Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong creation of empty binpkg from binhost #901

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion lib/_emerge/Binpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class Binpkg(CompositeTask):
"_pkg_path",
"_tree",
"_verify",
"_pkg_allocated_path",
)

def _writemsg_level(self, msg, level=0, noiselevel=0):
Expand All @@ -68,6 +69,7 @@ def _start(self):
self._tree = "bintree"
self._bintree = self.pkg.root_config.trees[self._tree]
self._verify = not self.opts.pretend
self._pkg_allocated_path = None

# Use realpath like doebuild_environment() does, since we assert
# that this path is literally identical to PORTAGE_BUILDDIR.
Expand Down Expand Up @@ -206,6 +208,7 @@ def _fetcher_exit(self, fetcher):
# --getbinpkg is enabled.
if fetcher is not None:
self._fetched_pkg = fetcher.pkg_path
self._pkg_allocated_path = fetcher.pkg_allocated_path
if self._default_exit(fetcher) != os.EX_OK:
self._async_unlock_builddir(returncode=self.returncode)
return
Expand Down Expand Up @@ -246,7 +249,11 @@ def _verifier_exit(self, verifier):

if self._fetched_pkg:
pkg_path = self._bintree.getname(
self._bintree.inject(pkg.cpv, current_pkg_path=self._fetched_pkg),
self._bintree.inject(
pkg.cpv,
current_pkg_path=self._fetched_pkg,
allocated_pkg_path=self._pkg_allocated_path,
),
allocate_new=False,
)
else:
Expand Down