public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* [gentoo-portage-dev] [PATCH] grabfile_package: support -* in profile "packages" files (bug 610670)
@ 2017-02-23 10:52 99% Zac Medico
  0 siblings, 0 replies; 1+ results
From: Zac Medico @ 2017-02-23 10:52 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Zac Medico

Support -* in order to make it easier to create profiles for
minimal systems (especially those built entirely from binary
packages).

X-Gentoo-Bug: 610670
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=610670
---
 pym/portage/util/__init__.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/pym/portage/util/__init__.py b/pym/portage/util/__init__.py
index c2c871f..45710ba 100644
--- a/pym/portage/util/__init__.py
+++ b/pym/portage/util/__init__.py
@@ -478,13 +478,20 @@ def grabfile_package(myfilename, compatlevel=0, recursive=0,
 		eapi = read_corresponding_eapi_file(
 			myfilename, default=eapi_default)
 	mybasename = os.path.basename(myfilename)
+	is_packages_file = mybasename == 'packages'
 	atoms = []
 	for pkg, source_file in pkgs:
 		pkg_orig = pkg
 		# for packages and package.mask files
 		if pkg[:1] == "-":
+			if is_packages_file and pkg == '-*':
+				if remember_source_file:
+					atoms.append((pkg, source_file))
+				else:
+					atoms.append(pkg)
+				continue
 			pkg = pkg[1:]
-		if pkg[:1] == '*' and mybasename == 'packages':
+		if pkg[:1] == '*' and is_packages_file:
 			pkg = pkg[1:]
 		try:
 			pkg = Atom(pkg, allow_wildcard=allow_wildcard,
-- 
2.10.2



^ permalink raw reply related	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2017-02-23 10:52 99% [gentoo-portage-dev] [PATCH] grabfile_package: support -* in profile "packages" files (bug 610670) Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox