diff options
-rw-r--r-- | main/apk-tools/0001-apk-new-option-print-arch.patch | 49 | ||||
-rw-r--r-- | main/apk-tools/APKBUILD | 12 |
2 files changed, 57 insertions, 4 deletions
diff --git a/main/apk-tools/0001-apk-new-option-print-arch.patch b/main/apk-tools/0001-apk-new-option-print-arch.patch new file mode 100644 index 0000000000..095c96f8d2 --- /dev/null +++ b/main/apk-tools/0001-apk-new-option-print-arch.patch @@ -0,0 +1,49 @@ +From b06a43a465f596289c73be8dc7eb6cd732a27114 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Mon, 6 Jan 2014 10:51:17 +0100 +Subject: [PATCH] apk: new option --print-arch + +Simply print the default arch and exit. +This is so scripts don't need to parse the output of -V. +--- + src/apk.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/src/apk.c b/src/apk.c +index 8a3c7ef..6cd01de 100644 +--- a/src/apk.c ++++ b/src/apk.c +@@ -70,6 +70,7 @@ static struct apk_option generic_options[] = { + { 0x111, "overlay-from-stdin", "Read list of overlay files from stdin" }, + { 0x112, "arch", "Use architecture with --root", + required_argument, "ARCH" }, ++ { 0x114, "print-arch", "Print default arch and exit" }, + #ifdef TEST_MODE + { 0x200, "test-repo", "Repository", required_argument, "REPO" }, + { 0x201, "test-instdb", "Installed db", required_argument, "INSTALLED" }, +@@ -86,6 +87,12 @@ static int version(void) + return 0; + } + ++static int show_arch(void) ++{ ++ puts(APK_DEFAULT_ARCH); ++ return 0; ++} ++ + static int format_option(char *buf, size_t len, struct apk_option *o, + const char *separator) + { +@@ -418,6 +425,9 @@ int main(int argc, char **argv) + case 0x112: + dbopts.arch = optarg; + break; ++ case 0x114: ++ r = show_arch(); ++ goto err; + #ifdef TEST_MODE + case 0x200: + *apk_string_array_add(&test_repos) = (char*) optarg; +-- +1.8.5.2 + diff --git a/main/apk-tools/APKBUILD b/main/apk-tools/APKBUILD index 9b1e829674..ac5c6943e0 100644 --- a/main/apk-tools/APKBUILD +++ b/main/apk-tools/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=apk-tools pkgver=2.4.0 -pkgrel=5 +pkgrel=6 pkgdesc="Alpine Package Keeper - package manager for alpine" subpackages="$pkgname-static" depends= @@ -16,6 +16,7 @@ source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.xz 0001-db-allow-using-cached-packages-with-no-network.patch 0002-print-use-stdout-instead-of-stderr-for-logging-and-p.patch 0003-print-flush-on-apk_log.patch + 0001-apk-new-option-print-arch.patch " url="http://git.alpinelinux.org/cgit/apk-tools/" @@ -88,12 +89,15 @@ luaapk() { md5sums="8446c69882d26c8bba38500b6e5577eb apk-tools-2.4.0.tar.xz 1dd6a336016814ef44805f1974961d6b 0001-db-allow-using-cached-packages-with-no-network.patch a4d39e02bb7e8cee4c4daf69d684e691 0002-print-use-stdout-instead-of-stderr-for-logging-and-p.patch -bfc313d60890b25b4eea7f7a8284d815 0003-print-flush-on-apk_log.patch" +bfc313d60890b25b4eea7f7a8284d815 0003-print-flush-on-apk_log.patch +e4058882e126225a4a46a214b9c2c18f 0001-apk-new-option-print-arch.patch" sha256sums="ac717df2c512c43e6ea3dd103fcea725ee9135936fe6a177de5021c36735a578 apk-tools-2.4.0.tar.xz 92bf5e0d28933a907ddb74b343d322db484be4f909ccb33ac0ec9f320c323fde 0001-db-allow-using-cached-packages-with-no-network.patch 886ea0b40511c694ef9689bd74e8f861c69d5648c774cad80c622c39a979468e 0002-print-use-stdout-instead-of-stderr-for-logging-and-p.patch -83cf87712f77d6db296c1775e5cf4b1fb458b732830dc23d9ea46065ccba1260 0003-print-flush-on-apk_log.patch" +83cf87712f77d6db296c1775e5cf4b1fb458b732830dc23d9ea46065ccba1260 0003-print-flush-on-apk_log.patch +585d36c5e356fb133e89958645c6723fcd057c9698b26eb93bbc50ca85329893 0001-apk-new-option-print-arch.patch" sha512sums="97dae73ed34e56349be5027d73720bdb8cf136b6bf0ede6f9fd5199386977d6c718f3593ea0f566aef0c5cdaf59e078f22a4bb1a22132b00dae82dc5927a8279 apk-tools-2.4.0.tar.xz 305c669fd98534e8438af656c6be5aa30b23253fa21cf155bc230a7b87f0b85c221f353717c25f2ef84072c34ebcc99ecca54e9cac31139a8f3a636c3bbb5981 0001-db-allow-using-cached-packages-with-no-network.patch 7f0c9107ff1ba3ab3a5443d53ccb98b47cab3f1b8467457d2c333ece8f92d17c684bfbf9e8db51f91ff759d1ba334708c0190ba0fdeaef85dd922138e2317271 0002-print-use-stdout-instead-of-stderr-for-logging-and-p.patch -d2ffae4736671db9fa6a60fa04d495d3d31c9998ad099a2f23c0920f0827571fa5ac85ba6522afe16a1d7eba072e25a390fa15d07e7339d0adeb7840af117399 0003-print-flush-on-apk_log.patch" +d2ffae4736671db9fa6a60fa04d495d3d31c9998ad099a2f23c0920f0827571fa5ac85ba6522afe16a1d7eba072e25a390fa15d07e7339d0adeb7840af117399 0003-print-flush-on-apk_log.patch +88f276f6eaf1d394f751f4ced5880fb9d4a8587f6a3a867c1fa2d3add7e0ba995961b19979c764fc70766aa66d04760ea124b69240442769afa5ebcb3cb520c8 0001-apk-new-option-print-arch.patch" |