[cwconfig] impose an order on appobject paths processing: entities first (closes #2330799)
--- a/cwconfig.py Tue Apr 24 10:31:46 2012 +0200
+++ b/cwconfig.py Fri Apr 27 14:10:04 2012 +0200
@@ -700,7 +700,9 @@
vregpath = []
if evobjpath is None:
evobjpath = cls.cubicweb_appobject_path
- for subdir in evobjpath:
+ # NOTE: for the order, see http://www.cubicweb.org/ticket/2330799
+ # it is clearly a workaround
+ for subdir in sorted(evobjpath, key=lambda x:x != 'entities'):
path = join(CW_SOFTWARE_ROOT, subdir)
if exists(path):
vregpath.append(path)
@@ -712,7 +714,8 @@
if tvobjpath is None:
tvobjpath = cls.cube_appobject_path
for directory in templpath:
- for subdir in tvobjpath:
+ # NOTE: for the order, see http://www.cubicweb.org/ticket/2330799
+ for subdir in sorted(tvobjpath, key=lambda x:x != 'entities'):
path = join(directory, subdir)
if exists(path):
vregpath.append(path)