summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2015-06-27 11:58:17 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-06-27 13:04:03 +0200
commitd0be66015ab86ecdc34025bb870e8e4d5897ceec (patch)
treed1b142ffa9506c8de40c1a6335b5b16740e4d0db
parent8bd03adb6168b16222510f2e1a148f2ad5ea3afb (diff)
git-update: Improve error message on invalid pkgbase
When the package base does not match the repository name, we currently show an error message that only mentions the package base name: error: invalid pkgbase: yate-qt4 To the end user this sounds like the package base name is malformed itself (and we show exactly the same error message when it contains invalid characters, indeed). Clarify that there is a name mismatch by also printing the expected value: error: invalid pkgbase: yate-qt4, expected: yate4-qt Inspired by FS#45483. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
-rwxr-xr-xgit-interface/git-update.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-interface/git-update.py b/git-interface/git-update.py
index 3987087..592f127 100755
--- a/git-interface/git-update.py
+++ b/git-interface/git-update.py
@@ -286,7 +286,7 @@ srcinfo = aurinfo.ParseAurinfoFromIterable(srcinfo_raw)
srcinfo_pkgbase = srcinfo._pkgbase['pkgname']
if srcinfo_pkgbase != pkgbase:
- die('invalid pkgbase: {:s}'.format(srcinfo_pkgbase))
+ die('invalid pkgbase: {:s}, expected {:s}'.format(srcinfo_pkgbase, pkgbase))
pkgbase = srcinfo._pkgbase['pkgname']
cur.execute("SELECT ID FROM PackageBases WHERE Name = %s", [pkgbase])