1 |
Author: zmedico |
2 |
Date: 2008-08-01 07:05:00 +0000 (Fri, 01 Aug 2008) |
3 |
New Revision: 11309 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/_emerge/__init__.py |
7 |
Log: |
8 |
Bug #233252 - Handle InvalidAtom exceptions that can be raised from |
9 |
depgraph._add_dep() calls inside _add_pkg_deps(). |
10 |
|
11 |
|
12 |
Modified: main/trunk/pym/_emerge/__init__.py |
13 |
=================================================================== |
14 |
--- main/trunk/pym/_emerge/__init__.py 2008-08-01 04:51:07 UTC (rev 11308) |
15 |
+++ main/trunk/pym/_emerge/__init__.py 2008-08-01 07:05:00 UTC (rev 11309) |
16 |
@@ -4624,25 +4624,30 @@ |
17 |
return 0 |
18 |
if debug: |
19 |
print "Candidates:", selected_atoms |
20 |
+ |
21 |
for atom in selected_atoms: |
22 |
- if isinstance(atom, basestring) \ |
23 |
- and not portage.isvalidatom(atom): |
24 |
+ try: |
25 |
+ |
26 |
+ blocker = atom.startswith("!") |
27 |
+ if blocker: |
28 |
+ atom = atom[1:] |
29 |
+ mypriority = dep_priority.copy() |
30 |
+ if not blocker and vardb.match(atom): |
31 |
+ mypriority.satisfied = True |
32 |
+ |
33 |
+ if not self._add_dep(Dependency(atom=atom, |
34 |
+ blocker=blocker, depth=depth, parent=pkg, |
35 |
+ priority=mypriority, root=dep_root), |
36 |
+ allow_unsatisfied=allow_unsatisfied): |
37 |
+ return 0 |
38 |
+ |
39 |
+ except portage.exception.InvalidAtom, e: |
40 |
show_invalid_depstring_notice( |
41 |
- pkg, dep_string, str(atom)) |
42 |
+ pkg, dep_string, str(e)) |
43 |
+ del e |
44 |
if not pkg.installed: |
45 |
return 0 |
46 |
- continue |
47 |
- blocker = atom.startswith("!") |
48 |
- if blocker: |
49 |
- atom = atom[1:] |
50 |
- mypriority = dep_priority.copy() |
51 |
- if not blocker and vardb.match(atom): |
52 |
- mypriority.satisfied = True |
53 |
- if not self._add_dep(Dependency(atom=atom, |
54 |
- blocker=blocker, depth=depth, parent=pkg, |
55 |
- priority=mypriority, root=dep_root), |
56 |
- allow_unsatisfied=allow_unsatisfied): |
57 |
- return 0 |
58 |
+ |
59 |
if debug: |
60 |
print "Exiting...", jbigkey |
61 |
except ValueError, e: |