Gentoo Archives: gentoo-commits

From: "Fabian Groffen (grobian)" <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r14771 - in main/branches/prefix: bin man pym/_emerge pym/portage pym/portage/dbapi
Date: Sun, 01 Nov 2009 10:56:22
Message-Id: E1N4Y6e-00080F-Bg@stork.gentoo.org
1 Author: grobian
2 Date: 2009-11-01 10:56:19 +0000 (Sun, 01 Nov 2009)
3 New Revision: 14771
4
5 Modified:
6 main/branches/prefix/bin/dohtml.py
7 main/branches/prefix/man/emerge.1
8 main/branches/prefix/man/repoman.1
9 main/branches/prefix/pym/_emerge/depgraph.py
10 main/branches/prefix/pym/_emerge/help.py
11 main/branches/prefix/pym/_emerge/main.py
12 main/branches/prefix/pym/_emerge/unmerge.py
13 main/branches/prefix/pym/portage/__init__.py
14 main/branches/prefix/pym/portage/dbapi/vartree.py
15 Log:
16 Merged from trunk -r14750:14767
17
18 | 14751 | Bug #259697 - Update IUSE.invalid docs for GLEP 56. |
19 | zmedico | |
20
21 | 14753 | Bug #291271 - Make vardbapi._bump_mtime() create category |
22 | zmedico | directories when necessary. |
23
24 | 14754 | Make dblink.delete() remove empty parent category |
25 | zmedico | directories. |
26
27 | 14755 | Make cacheddir() always behave like EmptyOnError is True, |
28 | zmedico | since listdir() doesn't handle a None return value |
29 | | correctly. |
30
31 | 14760 | Bug #290921 - Always exit unsuccessfully if -r is not |
32 | zmedico | specified and a directory is skipped. This reverts a |
33 | | behavior change from r9484. |
34
35 | 14761 | Allow unmerge of packages from the "selected" set when a |
36 | zmedico | package set such as @unavailable is given on the command |
37 | | line. Thanks to Vlastimil Babka <caster@g.o> for reporting. |
38
39 | 14762 | For compatibility, still exit successfully if there are |
40 | zmedico | skipped directories. We can make it more strict later. |
41
42 | 14763 | Add a --backtrack=COUNT option to control how many times |
43 | zmedico | backtracking is allowed, and reduce the default from 30 to |
44 | | 5. |
45
46 | 14767 | Fix --backtrack option handling. |
47 | zmedico | |
48
49
50 Modified: main/branches/prefix/bin/dohtml.py
51 ===================================================================
52 --- main/branches/prefix/bin/dohtml.py 2009-11-01 00:05:15 UTC (rev 14770)
53 +++ main/branches/prefix/bin/dohtml.py 2009-11-01 10:56:19 UTC (rev 14771)
54 @@ -176,14 +176,15 @@
55 dirname = os.path.dirname(x)
56 success |= install(basename, dirname, options)
57
58 + global skipped_directories
59 + for x in skipped_directories:
60 + eqawarn(["QA Notice: dohtml on directory " + \
61 + "'%s' without recursion option" % x])
62 +
63 if success:
64 retcode = 0
65 else:
66 retcode = 1
67 - global skipped_directories
68 - for x in skipped_directories:
69 - eqawarn(["QA Notice: dohtml on directory " + \
70 - "'%s' without recursion option" % x])
71
72 sys.exit(retcode)
73
74
75 Modified: main/branches/prefix/man/emerge.1
76 ===================================================================
77 --- main/branches/prefix/man/emerge.1 2009-11-01 00:05:15 UTC (rev 14770)
78 +++ main/branches/prefix/man/emerge.1 2009-11-01 10:56:19 UTC (rev 14771)
79 @@ -276,6 +276,11 @@
80 intended to be set in the \fBmake.conf\fR(5)
81 \fBEMERGE_DEFAULT_OPTS\fR variable.
82 .TP
83 +.BR \-\-backtrack=COUNT
84 +Specifies an integer number of times to backtrack if
85 +dependency calculation fails due to a conflict or an
86 +unsatisfied dependency (default: \'5\').
87 +.TP
88 .BR "\-\-binpkg\-respect\-use < y | n >"
89 Tells emerge to ignore binary packages if their use flags
90 don't match the current configuration. (default: \'n\')
91
92 Modified: main/branches/prefix/man/repoman.1
93 ===================================================================
94 --- main/branches/prefix/man/repoman.1 2009-11-01 00:05:15 UTC (rev 14770)
95 +++ main/branches/prefix/man/repoman.1 2009-11-01 10:56:19 UTC (rev 14771)
96 @@ -120,7 +120,7 @@
97 Ebuilds that have a missing or empty HOMEPAGE variable
98 .TP
99 .B IUSE.invalid
100 -This build has a variable in IUSE that is not in the use.desc or use.local.desc file
101 +This ebuild has a variable in IUSE that is not in the use.desc or its metadata.xml file
102 .TP
103 .B IUSE.undefined
104 This ebuild does not define IUSE (style guideline says to define IUSE even when empty)
105
106 Modified: main/branches/prefix/pym/_emerge/depgraph.py
107 ===================================================================
108 --- main/branches/prefix/pym/_emerge/depgraph.py 2009-11-01 00:05:15 UTC (rev 14770)
109 +++ main/branches/prefix/pym/_emerge/depgraph.py 2009-11-01 10:56:19 UTC (rev 14771)
110 @@ -5329,7 +5329,7 @@
111 def _backtrack_depgraph(settings, trees, myopts, myparams,
112 myaction, myfiles, spinner):
113
114 - backtrack_max = 30
115 + backtrack_max = myopts.get('--backtrack', 5)
116 runtime_pkg_mask = None
117 allow_backtracking = True
118 backtracked = 0
119
120 Modified: main/branches/prefix/pym/_emerge/help.py
121 ===================================================================
122 --- main/branches/prefix/pym/_emerge/help.py 2009-11-01 00:05:15 UTC (rev 14770)
123 +++ main/branches/prefix/pym/_emerge/help.py 2009-11-01 10:56:19 UTC (rev 14771)
124 @@ -279,6 +279,13 @@
125 for line in wrap(desc, desc_width):
126 print(desc_indent + line)
127 print()
128 + print(" " + green("--backtrack") + " " + turquoise("COUNT"))
129 + desc = "Specifies an integer number of times to backtrack if " + \
130 + "dependency calculation fails due to a conflict or an " + \
131 + "unsatisfied dependency (default: '5')."
132 + for line in wrap(desc, desc_width):
133 + print(desc_indent + line)
134 + print()
135 print(" " + green("--binpkg-respect-use") + \
136 " < " + turquoise("y") + " | " + turquoise("n") + " >")
137 desc = "Tells emerge to ignore binary packages if their use flags" + \
138
139 Modified: main/branches/prefix/pym/_emerge/main.py
140 ===================================================================
141 --- main/branches/prefix/pym/_emerge/main.py 2009-11-01 00:05:15 UTC (rev 14770)
142 +++ main/branches/prefix/pym/_emerge/main.py 2009-11-01 10:56:19 UTC (rev 14771)
143 @@ -511,6 +511,15 @@
144 "help":"temporarily override ACCEPT_PROPERTIES",
145 "action":"store"
146 },
147 +
148 + "--backtrack": {
149 +
150 + "help" : "Specifies how many times to backtrack if dependency " + \
151 + "calculation fails ",
152 +
153 + "action" : "store"
154 + },
155 +
156 "--config-root": {
157 "help":"specify the location for portage configuration files",
158 "action":"store"
159 @@ -732,6 +741,21 @@
160 if myoptions.selective == "True":
161 myoptions.selective = True
162
163 + if myoptions.backtrack is not None:
164 +
165 + try:
166 + backtrack = int(myoptions.backtrack)
167 + except (OverflowError, ValueError):
168 + backtrack = -1
169 +
170 + if backtrack < 0:
171 + backtrack = None
172 + if not silent:
173 + writemsg("!!! Invalid --backtrack parameter: '%s'\n" % \
174 + (myoptions.backtrack,), noiselevel=-1)
175 +
176 + myoptions.backtrack = backtrack
177 +
178 if myoptions.deep is not None:
179 deep = None
180 if myoptions.deep == "True":
181
182 Modified: main/branches/prefix/pym/_emerge/unmerge.py
183 ===================================================================
184 --- main/branches/prefix/pym/_emerge/unmerge.py 2009-11-01 00:05:15 UTC (rev 14770)
185 +++ main/branches/prefix/pym/_emerge/unmerge.py 2009-11-01 10:56:19 UTC (rev 14771)
186 @@ -332,10 +332,9 @@
187 parents = []
188 for s in installed_sets:
189 # skip sets that the user requested to unmerge, and skip world
190 - # unless we're unmerging a package set (as the package would be
191 - # removed from "world" later on)
192 - if s in root_config.setconfig.active or \
193 - (s == "selected" and not root_config.setconfig.active):
194 + # user-selected set, since the package will be removed from
195 + # that set later on.
196 + if s in root_config.setconfig.active or s == "selected":
197 continue
198
199 if s not in sets:
200
201 Modified: main/branches/prefix/pym/portage/__init__.py
202 ===================================================================
203 --- main/branches/prefix/pym/portage/__init__.py 2009-11-01 00:05:15 UTC (rev 14770)
204 +++ main/branches/prefix/pym/portage/__init__.py 2009-11-01 10:56:19 UTC (rev 14771)
205 @@ -543,13 +543,9 @@
206 if e.errno == portage.exception.PermissionDenied.errno:
207 raise portage.exception.PermissionDenied(mypath)
208 del e
209 - if EmptyOnError:
210 - return [], []
211 - return None, None
212 + return [], []
213 except portage.exception.PortageException:
214 - if EmptyOnError:
215 - return [], []
216 - return None, None
217 + return [], []
218 # Python retuns mtime in seconds, so if it was changed in the last few seconds, it could be invalid
219 if mtime != cached_mtime or time.time() - mtime < 4:
220 if mypath in dircache:
221 @@ -616,7 +612,7 @@
222 @type ignorelist: List
223 @param followSymlinks: Follow Symlink'd files and directories
224 @type followSymlinks: Boolean
225 - @param EmptyOnError: Return [] if an error occurs.
226 + @param EmptyOnError: Return [] if an error occurs (deprecated, always True)
227 @type EmptyOnError: Boolean
228 @param dirsonly: Only return directories.
229 @type dirsonly: Boolean
230
231 Modified: main/branches/prefix/pym/portage/dbapi/vartree.py
232 ===================================================================
233 --- main/branches/prefix/pym/portage/dbapi/vartree.py 2009-11-01 00:05:15 UTC (rev 14770)
234 +++ main/branches/prefix/pym/portage/dbapi/vartree.py 2009-11-01 10:56:19 UTC (rev 14771)
235 @@ -1824,8 +1824,11 @@
236 catdir = base + _os.sep + cat
237 t = time.time()
238 t = (t, t)
239 - for x in (catdir, base):
240 - os.utime(x, t)
241 + try:
242 + for x in (catdir, base):
243 + os.utime(x, t)
244 + except OSError:
245 + os.makedirs(catdir)
246
247 def cpv_exists(self, mykey):
248 "Tells us whether an actual ebuild exists on disk (no masking)"
249 @@ -2908,6 +2911,11 @@
250 return
251
252 shutil.rmtree(self.dbdir)
253 + # If empty, remove parent category directory.
254 + try:
255 + os.rmdir(os.path.dirname(self.dbdir))
256 + except OSError:
257 + pass
258 self.vartree.dbapi._remove(self)
259
260 def clearcontents(self):