diff options
Diffstat (limited to 'src/fetch.c')
-rw-r--r-- | src/fetch.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/fetch.c b/src/fetch.c index b67a189..72b481d 100644 --- a/src/fetch.c +++ b/src/fetch.c @@ -109,20 +109,18 @@ static int fetch_package(struct fetch_ctx *fctx, return 0; } - apk_message("Downloading %s-%s", pkg->name->name, pkg->version); + apk_message("Downloading " PKG_VER_FMT, PKG_VER_PRINTF(pkg)); repo = apk_db_select_repo(db, pkg); if (repo == NULL) { - apk_error("%s-%s: package is not currently available", - pkg->name->name, pkg->version); + apk_error(PKG_VER_FMT ": package is not currently available", + PKG_VER_PRINTF(pkg)); return -1; } if (apk_flags & APK_SIMULATE) return 0; - snprintf(url, sizeof(url), "%s%s%s", repo->url, - repo->url[strlen(repo->url)-1] == '/' ? "" : "/", - pkgfile); + apk_repo_format_filename(url, sizeof(url), repo->url, pkg->arch, pkgfile); if (fctx->flags & FETCH_STDOUT) { fd = STDOUT_FILENO; |