[aur-dev] [PATCH] aurinfo: Fix bug with space indents creating split packages
Johannes Löthberg
johannes at kyriasis.com
Fri Jun 12 23:52:08 UTC 2015
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 at gmail.com>
Signed-off-by: Johannes Löthberg <johannes at kyriasis.com>
---
git-interface/aurinfo.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/git-interface/aurinfo.py b/git-interface/aurinfo.py
index d9b9372..86d0705 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:
--
2.4.2
More information about the aur-dev
mailing list