Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r9955 - main/trunk/pym/_emerge
Date: Thu, 24 Apr 2008 02:56:02
Message-Id: E1Jorct-0005Cw-OH@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-04-24 02:55:58 +0000 (Thu, 24 Apr 2008)
3 New Revision: 9955
4
5 Modified:
6 main/trunk/pym/_emerge/__init__.py
7 Log:
8 Handle potential InvalidDependString exceptions when match packages to
9 system and world atoms in depgraph.altlist().
10
11
12 Modified: main/trunk/pym/_emerge/__init__.py
13 ===================================================================
14 --- main/trunk/pym/_emerge/__init__.py 2008-04-24 02:48:45 UTC (rev 9954)
15 +++ main/trunk/pym/_emerge/__init__.py 2008-04-24 02:55:58 UTC (rev 9955)
16 @@ -3508,10 +3508,13 @@
17 # by a normal upgrade operation then require
18 # user intervention.
19 skip = False
20 - for atom in root_config.sets[
21 - "system"].iterAtomsForPackage(task):
22 + try:
23 + for atom in root_config.sets[
24 + "system"].iterAtomsForPackage(task):
25 + skip = True
26 + break
27 + except portage.exception.InvalidDependString:
28 skip = True
29 - break
30 if skip:
31 continue
32
33 @@ -3519,17 +3522,21 @@
34 # when necessary, as long as the atom will be satisfied
35 # in the final state.
36 graph_db = self.mydbapi[task.root]
37 - for atom in root_config.sets[
38 - "world"].iterAtomsForPackage(task):
39 - satisfied = False
40 - for cpv in graph_db.match(atom):
41 - if cpv == inst_pkg.cpv and inst_pkg in graph_db:
42 - continue
43 - satisfied = True
44 - break
45 - if not satisfied:
46 - skip = True
47 - break
48 + try:
49 + for atom in root_config.sets[
50 + "world"].iterAtomsForPackage(task):
51 + satisfied = False
52 + for cpv in graph_db.match(atom):
53 + if cpv == inst_pkg.cpv and \
54 + inst_pkg in graph_db:
55 + continue
56 + satisfied = True
57 + break
58 + if not satisfied:
59 + skip = True
60 + break
61 + except portage.exception.InvalidDependString:
62 + skip = True
63 if skip:
64 continue
65
66
67 --
68 gentoo-commits@l.g.o mailing list