[arch] fix -> AUR: multi-threaded download: not retrieving correctly some source files URLs

This commit is contained in:
Vinicius Moreira
2020-08-17 15:14:12 -03:00
parent 4f40c246a6
commit 11540cf1e7
2 changed files with 11 additions and 5 deletions

View File

@@ -52,10 +52,9 @@ def map_srcinfo(string: str, fields: Set[str] = None) -> dict:
else:
field_re = RE_SRCINFO_KEYS
for match in field_re.finditer(string):
field = RE_SPLIT_DEP.split(match.group(0))
key = field[0].strip()
val = field[1].strip()
for tupl in field_re.findall(string):
key = tupl[0].strip()
val = tupl[1].strip()
if key not in info:
info[key] = [val] if key in KNOWN_LIST_FIELDS else val
@@ -65,6 +64,11 @@ def map_srcinfo(string: str, fields: Set[str] = None) -> dict:
info[key].append(val)
pkgname = info.get('pkgname')
if isinstance(pkgname, list):
info['pkgname'] = pkgname[0]
return info