__all__.append('get_component')
+def get_mapped_component_name(component_name):
+ cnf = Config()
+ for m in cnf.value_list("ComponentMappings"):
+ (src, dst) = m.split()
+ if component_name == src:
+ component_name = dst
+ return component_name
+
+__all__.append('get_mapped_component_name')
+
@session_wrapper
def get_mapped_component(component_name, session=None):
"""get component after mappings
@rtype: L{daklib.dbconn.Component} or C{None}
@return: component after applying maps or C{None}
"""
- cnf = Config()
- for m in cnf.value_list("ComponentMappings"):
- (src, dst) = m.split()
- if component_name == src:
- component_name = dst
+ component_name = get_mapped_component_name(component_name)
component = session.query(Component).filter_by(component_name=component_name).first()
return component
properties = dict(suite_id = self.tbl_suite.c.id,
policy_queue = relation(PolicyQueue, primaryjoin=(self.tbl_suite.c.policy_queue_id == self.tbl_policy_queue.c.id)),
new_queue = relation(PolicyQueue, primaryjoin=(self.tbl_suite.c.new_queue_id == self.tbl_policy_queue.c.id)),
+ debug_suite = relation(Suite, remote_side=[self.tbl_suite.c.id]),
copy_queues = relation(BuildQueue,
secondary=self.tbl_suite_build_queue_copy),
srcformats = relation(SrcFormat, secondary=self.tbl_suite_src_formats,