diff options
author | Zac Medico <zmedico@gentoo.org> | 2021-01-17 05:24:21 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2021-01-17 05:27:25 -0800 |
commit | 3d39e6891a3ee002fb1aa039c5660e6015c555d2 (patch) | |
tree | ee2dcedfd4a94135223fe37f1cfcb691fb81c1b8 /lib | |
parent | doebuild: use NamedTemporaryFile for PORTAGE_BINPKG_TMPFILE (diff) | |
download | portage-3d39e6891a3ee002fb1aa039c5660e6015c555d2.tar.gz portage-3d39e6891a3ee002fb1aa039c5660e6015c555d2.tar.bz2 portage-3d39e6891a3ee002fb1aa039c5660e6015c555d2.zip |
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 <zmedico@gentoo.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/portage/dbapi/bintree.py | 2 |
1 files changed, 1 insertions, 1 deletions
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) |