Meaningful error in aportgen musl*, when aports repo is outdated

This commit is contained in:
Oliver Smith 2017-06-15 02:55:28 +02:00
parent a9e28c9b8b
commit 55e276053a
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
1 changed files with 9 additions and 2 deletions

View File

@ -39,8 +39,15 @@ def generate(args, pkgname):
# Copy the apk files to the distfiles cache
for subpkgname in ["musl", "musl-dev"]:
path = glob.glob(args.work + "/cache_apk_" + arch + "/" + subpkgname +
"-" + version + ".*.apk")[0]
pattern = (args.work + "/cache_apk_" + arch + "/" + subpkgname +
"-" + version + ".*.apk")
glob_result = glob.glob(pattern)
if not len(glob_result):
raise RuntimeError("Could not find aport " + pattern + "!"
" Update your aports_upstream git repo"
" to the latest version, delete your http cache"
" (pmbootstrap zap -hc) and try again.")
path = glob_result[0]
path_target = (args.work + "/cache_distfiles/" + subpkgname + "-" +
version + "-" + arch + ".apk")
if not os.path.exists(path_target):