jhbuild r1847 - in trunk: . jhbuild tests
- From: fpeters svn gnome org
 
- To: svn-commits-list gnome org
 
- Subject: jhbuild r1847 - in trunk: . jhbuild tests
 
- Date: Fri, 18 Jan 2008 22:13:56 +0000 (GMT)
 
Author: fpeters
Date: Fri Jan 18 22:13:56 2008
New Revision: 1847
URL: http://svn.gnome.org/viewvc/jhbuild?rev=1847&view=rev
Log:
* jhbuild/moduleset.py, tests/tests.py: fixed skip option, as skipped
modules dependencies were not ignored (and fixed test case that I got
wrong).
Modified:
   trunk/ChangeLog
   trunk/jhbuild/moduleset.py
   trunk/tests/tests.py
Modified: trunk/jhbuild/moduleset.py
==============================================================================
--- trunk/jhbuild/moduleset.py	(original)
+++ trunk/jhbuild/moduleset.py	Fri Jan 18 22:13:56 2008
@@ -106,6 +106,11 @@
         # them for soft dependencies
         ordered = []
         state = {}
+
+        for modname in skip:
+            # mark skipped modules as already processed
+            state[self.modules.get(modname)] = 'processed'
+
         def order(modules, module, mode = 'dependencies'):
             if state.get(module, 'clean') == 'processed':
                 # already seen
@@ -142,10 +147,6 @@
             if i+1 == len(asked_modules): 
                 break
 
-        for skipped in skip:
-            if self.modules.get(skipped) in ordered:
-                ordered.remove(self.modules[skipped])
-
         return ordered
     
     def get_full_module_list(self, skip=[]):
Modified: trunk/tests/tests.py
==============================================================================
--- trunk/tests/tests.py	(original)
+++ trunk/tests/tests.py	Fri Jan 18 22:13:56 2008
@@ -43,7 +43,7 @@
         '''A straight chain of dependencies, with a module to skip'''
         self.moduleset.modules['foo'].dependencies = ['bar']
         self.moduleset.modules['bar'].dependencies = ['baz']
-        self.assertEqual(self.get_module_list(['foo'], ['bar']), ['baz', 'foo'])
+        self.assertEqual(self.get_module_list(['foo'], ['bar']), ['foo'])
 
     def test_dependency_chain_bi(self):
         '''A dividing chain of dependencies'''
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]