summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2015-06-13 01:52:08 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-06-14 17:58:55 +0200
commitcc6c7a1caa5abc4567bcc9ffaaf4261c18c35668 (patch)
treea148786715ef725b8dc0097c8deaa465831f98e8
parent5fb7a74e23b2059ec0c1acb72d8d804adbf05c52 (diff)
downloadaur-cc6c7a1caa5abc4567bcc9ffaaf4261c18c35668.tar.gz
aur-cc6c7a1caa5abc4567bcc9ffaaf4261c18c35668.tar.xz
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>
-rw-r--r--git-interface/aurinfo.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/git-interface/aurinfo.py b/git-interface/aurinfo.py
index d9b93729..86d07050 100644
--- a/git-interface/aurinfo.py
+++ b/git-interface/aurinfo.py
@@ -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: