diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-04-14 21:48:49 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-04-14 19:59:01 +0000 |
commit | cec1fa2b0f414e980c4dc56a5cc4dc9ff48bddb8 (patch) | |
tree | f3e5a5bdef05102f7400195e4ef2ed8e8fb9a2ad /src/apk.c | |
parent | 762e0c717bcae8c2d0f46ba4f35232b773ac8419 (diff) | |
download | apk-tools-cec1fa2b0f414e980c4dc56a5cc4dc9ff48bddb8.tar.gz apk-tools-cec1fa2b0f414e980c4dc56a5cc4dc9ff48bddb8.tar.bz2 apk-tools-cec1fa2b0f414e980c4dc56a5cc4dc9ff48bddb8.tar.xz apk-tools-cec1fa2b0f414e980c4dc56a5cc4dc9ff48bddb8.zip |
db: Allow override arch when using --root
This is so we can do x86 --root installs on x86_64 hosts.
Using --arch without --root can make great damage so we only enable it
if --root is used.
Diffstat (limited to 'src/apk.c')
-rw-r--r-- | src/apk.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -66,6 +66,8 @@ static struct apk_option generic_options[] = { required_argument, "REPOFILE" }, { 0x109, "no-network", "Do not use network (cache is still used)" }, { 0x111, "overlay-from-stdin", "Read list of overlay files from stdin" }, + { 0x112, "arch", "Use architecture with --root", + required_argument, "ARCH" }, }; static int version(void) @@ -369,6 +371,9 @@ int main(int argc, char **argv) case 0x111: apk_flags |= APK_OVERLAY_FROM_STDIN; break; + case 0x112: + dbopts.arch = optarg; + break; default: if (applet == NULL || applet->parse == NULL || applet->parse(ctx, &dbopts, r, |