summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2017-07-28 18:12:06 -0500
committerWilliam Pitcock <nenolod@dereferenced.org>2017-07-29 01:57:55 +0000
commit8221be35699141684d742bdffa8a55152546ac94 (patch)
treeed96126105ff35957b8f3c21d82e07988c9fd513 /src
parent13747fab83b30d9074b3327ed1d05bf19f85528c (diff)
downloadapk-tools-8221be35699141684d742bdffa8a55152546ac94.tar.bz2
apk-tools-8221be35699141684d742bdffa8a55152546ac94.tar.xz
index: Only rewrite arch if no error is encountered
Diffstat (limited to 'src')
-rw-r--r--src/index.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/index.c b/src/index.c
index 45d371b..4dd69cb 100644
--- a/src/index.c
+++ b/src/index.c
@@ -192,9 +192,9 @@ static int index_main(void *ctx, struct apk_database *db, struct apk_string_arra
errors++;
} else {
newpkgs++;
+ if (ictx->rewrite_arch != NULL)
+ pkg->arch = ictx->rewrite_arch;
}
- if (ictx->rewrite_arch != NULL)
- pkg->arch = ictx->rewrite_arch;
apk_sign_ctx_free(&sctx);
}
}