Gentoo Archives: gentoo-portage-dev

From: Aaron Bauman <bman@g.o>
To: gentoo-portage-dev@l.g.o
Cc: Aaron Bauman <bman@g.o>
Subject: [gentoo-portage-dev] [PATCH 32/68] lib/_emerge/unmerge.py: fix whitespace
Date: Mon, 03 Aug 2020 22:45:25
Message-Id: 20200803224327.1593726-32-bman@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH 01/68] lib/portage/util/_dyn_libs/PreservedLibsRegistry.py: fix whitespace by Aaron Bauman
1 Signed-off-by: Aaron Bauman <bman@g.o>
2 ---
3 lib/_emerge/unmerge.py | 28 ++++++++++++++--------------
4 1 file changed, 14 insertions(+), 14 deletions(-)
5
6 diff --git a/lib/_emerge/unmerge.py b/lib/_emerge/unmerge.py
7 index 8de35a6ef..5204ac6f0 100644
8 --- a/lib/_emerge/unmerge.py
9 +++ b/lib/_emerge/unmerge.py
10 @@ -1,4 +1,4 @@
11 -# Copyright 1999-2014 Gentoo Foundation
12 +# Copyright 1999-2020 Gentoo Authors
13 # Distributed under the terms of the GNU General Public License v2
14
15 from __future__ import print_function
16 @@ -129,24 +129,24 @@ def _unmerge_display(root_config, myopts, unmerge_action,
17 if not os.path.exists(x):
18 print("\n!!! The path '"+x+"' doesn't exist.\n")
19 return 1, {}
20 -
21 +
22 absx = os.path.abspath(x)
23 sp_absx = absx.split("/")
24 if sp_absx[-1][-7:] == ".ebuild":
25 del sp_absx[-1]
26 absx = "/".join(sp_absx)
27 -
28 +
29 sp_absx_len = len(sp_absx)
30 -
31 +
32 vdb_path = os.path.join(settings["EROOT"], portage.VDB_PATH)
33 -
34 +
35 sp_vdb = vdb_path.split("/")
36 sp_vdb_len = len(sp_vdb)
37 -
38 +
39 if not os.path.exists(absx+"/CONTENTS"):
40 print("!!! Not a valid db dir: "+str(absx))
41 return 1, {}
42 -
43 +
44 if sp_absx_len <= sp_vdb_len:
45 # The Path is shorter... so it can't be inside the vdb.
46 print(sp_absx)
47 @@ -154,7 +154,7 @@ def _unmerge_display(root_config, myopts, unmerge_action,
48 print("\n!!!",x,"cannot be inside "+ \
49 vdb_path+"; aborting.\n")
50 return 1, {}
51 -
52 +
53 for idx in range(0,sp_vdb_len):
54 if idx >= sp_absx_len or sp_vdb[idx] != sp_absx[idx]:
55 print(sp_absx)
56 @@ -162,11 +162,11 @@ def _unmerge_display(root_config, myopts, unmerge_action,
57 print("\n!!!", x, "is not inside "+\
58 vdb_path+"; aborting.\n")
59 return 1, {}
60 -
61 +
62 print("="+"/".join(sp_absx[sp_vdb_len:]))
63 candidate_catpkgs.append(
64 "="+"/".join(sp_absx[sp_vdb_len:]))
65 -
66 +
67 newline=""
68 if (not "--quiet" in myopts):
69 newline="\n"
70 @@ -200,7 +200,7 @@ def _unmerge_display(root_config, myopts, unmerge_action,
71 print(" " + green(i))
72 print()
73 sys.exit(1)
74 -
75 +
76 if not mymatch and x[0] not in "<>=~":
77 mymatch = localtree.dep_match(x)
78 if not mymatch:
79 @@ -289,7 +289,7 @@ def _unmerge_display(root_config, myopts, unmerge_action,
80 if global_unmerge and not numselected:
81 portage.writemsg_stdout("\n>>> No outdated packages were found on your system.\n")
82 return 1, {}
83 -
84 +
85 if not numselected:
86 portage.writemsg_stdout(
87 "\n>>> No packages selected for removal by " + \
88 @@ -319,7 +319,7 @@ def _unmerge_display(root_config, myopts, unmerge_action,
89 del stop, pos
90
91 # we don't want to unmerge packages that are still listed in user-editable package sets
92 - # listed in "world" as they would be remerged on the next update of "world" or the
93 + # listed in "world" as they would be remerged on the next update of "world" or the
94 # relevant package sets.
95 unknown_sets = set()
96 for cp in range(len(pkgmap)):
97 @@ -356,7 +356,7 @@ def _unmerge_display(root_config, myopts, unmerge_action,
98
99 parents = []
100 for s in installed_sets:
101 - # skip sets that the user requested to unmerge, and skip world
102 + # skip sets that the user requested to unmerge, and skip world
103 # user-selected set, since the package will be removed from
104 # that set later on.
105 if s in root_config.setconfig.active or s == "selected":
106 --
107 2.28.0