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)