diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-04-20 17:51:44 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-04-20 17:51:44 +0200 |
commit | f372bfd978be3874c3361cc022e8fc5842657ad2 (patch) | |
tree | c058b1de64347d4e65e862a1f5f9124434240a24 /src/fetch.c | |
parent | fde9ad1782dd4ddb28c428b488e0278471a91c90 (diff) | |
parent | 35bba3de1f4d6464dc03ffc60b6a6b6ec25ef6b0 (diff) | |
download | apk-tools-f372bfd978be3874c3361cc022e8fc5842657ad2.tar.bz2 apk-tools-f372bfd978be3874c3361cc022e8fc5842657ad2.tar.xz |
Conflicts:
src/lua-apk.c
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; |