[entropy.client.interfaces.dep] SLOT intersection: alter dependency adding slot
Scenario: dependency = dev-lang/python SLOT intersection = enabled available slots = 2.6, 2.7, 3.2 installed slot = 2.7 The SLOT intersection feature worked correctly but in the end dev-lang/python was added to the unsatisfied set because there was a dev-lang/python-2.7 update as well. This results in other dep calculation code to match dev-lang/python against 3.2 instead. The SLOT intersection feature has to reduce the dependency string scope by adding a SLOT suffix (in this case: ":2.7"). This way the correct dependency is eventually pulled in.
This commit is contained in:
@@ -688,10 +688,18 @@ class CalculatorsMixin:
|
||||
if installed_slot in available_slots:
|
||||
# restrict my matching to installed_slot, rewrite
|
||||
# r_id r_repo
|
||||
# NOTE: assume that dependency has no tag nor etp rev
|
||||
# also, if we got multiple slots, it means that the
|
||||
# same dep is expressed without slot.
|
||||
old_r_id = r_id
|
||||
old_r_repo = r_repo
|
||||
r_id, r_repo = self.atom_match(
|
||||
dependency, match_slot = installed_slot)
|
||||
if r_id != -1:
|
||||
# append slot to dependency
|
||||
dependency += etpConst['entropyslotprefix'] \
|
||||
+ installed_slot
|
||||
|
||||
if const_debug_enabled():
|
||||
from_atom = self.open_repository(
|
||||
old_r_repo).retrieveAtom(old_r_id)
|
||||
|
||||
Reference in New Issue
Block a user