X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fupload.py;h=dcd008aae5e28aa1e81aea1240eb823c24ee488d;hb=73e23995d806657f985ab44272905512a2368b55;hp=b0baf8cbade14966dca357ad46cae5a400c999ce;hpb=c47d45b655bbf9e6d13d21a1ebe4b5248f5d50df;p=dak.git diff --git a/daklib/upload.py b/daklib/upload.py index b0baf8cb..dcd008aa 100644 --- a/daklib/upload.py +++ b/daklib/upload.py @@ -269,6 +269,13 @@ class Changes(object): self._source = Source(self.directory, source_files, self._keyrings, self._require_signature) return self._source + @property + def source_name(self): + """source package name + @type: str + """ + return re_field_source.match(self.changes['Source']).group('package') + @property def binaries(self): """included binary packages @@ -432,6 +439,10 @@ class Source(object): raise InvalidSourceException("Multiple .dsc found ({0} and {1})".format(self._dsc_file.filename, f.filename)) else: self._dsc_file = f + + # make sure the hash for the dsc is valid before we use it + self._dsc_file.check(directory) + dsc_file_path = os.path.join(directory, self._dsc_file.filename) data = open(dsc_file_path, 'r').read() self._signed_file = SignedFile(data, keyrings, require_signature) @@ -482,3 +493,10 @@ class Source(object): if len(fields) > 1: return fields[0] return "main" + + @property + def filename(self): + """filename of .dsc file + @type: str + """ + return self._dsc_file.filename