From fd96d36a71cbc2ae299630860c874ed5938126f8 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Thu, 24 Nov 2011 16:09:30 +0100 Subject: [PATCH] [entropy.client.interfaces.dep] fix dependency calculation when ASAP scheduling is enabled (default) internal levels dict must be reinitialized every time deptree object is actually modified. At the same time, when making room on a certain deptree key (moving the entries to another key), make sure to always drop the dep item that is going to be written back. "equo install --empty --pretend lighttpd" triggered the issue. Thanks to micia for reporting. --- lib/entropy/client/interfaces/dep.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/entropy/client/interfaces/dep.py b/lib/entropy/client/interfaces/dep.py index 726e3c3ef..bc338abdd 100644 --- a/lib/entropy/client/interfaces/dep.py +++ b/lib/entropy/client/interfaces/dep.py @@ -1593,9 +1593,14 @@ class CalculatorsMixin: # rewrite deptree[level] = tuple((x for x in deptree[level] \ if x != post_dep)) + deptree[stick_level] = tuple((x for x in \ + deptree[stick_level] if x != post_dep)) + if deptree[stick_level]: _make_room(stick_level) + deptree[stick_level] = (post_dep,) + _setup_levels() def _get_required_packages(self, package_matches, empty_deps = False, deep_deps = False, relaxed_deps = False, build_deps = False,