cubicweb #2330799 crash on db-dump --format=portable [validation pending]

Applications using the container cube annotate their entity classes with data that is used at registration time in hooks (amongst other).

However the appobjets directories are processed in "set order" and whenever hooks are processed before entities, the code burns.

The real fix would be to have proper annotations on Yams schemas; that would alleviate the need to annotate on entity classes and introduce an unwanted dependency between appobjects at registration time.

Traceback (most recent call last):
 File "/home/auc/bin/ctl", line 10, in <module>
 File "/home/auc/src/fcw/cubicweb/", line 1017, in run
 File "/home/auc/src/fcw/logilab/common/", line 134, in run
   sys.exit(command.main_run(args, rcfile))
 File "/home/auc/src/fcw/logilab/common/", line 263, in main_run
 File "/home/auc/src/fcw/cubicweb/server/", line 830, in run
   _local_dump(appid, self.config.output, format=self.config.format)
 File "/home/auc/src/fcw/cubicweb/server/", line 734, in _local_dump
   mih.backup_database(output, askconfirm=False, format=format)
 File "/home/auc/src/fcw/cubicweb/server/", line 198, in backup_database
   source.backup(osp.join(tmpdir, source.uri), self.confirm, format=format)
 File "/home/auc/src/fcw/cubicweb/server/sources/", line 376, in backup
 File "/home/auc/src/fcw/cubicweb/server/", line 354, in fill_schema
 File "/home/auc/src/fcw/cubicweb/server/", line 323, in set_schema
 File "/home/auc/src/fcw/cubicweb/", line 559, in set_schema
   self.reload(self.config.vregistry_path(), force_reload=False)
 File "/home/auc/src/fcw/cubicweb/", line 587, in reload
 File "/home/auc/src/fcw/cubicweb/", line 645, in register_objects
   path, self.config.extrapath)
 File "/home/auc/src/fcw/logilab/common/", line 578, in register_objects
   self.load_file(filepath, modname)
 File "/home/auc/src/fcw/logilab/common/", line 634, in load_file
 File "/home/auc/src/fcw/logilab/common/", line 639, in load_module
 File "/home/auc/src/fcw/cubes/pylos/hooks/", line 76, in registration_callback
   rtypes, etypes = case_static_structure(vreg)
 File "/home/auc/src/fcw/cubes/pylos/", line 17, in case_static_structure
   skiprtypes = vreg['etypes'].etype_class('Case').container_skiprtypes
AttributeError: type object 'Case' has no attribute 'container_skiprtypes'
done in3.14.8
load left0.000
closed by#a9a7ae11dfb0 [cwconfig] impose an order on appobject paths processing: entities first (closes #2330799)