]> git.decadent.org.uk Git - dak.git/commitdiff
Merge commit 'stew/contents' into merge
authorJoerg Jaspert <joerg@debian.org>
Fri, 30 Oct 2009 09:10:17 +0000 (10:10 +0100)
committerJoerg Jaspert <joerg@debian.org>
Fri, 30 Oct 2009 09:10:17 +0000 (10:10 +0100)
* commit 'stew/contents':
  bootstrap_bin working
  merge from master with sqla

Signed-off-by: Joerg Jaspert <joerg@debian.org>
dak/dakdb/update17.py [changed mode: 0644->0755]
daklib/config.py
daklib/dbconn.py
daklib/utils.py

old mode 100644 (file)
new mode 100755 (executable)
index 0d7efa9..c4e0f24
@@ -44,7 +44,7 @@ def do_update(self):
         file text,
         binary_id integer,
         UNIQUE(file,binary_id))""" )
-        
+
         c.execute("""ALTER TABLE ONLY bin_contents
         ADD CONSTRAINT bin_contents_bin_fkey
         FOREIGN KEY (binary_id) REFERENCES binaries(id)
@@ -52,7 +52,8 @@ def do_update(self):
 
         c.execute("""CREATE INDEX ind_bin_contents_binary ON bin_contents(binary_id);""" )
 
-        self.db.commit()
+        c.execute("UPDATE config SET value = '17' WHERE name = 'db_revision'")
+       self.db.commit()
 
     except psycopg2.ProgrammingError, msg:
         self.db.rollback()
index b98a6fc9db5e926b7c4871241b22fc8855a0c683..c2d2fe5506c675682db0de4b464d310ca2d2fa82 100755 (executable)
@@ -35,8 +35,7 @@ from singleton import Singleton
 
 ################################################################################
 
-#default_config = "/etc/dak/dak.conf"
-default_config = "/home/stew/etc/dak/dak.conf"     #: default dak config, defines host properties
+default_config = "/etc/dak/dak.conf" #: default dak config, defines host properties
 
 def which_conf_file(Cnf):
     res = socket.gethostbyaddr(socket.gethostname())
index 1a1902d5dd3da64dd9b35facecbf29e79abe8f7a..49468a7556c250f314fe2370700f4c3cc7b2f98e 100755 (executable)
@@ -637,7 +637,7 @@ def insert_content_paths(binary_id, fullpaths, session=None):
         for fullpath in fullpaths:
             if fullpath.startswith( './' ):
                 fullpath = fullpath[2:]
-            
+
             session.execute( "INSERT INTO bin_contents ( file, binary_id ) VALUES ( :filename, :id )", { 'filename': fullpath, 'id': binary_id}  )
 
         session.commit()
index 21446fbe9f435685f8c2dcd0c2c8585f7db1b41c..b0e9a0d74c83e8c57d48f4fc82a46456f3224666 100755 (executable)
@@ -305,13 +305,13 @@ def check_hash(where, files, hashname, hashfunc):
         try:
             try:
                 file_handle = open_file(f)
-    
+
                 # Check for the hash entry, to not trigger a KeyError.
                 if not files[f].has_key(hash_key(hashname)):
                     rejmsg.append("%s: misses %s checksum in %s" % (f, hashname,
                         where))
                     continue
-    
+
                 # Actually check the hash for correctness.
                 if hashfunc(file_handle) != files[f][hash_key(hashname)]:
                     rejmsg.append("%s: %s check failed in %s" % (f, hashname,