from daklib.gpg import SignedFile
from daklib.regexes import *
+import daklib.packagelist
-class InvalidChangesException(Exception):
+class UploadException(Exception):
pass
-class InvalidBinaryException(Exception):
+class InvalidChangesException(UploadException):
pass
-class InvalidSourceException(Exception):
+class InvalidBinaryException(UploadException):
pass
-class InvalidHashException(Exception):
+class InvalidSourceException(UploadException):
+ pass
+
+class InvalidHashException(UploadException):
def __init__(self, filename, hash_name, expected, actual):
self.filename = filename
self.hash_name = hash_name
"might already be known to the archive software.") \
.format(self.hash_name, self.filename, self.expected, self.actual)
-class InvalidFilenameException(Exception):
+class InvalidFilenameException(UploadException):
def __init__(self, filename):
self.filename = filename
def __str__(self):
"""
return self._signed_file.valid
+ @property
+ def signature_timestamp(self):
+ return self._signed_file.signature_timestamp
+
+ @property
+ def contents_sha1(self):
+ return self._signed_file.contents_sha1
+
@property
def architectures(self):
"""list of architectures included in the upload
version = self.control['Version']
return (match.group('package'), version)
+ @property
+ def name(self):
+ return self.control['Package']
+
@property
def type(self):
"""package type ('deb' or 'udeb')
@type: dict-like
"""
+ self.package_list = daklib.packagelist.PackageList(self.dsc)
+ """Information about packages built by the source.
+ @type: daklib.packagelist.PackageList
+ """
+
self._files = None
@classmethod