Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/_sets/, cnf/sets/
Date: Thu, 12 Sep 2019 02:28:05
Message-Id: 1568253193.b1342ac2c83b4a1b0415eb5fcc4dd1d6c65561d8.zmedico@gentoo
1 commit: b1342ac2c83b4a1b0415eb5fcc4dd1d6c65561d8
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 11 01:52:35 2019 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 12 01:53:13 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=b1342ac2
7
8 x11-module-rebuild: support SYMLINK_LIB=no (bug 693980)
9
10 Use a lib* glob to support SYMLINK_LIB=no.
11
12 Bug: https://bugs.gentoo.org/693980
13 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
14
15 cnf/sets/portage.conf | 2 +-
16 lib/portage/_sets/__init__.py | 2 +-
17 lib/portage/_sets/dbapi.py | 15 ++++++++++++---
18 3 files changed, 14 insertions(+), 5 deletions(-)
19
20 diff --git a/cnf/sets/portage.conf b/cnf/sets/portage.conf
21 index 38c50a647..0d11d7891 100644
22 --- a/cnf/sets/portage.conf
23 +++ b/cnf/sets/portage.conf
24 @@ -76,7 +76,7 @@ files = /lib/modules
25 # excluding the package that owns /usr/bin/Xorg.
26 [x11-module-rebuild]
27 class = portage.sets.dbapi.OwnerSet
28 -files = /usr/lib/xorg/modules
29 +files = /usr/lib*/xorg/modules
30 exclude-files = /usr/bin/Xorg
31
32 # Binary packages that have a different build time from a currently
33
34 diff --git a/lib/portage/_sets/__init__.py b/lib/portage/_sets/__init__.py
35 index 7b81c55e2..a569b273b 100644
36 --- a/lib/portage/_sets/__init__.py
37 +++ b/lib/portage/_sets/__init__.py
38 @@ -142,7 +142,7 @@ class SetConfig(object):
39 parser.remove_section("x11-module-rebuild")
40 parser.add_section("x11-module-rebuild")
41 parser.set("x11-module-rebuild", "class", "portage.sets.dbapi.OwnerSet")
42 - parser.set("x11-module-rebuild", "files", "/usr/lib/xorg/modules")
43 + parser.set("x11-module-rebuild", "files", "/usr/lib*/xorg/modules")
44 parser.set("x11-module-rebuild", "exclude-files", "/usr/bin/Xorg")
45
46 def update(self, setname, options):
47
48 diff --git a/lib/portage/_sets/dbapi.py b/lib/portage/_sets/dbapi.py
49 index 5d78fd1d3..5c600ec9e 100644
50 --- a/lib/portage/_sets/dbapi.py
51 +++ b/lib/portage/_sets/dbapi.py
52 @@ -1,8 +1,9 @@
53 -# Copyright 2007-2014 Gentoo Foundation
54 +# Copyright 2007-2019 Gentoo Authors
55 # Distributed under the terms of the GNU General Public License v2
56
57 from __future__ import division
58
59 +import glob
60 import re
61 import time
62
63 @@ -67,11 +68,19 @@ class OwnerSet(PackageSet):
64
65 def mapPathsToAtoms(self, paths, exclude_paths=None):
66 """
67 - All paths must begin with a slash, must include EPREFIX, and
68 - must not include ROOT.
69 + All paths must begin with a slash, and must not include EROOT.
70 + Supports globs.
71 """
72 rValue = set()
73 vardb = self._db
74 +
75 + eroot = vardb.settings['EROOT']
76 + expanded_paths = []
77 + for p in paths:
78 + expanded_paths.extend(expanded_p[len(eroot)-1:] for expanded_p in
79 + glob.iglob(os.path.join(eroot, p.lstrip(os.sep))))
80 + paths = expanded_paths
81 +
82 pkg_str = vardb._pkg_str
83 if exclude_paths is None:
84 for link, p in vardb._owners.iter_owners(paths):