diff options
author | Timo Teräs <timo.teras@iki.fi> | 2012-03-31 22:36:06 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2012-03-31 22:36:06 +0300 |
commit | a7c564605d513f2a4ac45a0e769ec77ea6061e0e (patch) | |
tree | 5cac0307648158098416dfaabd49ec31920f2d9d /main | |
parent | 0e6ee4189fa8d293eb9b840d76df43dd003d08e6 (diff) | |
download | aports-a7c564605d513f2a4ac45a0e769ec77ea6061e0e.tar.bz2 aports-a7c564605d513f2a4ac45a0e769ec77ea6061e0e.tar.xz |
main/apk-tools: cherry-pick fix for info -e return code
Diffstat (limited to 'main')
-rw-r--r-- | main/apk-tools/0001-info-fix-exit-code-for-e.patch | 50 | ||||
-rw-r--r-- | main/apk-tools/APKBUILD | 7 |
2 files changed, 54 insertions, 3 deletions
diff --git a/main/apk-tools/0001-info-fix-exit-code-for-e.patch b/main/apk-tools/0001-info-fix-exit-code-for-e.patch new file mode 100644 index 0000000000..5fa01ff394 --- /dev/null +++ b/main/apk-tools/0001-info-fix-exit-code-for-e.patch @@ -0,0 +1,50 @@ +From ebaf8305b5c9cc5bdc5d640f4cb25e058f7a2c26 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> +Date: Fri, 30 Mar 2012 09:20:21 +0300 +Subject: [PATCH] info: fix exit code for -e + +fixes #1069 +--- + src/info.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/src/info.c b/src/info.c +index ef7bf9b..e9f1b59 100644 +--- a/src/info.c ++++ b/src/info.c +@@ -71,7 +71,7 @@ static int info_exists(struct info_ctx *ctx, struct apk_database *db, + { + struct apk_name *name; + struct apk_dependency dep; +- int i, j, ok = 0; ++ int i, j, ok, rc = 0; + + for (i = 0; i < argc; i++) { + apk_blob_t b = APK_BLOB_STR(argv[i]); +@@ -84,6 +84,7 @@ static int info_exists(struct info_ctx *ctx, struct apk_database *db, + if (name == NULL) + continue; + ++ ok = 0; + for (j = 0; j < name->providers->num; j++) { + struct apk_provider *p = &name->providers->item[j]; + if (p->pkg->ipkg == NULL) +@@ -91,11 +92,13 @@ static int info_exists(struct info_ctx *ctx, struct apk_database *db, + if (!apk_dep_is_provided(&dep, p)) + continue; + verbose_print_pkg(p->pkg, 0); ++ ok = 1; + } +- ok++; ++ if (!ok) ++ rc++; + } + +- return argc - ok; ++ return rc; + } + + static int info_who_owns(struct info_ctx *ctx, struct apk_database *db, +-- +1.7.9.4 + diff --git a/main/apk-tools/APKBUILD b/main/apk-tools/APKBUILD index 18bc8a4bfc..53652a069e 100644 --- a/main/apk-tools/APKBUILD +++ b/main/apk-tools/APKBUILD @@ -1,13 +1,13 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=apk-tools pkgver=2.3.0 -pkgrel=0 +pkgrel=1 pkgdesc="Alpine Package Keeper - package manager for alpine" subpackages="$pkgname-static lua-apk:luaapk" depends= makedepends="zlib-dev openssl-dev lua-dev" source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2 - " + 0001-info-fix-exit-code-for-e.patch" url="http://git.alpinelinux.org/cgit/apk-tools/" arch="all" @@ -54,4 +54,5 @@ luaapk() { mv "$pkgdir"/usr/lib "$subpkgdir"/usr/lib/ } -md5sums="f87882b3ddad44282459ee40b143ad1a apk-tools-2.3.0.tar.bz2" +md5sums="f87882b3ddad44282459ee40b143ad1a apk-tools-2.3.0.tar.bz2 +03e0555514f8eb59148361cf53607f0a 0001-info-fix-exit-code-for-e.patch" |