X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fdbconn.py;h=3a7f55bbe942df3db4807865dd28a7bf2203627a;hb=2e2d8e7081496b3214a31a8dc1d85f8b84dff6a8;hp=973fa797552fe3ae86025e4ccff7d9e31248743a;hpb=bb5af8d977c37a187eaa1661bfc9f0f2512a0745;p=dak.git diff --git a/daklib/dbconn.py b/daklib/dbconn.py old mode 100644 new mode 100755 index 973fa797..3a7f55bb --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -109,11 +109,11 @@ class DebVersion(UserDefinedType): return None sa_major_version = sqlalchemy.__version__[0:3] -if sa_major_version in ["0.5", "0.6", "0.7", "0.8", "0.9"]: +if sa_major_version in ["0.5", "0.6", "0.7", "0.8", "0.9", "1.0"]: from sqlalchemy.databases import postgres postgres.ischema_names['debversion'] = DebVersion else: - raise Exception("dak only ported to SQLA versions 0.5 to 0.9. See daklib/dbconn.py") + raise Exception("dak only ported to SQLA versions 0.5 to 1.0 (%s installed). See daklib/dbconn.py" % sa_major_version) ################################################################################ @@ -1031,7 +1031,7 @@ class Keyring(object): l.simple_bind_s("","") Attrs = l.search_s(LDAPDn, ldap.SCOPE_ONELEVEL, - "(&(keyfingerprint=*)(gidnumber=%s))" % (cnf["Import-Users-From-Passwd::ValidGID"]), + "(&(keyfingerprint=*)(supplementaryGid=%s))" % (cnf["Import-Users-From-Passwd::ValidGID"]), ["uid", "keyfingerprint", "cn", "mn", "sn"]) ldap_fin_uid_id = {} @@ -1721,7 +1721,7 @@ class DBSource(ORMObject): 'install_date', 'binaries_count', 'uploaders_count'] def not_null_constraints(self): - return ['source', 'version', 'install_date', 'maintainer', \ + return ['source', 'version', 'maintainer', \ 'changedby', 'poolfile'] def read_control_fields(self): @@ -2548,6 +2548,7 @@ class DBConn(object): 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,