aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-12-15 13:05:23 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-12-15 13:05:23 +0000
commit9111206c76923abed8c902d4ae237733dfc54f9a (patch)
treef4fa55825e06a73ed3012b68ac5dfaa30f420412 /main
parentf7576ff16641ece40d2919240bc437f6158b3c6d (diff)
downloadaports-9111206c76923abed8c902d4ae237733dfc54f9a.tar.bz2
aports-9111206c76923abed8c902d4ae237733dfc54f9a.tar.xz
main/apk-tools: return error when apk info dont find the package
Diffstat (limited to 'main')
-rw-r--r--main/apk-tools/0001-info-return-error-if-owning-package-was-not-found.patch44
-rw-r--r--main/apk-tools/APKBUILD6
2 files changed, 48 insertions, 2 deletions
diff --git a/main/apk-tools/0001-info-return-error-if-owning-package-was-not-found.patch b/main/apk-tools/0001-info-return-error-if-owning-package-was-not-found.patch
new file mode 100644
index 0000000000..a22ef1b407
--- /dev/null
+++ b/main/apk-tools/0001-info-return-error-if-owning-package-was-not-found.patch
@@ -0,0 +1,44 @@
+From 4d6e25a8545a647cf80cb48eedb2a4b36715ec3a Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 15 Dec 2010 10:20:30 +0000
+Subject: [PATCH] info: return error if owning package was not found
+
+---
+ src/info.c | 9 ++++++---
+ 1 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/src/info.c b/src/info.c
+index 19a3f48..b16f188 100644
+--- a/src/info.c
++++ b/src/info.c
+@@ -101,13 +101,16 @@ static int info_who_owns(struct info_ctx *ctx, struct apk_database *db,
+ struct apk_package *pkg;
+ struct apk_dependency_array *deps;
+ struct apk_dependency dep;
+- int i;
++ int i, r=0;
+
+ apk_dependency_array_init(&deps);
+ for (i = 0; i < argc; i++) {
+ pkg = apk_db_get_file_owner(db, APK_BLOB_STR(argv[i]));
+- if (pkg == NULL)
++ if (pkg == NULL) {
++ apk_error("%s: Could not find owner package", argv[i]);
++ r++;
+ continue;
++ }
+
+ if (apk_verbosity < 1) {
+ dep = (struct apk_dependency) {
+@@ -130,7 +133,7 @@ static int info_who_owns(struct info_ctx *ctx, struct apk_database *db,
+ }
+ apk_dependency_array_free(&deps);
+
+- return 0;
++ return r;
+ }
+
+ static void info_print_description(struct apk_package *pkg)
+--
+1.7.3.3
+
diff --git a/main/apk-tools/APKBUILD b/main/apk-tools/APKBUILD
index 4aedc43945..b6ccebe7d4 100644
--- a/main/apk-tools/APKBUILD
+++ b/main/apk-tools/APKBUILD
@@ -1,12 +1,13 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=apk-tools
pkgver=2.0.7
-pkgrel=0
+pkgrel=1
pkgdesc="Alpine Package Keeper - package manager for alpine"
subpackages="$pkgname-static"
depends=
makedepends="zlib-dev openssl-dev pkgconfig"
source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2
+ 0001-info-return-error-if-owning-package-was-not-found.patch
"
url="http://git.alpinelinux.org/cgit/apk-tools/"
@@ -48,4 +49,5 @@ static() {
"$subpkgdir"/sbin/apk.static
}
-md5sums="3c4591c594f9b2261ab588446a50d183 apk-tools-2.0.7.tar.bz2"
+md5sums="3c4591c594f9b2261ab588446a50d183 apk-tools-2.0.7.tar.bz2
+1364d38e784ad6cc04e157665903ef0c 0001-info-return-error-if-owning-package-was-not-found.patch"