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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8A3421382C5 for ; Sun, 17 Jan 2021 13:32:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9014EE0877; Sun, 17 Jan 2021 13:32:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 56C37E0877 for ; Sun, 17 Jan 2021 13:32:00 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 19F2A340D9F for ; Sun, 17 Jan 2021 13:31:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9A10292 for ; Sun, 17 Jan 2021 13:31:57 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1610890045.3d39e6891a3ee002fb1aa039c5660e6015c555d2.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/dbapi/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/dbapi/bintree.py X-VCS-Directories: lib/portage/dbapi/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 3d39e6891a3ee002fb1aa039c5660e6015c555d2 X-VCS-Branch: master Date: Sun, 17 Jan 2021 13:31:57 +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: 532521e9-9a18-4f48-8542-5c462bc36088 X-Archives-Hash: 3fe002f429ad56e4b49792246b6ab27d commit: 3d39e6891a3ee002fb1aa039c5660e6015c555d2 Author: Zac Medico gentoo org> AuthorDate: Sun Jan 17 13:24:21 2021 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Jan 17 13:27:25 2021 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=3d39e689 bindbapi.move_ent: use cpv_exists instead of getname The getname method is complicated by binpkg-multi-instance and soon BINPKG_FORMAT, so it's much simpler to use cpv_exists. Signed-off-by: Zac Medico gentoo.org> lib/portage/dbapi/bintree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/portage/dbapi/bintree.py b/lib/portage/dbapi/bintree.py index 528a68979..e5ba5893e 100644 --- a/lib/portage/dbapi/bintree.py +++ b/lib/portage/dbapi/bintree.py @@ -483,7 +483,7 @@ class binarytree: myoldpkg = catsplit(mycpv)[1] mynewpkg = catsplit(mynewcpv)[1] - if (mynewpkg != myoldpkg) and os.path.exists(self.getname(mynewcpv)): + if (mynewpkg != myoldpkg) and self.dbapi.cpv_exists(mynewcpv): writemsg(_("!!! Cannot update binary: Destination exists.\n"), noiselevel=-1) writemsg("!!! "+mycpv+" -> "+mynewcpv+"\n", noiselevel=-1)