1 |
On Thu, 2017-02-23 at 02:52 -0800, Zac Medico wrote: |
2 |
> Support -* in order to make it easier to create profiles for |
3 |
> minimal systems (especially those built entirely from binary |
4 |
> packages). |
5 |
|
6 |
Would be nice, but I don't get what the "packages" file is? |
7 |
|
8 |
> |
9 |
> X-Gentoo-Bug: 610670 |
10 |
> X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=610670 |
11 |
> --- |
12 |
> pym/portage/util/__init__.py | 9 ++++++++- |
13 |
> 1 file changed, 8 insertions(+), 1 deletion(-) |
14 |
> |
15 |
> diff --git a/pym/portage/util/__init__.py b/pym/portage/util/__init__.py |
16 |
> index c2c871f..45710ba 100644 |
17 |
> --- a/pym/portage/util/__init__.py |
18 |
> +++ b/pym/portage/util/__init__.py |
19 |
> @@ -478,13 +478,20 @@ def grabfile_package(myfilename, compatlevel=0, recursive=0, |
20 |
> eapi = read_corresponding_eapi_file( |
21 |
> myfilename, default=eapi_default) |
22 |
> mybasename = os.path.basename(myfilename) |
23 |
> + is_packages_file = mybasename == 'packages' |
24 |
> atoms = [] |
25 |
> for pkg, source_file in pkgs: |
26 |
> pkg_orig = pkg |
27 |
> # for packages and package.mask files |
28 |
> if pkg[:1] == "-": |
29 |
> + if is_packages_file and pkg == '-*': |
30 |
> + if remember_source_file: |
31 |
> + atoms.append((pkg, source_file)) |
32 |
> + else: |
33 |
> + atoms.append(pkg) |
34 |
> + continue |
35 |
> pkg = pkg[1:] |
36 |
> - if pkg[:1] == '*' and mybasename == 'packages': |
37 |
> + if pkg[:1] == '*' and is_packages_file: |
38 |
> pkg = pkg[1:] |
39 |
> try: |
40 |
> pkg = Atom(pkg, allow_wildcard=allow_wildcard, |