summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2017-07-28 18:12:06 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2017-07-28 18:12:06 -0500
commit3ccd893bc81e9f67b740e0e40cf4e9e30498d198 (patch)
treed189cf1ebf49865bec3a4a3f4a8f68cd35f82421
parenta8aa084404f46fbd513c6d59c12b424e9b01211c (diff)
downloadapk-tools-3ccd893bc81e9f67b740e0e40cf4e9e30498d198.tar.gz
apk-tools-3ccd893bc81e9f67b740e0e40cf4e9e30498d198.tar.bz2
apk-tools-3ccd893bc81e9f67b740e0e40cf4e9e30498d198.tar.xz
apk-tools-3ccd893bc81e9f67b740e0e40cf4e9e30498d198.zip
index: Only rewrite arch if no error is encountered
-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);
}
}