X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Farchive.py;h=410e9cabd7eabbcdc2d2ac243ed45faf0edc088f;hb=0d655827e4ec74001c12c5e78e22658e460dc6c3;hp=ecd5932494d14a88ea761a094bbb37ff6e613acd;hpb=f82de9f5e2c603f4443af5a663c3649350a18e43;p=dak.git diff --git a/daklib/archive.py b/daklib/archive.py index ecd59324..410e9cab 100644 --- a/daklib/archive.py +++ b/daklib/archive.py @@ -1061,14 +1061,26 @@ class ArchiveUpload(object): remaining = [] for f in byhand: - parts = f.filename.split('_', 2) - if len(parts) != 3: - print "W: unexpected byhand filename {0}. No automatic processing.".format(f.filename) - remaining.append(f) - continue + if '_' in f.filename: + parts = f.filename.split('_', 2) + if len(parts) != 3: + print "W: unexpected byhand filename {0}. No automatic processing.".format(f.filename) + remaining.append(f) + continue + + package, version, archext = parts + arch, ext = archext.split('.', 1) + else: + parts = f.filename.split('.') + if len(parts) < 2: + print "W: unexpected byhand filename {0}. No automatic processing.".format(f.filename) + remaining.append(f) + continue - package, version, archext = parts - arch, ext = archext.split('.', 1) + package = parts[0] + version = '0' + arch = 'all' + ext = parts[-1] try: rule = automatic_byhand_packages.subtree(package) @@ -1076,7 +1088,9 @@ class ArchiveUpload(object): remaining.append(f) continue - if rule['Source'] != self.changes.source_name or rule['Section'] != f.section or rule['Extension'] != ext: + if rule['Source'] != self.changes.source_name \ + or rule['Section'] != f.section \ + or ('Extension' in rule and rule['Extension'] != ext): remaining.append(f) continue