X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Farchive.py;h=372ab8a947b67c3cb0f8eefad470ae31fafd6866;hb=1eeb90f6bf381e10fcd8f0a04437883b443855d5;hp=e4804433be13afdb6cc5d18ac74a4ab5a40e477a;hpb=4db39fc2fdceac5ddae30507a65f24b3fe694137;p=dak.git diff --git a/daklib/archive.py b/daklib/archive.py index e4804433..372ab8a9 100644 --- a/daklib/archive.py +++ b/daklib/archive.py @@ -26,12 +26,12 @@ import daklib.upload as upload import daklib.utils as utils from daklib.fstransactions import FilesystemTransaction from daklib.regexes import re_changelog_versions, re_bin_only_nmu +import daklib.daksubprocess import apt_pkg from datetime import datetime import os import shutil -import subprocess from sqlalchemy.orm.exc import NoResultFound import sqlalchemy.exc import tempfile @@ -388,7 +388,7 @@ class ArchiveTransaction(object): """ session = self.session - if session.query(ArchiveFile).filter_by(archive=archive, file=db_file).first() is None: + if session.query(ArchiveFile).filter_by(archive=archive, component=component, file=db_file).first() is None: query = session.query(ArchiveFile).filter_by(file=db_file) if not allow_tainted: query = query.join(Archive).filter(Archive.tainted == False) @@ -695,7 +695,7 @@ class ArchiveUpload(object): sourcedir = os.path.join(self.directory, 'source') if not os.path.exists(sourcedir): devnull = open('/dev/null', 'w') - subprocess.check_call(["dpkg-source", "--no-copy", "--no-check", "-x", dsc_path, sourcedir], shell=False, stdout=devnull) + daklib.daksubprocess.check_call(["dpkg-source", "--no-copy", "--no-check", "-x", dsc_path, sourcedir], shell=False, stdout=devnull) if not os.path.isdir(sourcedir): raise Exception("{0} is not a directory after extracting source package".format(sourcedir)) return sourcedir @@ -1095,7 +1095,7 @@ class ArchiveUpload(object): continue script = rule['Script'] - retcode = subprocess.call([script, os.path.join(self.directory, f.filename), control['Version'], arch, os.path.join(self.directory, self.changes.filename)], shell=False) + retcode = daklib.daksubprocess.call([script, os.path.join(self.directory, f.filename), control['Version'], arch, os.path.join(self.directory, self.changes.filename)], shell=False) if retcode != 0: print "W: error processing {0}.".format(f.filename) remaining.append(f)