X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Farchive.py;h=bb9b051a3f05077d734237192fd21bb2945ccddb;hb=6a6d627c2d86e2acb263107ab2f115a8a68428f9;hp=6a424cdfdc08a91632daff29bc2785d8d7a637bf;hpb=76bcea909c8a45646123385d82793e8d00ba87b7;p=dak.git diff --git a/daklib/archive.py b/daklib/archive.py index 6a424cdf..bb9b051a 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 @@ -652,7 +652,13 @@ class ArchiveUpload(object): continue fs.copy(src, dst, mode=0o640) - source = self.changes.source + source = None + try: + source = self.changes.source + except Exception: + # Do not raise an exception here if the .dsc is invalid. + pass + if source is not None: for f in source.files.itervalues(): src = os.path.join(self.original_directory, f.filename) @@ -661,7 +667,7 @@ class ArchiveUpload(object): try: db_file = self.transaction.get_file(f, source.dsc['Source'], check_hashes=False) db_archive_file = session.query(ArchiveFile).filter_by(file=db_file).first() - fs.copy(db_archive_file.path, dst, symlink=True) + fs.copy(db_archive_file.path, dst, mode=0o640) except KeyError: # Ignore if get_file could not find it. Upload will # probably be rejected later. @@ -881,9 +887,8 @@ class ArchiveUpload(object): try: # Validate signatures and hashes before we do any real work: for chk in ( - checks.SignatureCheck, + checks.SignatureAndHashesCheck, checks.ChangesCheck, - checks.HashesCheck, checks.ExternalHashesCheck, checks.SourceCheck, checks.BinaryCheck,