summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-02-03 13:08:34 +0200
committerTimo Teräs <timo.teras@iki.fi>2014-02-03 13:08:34 +0200
commit354ba70dc5959c671c5a51341d48a4c730b51c1d (patch)
treeef8d04ccf945c5125cfab39f059fd0db6717fee1 /src
parent5ccaa6796fa839e7882e6a64da66f165fe987a0f (diff)
downloadapk-tools-354ba70dc5959c671c5a51341d48a4c730b51c1d.tar.gz
apk-tools-354ba70dc5959c671c5a51341d48a4c730b51c1d.tar.bz2
apk-tools-354ba70dc5959c671c5a51341d48a4c730b51c1d.tar.xz
apk-tools-354ba70dc5959c671c5a51341d48a4c730b51c1d.zip
fetch: disable progress when outputting pkg to stdout
Diffstat (limited to 'src')
-rw-r--r--src/fetch.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fetch.c b/src/fetch.c
index cf2fde7..d619c41 100644
--- a/src/fetch.c
+++ b/src/fetch.c
@@ -241,6 +241,9 @@ static int fetch_main(void *pctx, struct apk_database *db, struct apk_string_arr
struct fetch_ctx *ctx = (struct fetch_ctx *) pctx;
void *mark = (ctx->flags & FETCH_RECURSIVE) ? mark_name_recursive : mark_name;
+ if (ctx->flags & FETCH_STDOUT)
+ apk_flags &= ~APK_PROGRESS;
+
if (ctx->outdir_fd == 0)
ctx->outdir_fd = AT_FDCWD;
@@ -262,7 +265,7 @@ static struct apk_option fetch_options[] = {
{ 'L', "link", "Create hard links if possible" },
{ 'R', "recursive", "Fetch the PACKAGE and all its dependencies" },
{ 's', "stdout",
- "Dump the .apk to stdout (incompatible with -o and -R)" },
+ "Dump the .apk to stdout (incompatible with -o, -R, --progress)" },
{ 'o', "output", "Directory to place the PACKAGEs to",
required_argument, "DIR" },
};