From: Ansgar Burchardt Date: Sun, 25 Nov 2012 10:48:41 +0000 (+0100) Subject: Merge remote-tracking branch 'origin/master' X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=814614af551e54bf2479ff7f0bde1023f69d68cb;hp=89cf7ca5f2f93b8e03591ca79c6b58c351f0ce29;p=dak.git Merge remote-tracking branch 'origin/master' --- diff --git a/config/debian/apache.conf-incoming b/config/debian/apache.conf-incoming index 0b6c4db2..480ce0f8 100644 --- a/config/debian/apache.conf-incoming +++ b/config/debian/apache.conf-incoming @@ -34,6 +34,11 @@ # test access to check functionality, ganneff allow from 213.146.108.162 + # for testing sbuild-db; rleigh@codelibre.net + # nagini.codelibre.net + allow from 80.68.93.164 + allow from 2001:41c8:1:5750::2 + # Should be in DSA list # amd64 # vitry (archive rebuild) diff --git a/dak/admin.py b/dak/admin.py index 8ba79797..0de7cd69 100755 --- a/dak/admin.py +++ b/dak/admin.py @@ -103,6 +103,7 @@ Perform administrative work on the dak database. primary mirror MIRROR. archive rm NAME remove archive NAME (will only work if there are no files and no suites in the archive) + archive rename OLD NEW rename archive OLD to NEW version-check / v-c: v-c list show version checks for all suites @@ -429,10 +430,23 @@ def archive_rm(name): else: session.commit() +def archive_rename(oldname, newname): + session = DBConn().session() + archive = get_archive(oldname, session) + archive.archive_name = newname + session.flush() + + if dryrun: + session.rollback() + else: + session.commit() + def archive(command): mode = command[1] if mode == 'list': archive_list() + elif mode == 'rename': + archive_rename(command[2], command[3]) elif mode == 'add': archive_add(command[2:]) elif mode == 'rm': diff --git a/daklib/archive.py b/daklib/archive.py index 6a424cdf..ca58da87 100644 --- a/daklib/archive.py +++ b/daklib/archive.py @@ -86,7 +86,7 @@ class ArchiveTransaction(object): Will not give an error when the file is already present. @rtype: L{daklib.dbconn.PoolFile} - @return: batabase object for the new file + @return: database object for the new file """ session = self.session diff --git a/daklib/dbconn.py b/daklib/dbconn.py index f2f8a902..413a0fdd 100644 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -2892,7 +2892,7 @@ class DBConn(object): engine_args['pool_size'] = int(cnf['DB::PoolSize']) if cnf.has_key('DB::MaxOverflow'): engine_args['max_overflow'] = int(cnf['DB::MaxOverflow']) - if sa_major_version == '0.6' and cnf.has_key('DB::Unicode') and \ + if sa_major_version in ('0.6', '0.7') and cnf.has_key('DB::Unicode') and \ cnf['DB::Unicode'] == 'false': engine_args['use_native_unicode'] = False