From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E4D97138334 for ; Thu, 12 Sep 2019 02:28:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 11B3FE0963; Thu, 12 Sep 2019 02:28:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DEA03E0963 for ; Thu, 12 Sep 2019 02:28:04 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 630F734B06F for ; Thu, 12 Sep 2019 02:28:03 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E5FB7771 for ; Thu, 12 Sep 2019 02:28:00 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1568253193.b1342ac2c83b4a1b0415eb5fcc4dd1d6c65561d8.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/_sets/, cnf/sets/ X-VCS-Repository: proj/portage X-VCS-Files: cnf/sets/portage.conf lib/portage/_sets/__init__.py lib/portage/_sets/dbapi.py X-VCS-Directories: cnf/sets/ lib/portage/_sets/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: b1342ac2c83b4a1b0415eb5fcc4dd1d6c65561d8 X-VCS-Branch: master Date: Thu, 12 Sep 2019 02:28:00 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ce560b65-fd9e-4266-bede-0e68b5bd4d06 X-Archives-Hash: 4fd94e3fffbcfec5f26a749a0597da81 commit: b1342ac2c83b4a1b0415eb5fcc4dd1d6c65561d8 Author: Zac Medico gentoo org> AuthorDate: Wed Sep 11 01:52:35 2019 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Sep 12 01:53:13 2019 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=b1342ac2 x11-module-rebuild: support SYMLINK_LIB=no (bug 693980) Use a lib* glob to support SYMLINK_LIB=no. Bug: https://bugs.gentoo.org/693980 Signed-off-by: Zac Medico gentoo.org> cnf/sets/portage.conf | 2 +- lib/portage/_sets/__init__.py | 2 +- lib/portage/_sets/dbapi.py | 15 ++++++++++++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/cnf/sets/portage.conf b/cnf/sets/portage.conf index 38c50a647..0d11d7891 100644 --- a/cnf/sets/portage.conf +++ b/cnf/sets/portage.conf @@ -76,7 +76,7 @@ files = /lib/modules # excluding the package that owns /usr/bin/Xorg. [x11-module-rebuild] class = portage.sets.dbapi.OwnerSet -files = /usr/lib/xorg/modules +files = /usr/lib*/xorg/modules exclude-files = /usr/bin/Xorg # Binary packages that have a different build time from a currently diff --git a/lib/portage/_sets/__init__.py b/lib/portage/_sets/__init__.py index 7b81c55e2..a569b273b 100644 --- a/lib/portage/_sets/__init__.py +++ b/lib/portage/_sets/__init__.py @@ -142,7 +142,7 @@ class SetConfig(object): parser.remove_section("x11-module-rebuild") parser.add_section("x11-module-rebuild") parser.set("x11-module-rebuild", "class", "portage.sets.dbapi.OwnerSet") - parser.set("x11-module-rebuild", "files", "/usr/lib/xorg/modules") + parser.set("x11-module-rebuild", "files", "/usr/lib*/xorg/modules") parser.set("x11-module-rebuild", "exclude-files", "/usr/bin/Xorg") def update(self, setname, options): diff --git a/lib/portage/_sets/dbapi.py b/lib/portage/_sets/dbapi.py index 5d78fd1d3..5c600ec9e 100644 --- a/lib/portage/_sets/dbapi.py +++ b/lib/portage/_sets/dbapi.py @@ -1,8 +1,9 @@ -# Copyright 2007-2014 Gentoo Foundation +# Copyright 2007-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 from __future__ import division +import glob import re import time @@ -67,11 +68,19 @@ class OwnerSet(PackageSet): def mapPathsToAtoms(self, paths, exclude_paths=None): """ - All paths must begin with a slash, must include EPREFIX, and - must not include ROOT. + All paths must begin with a slash, and must not include EROOT. + Supports globs. """ rValue = set() vardb = self._db + + eroot = vardb.settings['EROOT'] + expanded_paths = [] + for p in paths: + expanded_paths.extend(expanded_p[len(eroot)-1:] for expanded_p in + glob.iglob(os.path.join(eroot, p.lstrip(os.sep)))) + paths = expanded_paths + pkg_str = vardb._pkg_str if exclude_paths is None: for link, p in vardb._owners.iter_owners(paths):