Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/_ipc/
Date: Tue, 01 May 2018 17:28:33
Message-Id: 1525195626.107dca9a3171e4870038769aef66612209ecd423.zmedico@gentoo
1 commit: 107dca9a3171e4870038769aef66612209ecd423
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 1 17:27:06 2018 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Tue May 1 17:27:06 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=107dca9a
7
8 QueryCommand: handle empty *ROOT values for EAPI 7
9
10 The absence of a trailing slash in EAPI 7 means that it's
11 valid for *ROOT values to be empty, so translate the empty
12 value to a single slash where appropriate. This solves
13 errors like the following:
14
15 best_version: Invalid ROOT: ./
16
17 See: 6cb70f9ef0e7 ("Strip trailing slash from D, ED, ROOT, EROOT in EAPI 7")
18
19 pym/portage/package/ebuild/_ipc/QueryCommand.py | 4 ++--
20 1 file changed, 2 insertions(+), 2 deletions(-)
21
22 diff --git a/pym/portage/package/ebuild/_ipc/QueryCommand.py b/pym/portage/package/ebuild/_ipc/QueryCommand.py
23 index 351c95628..fa6d1ea16 100644
24 --- a/pym/portage/package/ebuild/_ipc/QueryCommand.py
25 +++ b/pym/portage/package/ebuild/_ipc/QueryCommand.py
26 @@ -1,4 +1,4 @@
27 -# Copyright 2010-2013 Gentoo Foundation
28 +# Copyright 2010-2018 Gentoo Foundation
29 # Distributed under the terms of the GNU General Public License v2
30
31 from __future__ import unicode_literals
32 @@ -49,7 +49,7 @@ class QueryCommand(IpcCommand):
33 db = self.get_db()
34 eapi = self.settings.get('EAPI')
35
36 - root = normalize_path(root).rstrip(os.path.sep) + os.path.sep
37 + root = normalize_path(root or os.sep).rstrip(os.sep) + os.sep
38 if root not in db:
39 return ('', '%s: Invalid ROOT: %s\n' % (cmd, root), 3)