if not u.pkg.changes["distribution"].has_key(suite):
return False
+ ret = True
+
if not u.pkg.changes["architecture"].has_key("source"):
s = DBConn().session()
q = s.query(SrcAssociation.sa_id)
q = q.filter_by(version=u.pkg.changes['version']).limit(1)
if q.count() < 1:
- return False
+ ret = False
- return True
+ s.close()
+
+ return ret
def package_to_queue(u, summary, short_summary, queue, perms=0660, build=True, announce=None):
cnf = Config()
q = session.execute("SELECT package FROM disembargo WHERE package = :source AND version = :version", u.pkg.changes)
if q.rowcount > 0:
+ session.close()
return True
oldcwd = os.getcwd()
disdir = os.getcwd()
os.chdir(oldcwd)
+ ret = False
+
if u.pkg.directory == disdir:
if u.pkg.changes["architecture"].has_key("source"):
if not Options["No-Action"]:
session.execute("INSERT INTO disembargo (package, version) VALUES (:package, :version)", u.pkg.changes)
session.commit()
- return True
+ ret = True
- return False
+ session.close()
+
+ return ret
def queue_unembargo(u, summary, short_summary):
return package_to_queue(u, summary, short_summary, "Unembargoed",