From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 009C7158094 for ; Tue, 20 Sep 2022 03:39:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E57A2E0874; Tue, 20 Sep 2022 03:39:31 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CAD57E0871 for ; Tue, 20 Sep 2022 03:39:31 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B10773410A5 for ; Tue, 20 Sep 2022 03:39:30 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 48B905DA for ; Tue, 20 Sep 2022 03:39:29 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1663645162.50854d7a8d7b83e0a598f4e1258d3e063a3fe9e0.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: lib/_emerge/Binpkg.py X-VCS-Directories: lib/_emerge/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 50854d7a8d7b83e0a598f4e1258d3e063a3fe9e0 X-VCS-Branch: master Date: Tue, 20 Sep 2022 03:39:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 502af8df-7397-402c-9ff4-30102270fc5c X-Archives-Hash: 786fc198ad3e896ec9ded60ed0b41531 commit: 50854d7a8d7b83e0a598f4e1258d3e063a3fe9e0 Author: Sheng Yu protonmail com> AuthorDate: Fri Sep 16 12:19:19 2022 +0000 Commit: Sam James gentoo org> CommitDate: Tue Sep 20 03:39:22 2022 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=50854d7a Fix wrong creation of empty binpkg from binhost Bug: https://bugs.gentoo.org/870283 Signed-off-by: Sheng Yu protonmail.com> Closes: https://github.com/gentoo/portage/pull/901 Signed-off-by: Sam James gentoo.org> lib/_emerge/Binpkg.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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: