+def get_provides(suite):
+ provides = set()
+ session = DBConn().session()
+ query = '''SELECT DISTINCT value
+ FROM binaries_metadata m
+ JOIN bin_associations b
+ ON b.bin = m.bin_id
+ WHERE key_id = (
+ SELECT key_id
+ FROM metadata_keys
+ WHERE key = 'Provides' )
+ AND b.suite = (
+ SELECT id
+ FROM suite
+ WHERE suite_name = '%(suite)s'
+ OR codename = '%(suite)s')''' % \
+ {'suite': suite}
+ for p in session.execute(query):
+ for e in p:
+ for i in e.split(','):
+ provides.add(i.strip())
+ session.close()
+ return provides
+
+def create_depends_string (suite, depends_tree, session = None):