1 |
commit: 38d3ff6abba53f664e52d0bfafff5ab49d052bb8 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 18 15:36:51 2021 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 18 15:39:16 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=38d3ff6a |
7 |
|
8 |
OwnerSet: handle missing or empty exclude-files parameter (bug 796584) |
9 |
|
10 |
Fixes: f55156d167a6 ("lib/portage/_sets/dbapi.py: add glob support to exclude-files parameter cnf/sets/portage.conf: add exclude-files=/usr/src/linux* in module-rebuild set") |
11 |
Bug: https://bugs.gentoo.org/796584 |
12 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
13 |
|
14 |
lib/portage/_sets/dbapi.py | 4 ++-- |
15 |
1 file changed, 2 insertions(+), 2 deletions(-) |
16 |
|
17 |
diff --git a/lib/portage/_sets/dbapi.py b/lib/portage/_sets/dbapi.py |
18 |
index 17776f94c..60b26d17c 100644 |
19 |
--- a/lib/portage/_sets/dbapi.py |
20 |
+++ b/lib/portage/_sets/dbapi.py |
21 |
@@ -80,13 +80,13 @@ class OwnerSet(PackageSet): |
22 |
paths = expanded_paths |
23 |
|
24 |
expanded_exclude_paths = [] |
25 |
- for p in exclude_paths: |
26 |
+ for p in (exclude_paths or ()): |
27 |
expanded_exclude_paths.extend(expanded_exc_p[len(eroot)-1:] for expanded_exc_p in |
28 |
glob.iglob(os.path.join(eroot, p.lstrip(os.sep)))) |
29 |
exclude_paths = expanded_exclude_paths |
30 |
|
31 |
pkg_str = vardb._pkg_str |
32 |
- if exclude_paths is None: |
33 |
+ if exclude_paths: |
34 |
for link, p in vardb._owners.iter_owners(paths): |
35 |
pkg = pkg_str(link.mycpv, None) |
36 |
rValue.add("%s:%s" % (pkg.cp, pkg.slot)) |