mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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: Raansu <Gero3977@gmail.com> Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
5fb7a74e23
commit
cc6c7a1caa
1 changed files with 5 additions and 1 deletions
|
@ -132,8 +132,12 @@ def ParseAurinfoFromIterable(iterable, ecatcher=None):
|
||||||
|
|
||||||
if key == 'pkgbase':
|
if key == 'pkgbase':
|
||||||
current_package = aurinfo.SetPkgbase(value)
|
current_package = aurinfo.SetPkgbase(value)
|
||||||
else:
|
elif key == 'pkgname':
|
||||||
current_package = aurinfo.AddPackage(value)
|
current_package = aurinfo.AddPackage(value)
|
||||||
|
else:
|
||||||
|
ecatcher.Catch(lineno, 'unexpected new section not starting '
|
||||||
|
'with \'pkgname\' found')
|
||||||
|
continue
|
||||||
else:
|
else:
|
||||||
# package attribute
|
# package attribute
|
||||||
if current_package is None:
|
if current_package is None:
|
||||||
|
|
Loading…
Add table
Reference in a new issue