os.system("""apt-ftparchive -qq -o APT::FTPArchive::Release::Origin="%s" -o APT::FTPArchive::Release::Label="%s" -o APT::FTPArchive::Release::Description="%s" -o APT::FTPArchive::Release::Architectures="%s" release %s > Release""" % (self.origin, self.label, self.releasedescription, arches, bname))
+ # Crude hack with open and append, but this whole section is and should be redone.
+ if self.notautomatic:
+ release=open("Release", "a")
+ release.write("NotAutomatic: yes")
+ release.close()
+
# Sign if necessary
if self.signingkey:
cnf = Config()
__all__.append('get_source_in_suite')
+@session_wrapper
+def get_all_sources_in_suite(suitename, session=None):
+ """
+ Returns list of sources and versions found in a given suite
+
+ - B{suite} - a suite name, eg. I{unstable}
+
+ @type suite: string
+ @param suite: the suite name
+
+ @rtype: dictionary
+ @return: the version for I{source} in I{suite}
+
+ """
+ query = """SELECT source, version FROM source_suite
+ WHERE suite_name=:suitename
+ ORDER BY source"""
+
+ vals = {'suitename': suitename}
+
+ return session.execute(query, vals)
+
+__all__.append('get_all_sources_in_suite')
+
################################################################################
@session_wrapper
# Add the src_uploaders to the DB
uploader_ids = [source.maintainer_id]
if u.pkg.dsc.has_key("uploaders"):
- for up in u.pkg.dsc["uploaders"].split(","):
+ for up in u.pkg.dsc["uploaders"].replace(">, ", ">\t").split("\t"):
up = up.strip()
uploader_ids.append(get_or_set_maintainer(up, session).maintainer_id)