Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Cc: Zac Medico <zmedico@g.o>
Subject: [gentoo-portage-dev] [PATCH] binarytree.move_ent: fix binpkg-multi-instance _pkg_paths corruption (bug 545252)
Date: Wed, 01 Apr 2015 18:40:49
Message-Id: 1427913635-22224-1-git-send-email-zmedico@gentoo.org
1 When binpkg-multi-instance support was added in commit
2 328dd4712f88cbb8ef390ae9eb471afa1ef781d7, the code that adjusts
3 self._pkg_paths in binarytree.move_ent was not fixed to account for the
4 extra directory in the path.
5
6 Fixes: 328dd4712f88 ("binpkg-multi-instance 3 of 7")
7 X-Gentoo-Bug: 545252
8 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=545252
9 ---
10 pym/portage/dbapi/bintree.py | 3 +--
11 1 file changed, 1 insertion(+), 2 deletions(-)
12
13 diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
14 index 2f0bc47..b37f388 100644
15 --- a/pym/portage/dbapi/bintree.py
16 +++ b/pym/portage/dbapi/bintree.py
17 @@ -462,8 +462,7 @@ class binarytree(object):
18 mynewcpv = _pkg_str(mynewcpv, metadata=metadata)
19 new_path = self.getname(mynewcpv)
20 self._pkg_paths[
21 - self.dbapi._instance_key(mynewcpv)] = os.path.join(
22 - *new_path.split(os.path.sep)[-2:])
23 + self.dbapi._instance_key(mynewcpv)] = new_path[len(self.pkgdir)+1:]
24 if new_path != mytbz2:
25 self._ensure_dir(os.path.dirname(new_path))
26 _movefile(tbz2path, new_path, mysettings=self.settings)
27 --
28 2.3.1

Replies