X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fqueue.py;h=58fdf7f3115acc306807405457aa88386cf87881;hb=b31278febbe7fa99b8d703a0ee70a872c2e3882c;hp=519899fb44e6f0f45d5690bb2e14244d7cf4a892;hpb=076d0a9a0f88c8e86fc206b491f73ea6e8c71fa0;p=dak.git diff --git a/daklib/queue.py b/daklib/queue.py index 519899fb..58fdf7f3 100755 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -1899,8 +1899,8 @@ distribution.""" # Make sure that our source object is up-to-date session.expire(source) - # Add changelog information to the database - self.store_changelog() + # Add changelog information to the database + self.store_changelog() # Install the files into the pool for newfile, entry in self.pkg.files.items(): @@ -2677,6 +2677,13 @@ distribution.""" return too_new def store_changelog(self): + + # Skip binary-only upload if it is not a bin-NMU + if not self.pkg.changes['architecture'].has_key('source'): + from daklib.regexes import re_bin_only_nmu + if not re_bin_only_nmu.search(self.pkg.changes['version']): + return + session = DBConn().session() # Add current changelog text into changelogs_text table, return created ID @@ -2685,8 +2692,9 @@ distribution.""" # Link ID to the upload available in changes table query = """UPDATE changes SET changelog_id = :id WHERE source = :source - AND version = :version AND architecture LIKE '%source%'""" + AND version = :version AND architecture = :architecture""" session.execute(query, {'id': ID, 'source': self.pkg.changes['source'], \ - 'version': self.pkg.changes['version']}) + 'version': self.pkg.changes['version'], \ + 'architecture': " ".join(self.pkg.changes['architecture'].keys())}) session.commit()