* [gentoo-portage-dev] [PATCH] binarytree.move_ent: fix binpkg-multi-instance _pkg_paths corruption (bug 545252)
@ 2015-04-01 18:40 Zac Medico
2015-04-01 19:12 ` Brian Dolbec
0 siblings, 1 reply; 2+ messages in thread
From: Zac Medico @ 2015-04-01 18:40 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: Zac Medico
When binpkg-multi-instance support was added in commit
328dd4712f88cbb8ef390ae9eb471afa1ef781d7, the code that adjusts
self._pkg_paths in binarytree.move_ent was not fixed to account for the
extra directory in the path.
Fixes: 328dd4712f88 ("binpkg-multi-instance 3 of 7")
X-Gentoo-Bug: 545252
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=545252
---
pym/portage/dbapi/bintree.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index 2f0bc47..b37f388 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -462,8 +462,7 @@ class binarytree(object):
mynewcpv = _pkg_str(mynewcpv, metadata=metadata)
new_path = self.getname(mynewcpv)
self._pkg_paths[
- self.dbapi._instance_key(mynewcpv)] = os.path.join(
- *new_path.split(os.path.sep)[-2:])
+ self.dbapi._instance_key(mynewcpv)] = new_path[len(self.pkgdir)+1:]
if new_path != mytbz2:
self._ensure_dir(os.path.dirname(new_path))
_movefile(tbz2path, new_path, mysettings=self.settings)
--
2.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [gentoo-portage-dev] [PATCH] binarytree.move_ent: fix binpkg-multi-instance _pkg_paths corruption (bug 545252)
2015-04-01 18:40 [gentoo-portage-dev] [PATCH] binarytree.move_ent: fix binpkg-multi-instance _pkg_paths corruption (bug 545252) Zac Medico
@ 2015-04-01 19:12 ` Brian Dolbec
0 siblings, 0 replies; 2+ messages in thread
From: Brian Dolbec @ 2015-04-01 19:12 UTC (permalink / raw
To: gentoo-portage-dev
On Wed, 1 Apr 2015 11:40:35 -0700
Zac Medico <zmedico@gentoo.org> wrote:
> When binpkg-multi-instance support was added in commit
> 328dd4712f88cbb8ef390ae9eb471afa1ef781d7, the code that adjusts
> self._pkg_paths in binarytree.move_ent was not fixed to account for
> the extra directory in the path.
>
> Fixes: 328dd4712f88 ("binpkg-multi-instance 3 of 7")
> X-Gentoo-Bug: 545252
> X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=545252
> ---
> pym/portage/dbapi/bintree.py | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/pym/portage/dbapi/bintree.py
> b/pym/portage/dbapi/bintree.py index 2f0bc47..b37f388 100644
> --- a/pym/portage/dbapi/bintree.py
> +++ b/pym/portage/dbapi/bintree.py
> @@ -462,8 +462,7 @@ class binarytree(object):
> mynewcpv = _pkg_str(mynewcpv,
> metadata=metadata) new_path = self.getname(mynewcpv)
> self._pkg_paths[
> - self.dbapi._instance_key(mynewcpv)]
> = os.path.join(
> - *new_path.split(os.path.sep)[-2:])
> + self.dbapi._instance_key(mynewcpv)]
> = new_path[len(self.pkgdir)+1:] if new_path != mytbz2:
> self._ensure_dir(os.path.dirname(new_path))
> _movefile(tbz2path, new_path,
> mysettings=self.settings)
merge it please :)
--
Brian Dolbec <dolsen>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-01 19:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-01 18:40 [gentoo-portage-dev] [PATCH] binarytree.move_ent: fix binpkg-multi-instance _pkg_paths corruption (bug 545252) Zac Medico
2015-04-01 19:12 ` Brian Dolbec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox