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

Side by Side Diff: pym/_emerge/UnmergeDepPriority.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 | « pym/_emerge/Dependency.py ('k') | pym/_emerge/create_depgraph_params.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 UnmergeDepPriority(AbstractDepPriority): 5 class UnmergeDepPriority(AbstractDepPriority):
6 » __slots__ = ("optional", "satisfied",) 6 » __slots__ = ("ignored", "optional", "satisfied",)
7 """ 7 """
8 Combination of properties Priority Category 8 Combination of properties Priority Category
9 9
10 runtime 0 HARD 10 runtime 0 HARD
11 runtime_post -1 HARD 11 runtime_post -1 HARD
12 buildtime -2 SOFT 12 buildtime -2 SOFT
13 (none of the above) -2 SOFT 13 (none of the above) -2 SOFT
14 """ 14 """
15 15
16 MAX = 0 16 MAX = 0
17 SOFT = -2 17 SOFT = -2
18 MIN = -2 18 MIN = -2
19 19
20 def __init__(self, **kwargs): 20 def __init__(self, **kwargs):
21 AbstractDepPriority.__init__(self, **kwargs) 21 AbstractDepPriority.__init__(self, **kwargs)
22 if self.buildtime: 22 if self.buildtime:
23 self.optional = True 23 self.optional = True
24 24
25 def __int__(self): 25 def __int__(self):
26 if self.runtime: 26 if self.runtime:
27 return 0 27 return 0
28 if self.runtime_post: 28 if self.runtime_post:
29 return -1 29 return -1
30 if self.buildtime: 30 if self.buildtime:
31 return -2 31 return -2
32 return -2 32 return -2
33 33
34 def __str__(self): 34 def __str__(self):
35 if self.ignored:
36 return "ignored"
35 myvalue = self.__int__() 37 myvalue = self.__int__()
36 if myvalue > self.SOFT: 38 if myvalue > self.SOFT:
37 return "hard" 39 return "hard"
38 return "soft" 40 return "soft"
39 41
OLDNEW
« no previous file with comments | « pym/_emerge/Dependency.py ('k') | pym/_emerge/create_depgraph_params.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698