Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Side by Side Diff: pym/_emerge/DepPriority.py

Issue 6905107: Rebuild when build-time/run-time deps are upgraded. (Closed) Base URL: git://git.overlays.gentoo.org/proj/portage.git@master
Patch Set: Address review feedback, add tests. Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « man/emerge.1 ('k') | pym/_emerge/DepPriorityNormalRange.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 1999-2009 Gentoo Foundation 1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2 2 # Distributed under the terms of the GNU General Public License v2
3 3
4 from _emerge.AbstractDepPriority import AbstractDepPriority 4 from _emerge.AbstractDepPriority import AbstractDepPriority
5 class DepPriority(AbstractDepPriority): 5 class DepPriority(AbstractDepPriority):
6 6
7 » __slots__ = ("satisfied", "optional", "rebuild") 7 » __slots__ = ("satisfied", "optional", "rebuild", "ignored")
8 8
9 def __int__(self): 9 def __int__(self):
10 """ 10 """
11 Note: These priorities are only used for measuring hardness 11 Note: These priorities are only used for measuring hardness
12 in the circular dependency display via digraph.debug_print(), 12 in the circular dependency display via digraph.debug_print(),
13 and nothing more. For actual merge order calculations, the 13 and nothing more. For actual merge order calculations, the
14 measures defined by the DepPriorityNormalRange and 14 measures defined by the DepPriorityNormalRange and
15 DepPrioritySatisfiedRange classes are used. 15 DepPrioritySatisfiedRange classes are used.
16 16
17 Attributes Hardness 17 Attributes Hardness
18 18
19 buildtime 0 19 buildtime 0
20 runtime -1 20 runtime -1
21 runtime_post -2 21 runtime_post -2
22 optional -3 22 optional -3
23 (none of the above) -4 23 (none of the above) -4
24 24
25 """ 25 """
26 26
27 if self.optional:
28 return -3
27 if self.buildtime: 29 if self.buildtime:
28 return 0 30 return 0
29 if self.runtime: 31 if self.runtime:
30 return -1 32 return -1
31 if self.runtime_post: 33 if self.runtime_post:
32 return -2 34 return -2
33 if self.optional:
34 return -3
35 return -4 35 return -4
36 36
37 def __str__(self): 37 def __str__(self):
38 if self.ignored:
39 return "ignored"
38 if self.optional: 40 if self.optional:
39 return "optional" 41 return "optional"
40 if self.buildtime: 42 if self.buildtime:
41 return "buildtime" 43 return "buildtime"
42 if self.runtime: 44 if self.runtime:
43 return "runtime" 45 return "runtime"
44 if self.runtime_post: 46 if self.runtime_post:
45 return "runtime_post" 47 return "runtime_post"
46 return "soft" 48 return "soft"
47 49
OLDNEW
« no previous file with comments | « man/emerge.1 ('k') | pym/_emerge/DepPriorityNormalRange.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698