diff options
author | Sheng Yu <syu.os@protonmail.com> | 2022-09-16 08:19:19 -0400 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-09-20 04:39:22 +0100 |
commit | 50854d7a8d7b83e0a598f4e1258d3e063a3fe9e0 (patch) | |
tree | aea2c920b6a6c81e4274608dc3ba8321243f0adc | |
parent | Move pty setup from AbstractEbuildProcess to SpawnProcess (diff) | |
download | portage-50854d7a8d7b83e0a598f4e1258d3e063a3fe9e0.tar.gz portage-50854d7a8d7b83e0a598f4e1258d3e063a3fe9e0.tar.bz2 portage-50854d7a8d7b83e0a598f4e1258d3e063a3fe9e0.zip |
Fix wrong creation of empty binpkg from binhost
Bug: https://bugs.gentoo.org/870283
Signed-off-by: Sheng Yu <syu.os@protonmail.com>
Closes: https://github.com/gentoo/portage/pull/901
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | lib/_emerge/Binpkg.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/_emerge/Binpkg.py b/lib/_emerge/Binpkg.py index 949ac8ee7..7ce0da15f 100644 --- a/lib/_emerge/Binpkg.py +++ b/lib/_emerge/Binpkg.py @@ -50,6 +50,7 @@ class Binpkg(CompositeTask): "_pkg_path", "_tree", "_verify", + "_pkg_allocated_path", ) def _writemsg_level(self, msg, level=0, noiselevel=0): @@ -68,6 +69,7 @@ class Binpkg(CompositeTask): 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. @@ -206,6 +208,7 @@ class Binpkg(CompositeTask): # --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 @@ -246,7 +249,11 @@ class Binpkg(CompositeTask): 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: |