Commit cc6c7a1c authored by Johannes Löthberg's avatar Johannes Löthberg Committed by Lukas Fleischer
Browse files

aurinfo: Fix bug with space indents creating split packages



If a .SRCINFO line doesn't start with a tab, check if the key is pkgname
before adding it as a package.

Fixes a bug where if you have accidentally gotten a line indented with
spaces, from that line forward it will think it is a split package,
instead of erroring out.
Reported-by: default avatarRaansu <Gero3977@gmail.com>
Signed-off-by: Johannes Löthberg's avatarJohannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer's avatarLukas Fleischer <lfleischer@archlinux.org>
parent 5fb7a74e
......@@ -132,8 +132,12 @@ def ParseAurinfoFromIterable(iterable, ecatcher=None):
if key == 'pkgbase':
current_package = aurinfo.SetPkgbase(value)
else:
elif key == 'pkgname':
current_package = aurinfo.AddPackage(value)
else:
ecatcher.Catch(lineno, 'unexpected new section not starting '
'with \'pkgname\' found')
continue
else:
# package attribute
if current_package is None:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment