summaryrefslogtreecommitdiffstats
path: root/main/apk-tools
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2012-11-05 08:24:07 +0200
committerTimo Teräs <timo.teras@iki.fi>2012-11-05 08:24:07 +0200
commit24734f342b0ca02518a18f4c6e57cc777b45238e (patch)
tree0b8658caeaab04731fd584c7e2822ffa2eefd1f2 /main/apk-tools
parent4dbb6142d3e39ab740d6caa7a2b2e44f2c09790c (diff)
downloadaports-24734f342b0ca02518a18f4c6e57cc777b45238e.tar.bz2
aports-24734f342b0ca02518a18f4c6e57cc777b45238e.tar.xz
main/apk-tools: apply bugfix from upstream
Diffstat (limited to 'main/apk-tools')
-rw-r--r--main/apk-tools/0001-solver-fix-package-prefence-calculation-a-bit.patch32
-rw-r--r--main/apk-tools/APKBUILD8
2 files changed, 37 insertions, 3 deletions
diff --git a/main/apk-tools/0001-solver-fix-package-prefence-calculation-a-bit.patch b/main/apk-tools/0001-solver-fix-package-prefence-calculation-a-bit.patch
new file mode 100644
index 000000000..c2b655705
--- /dev/null
+++ b/main/apk-tools/0001-solver-fix-package-prefence-calculation-a-bit.patch
@@ -0,0 +1,32 @@
+From 832dfed637eb55ef84182d3ce0a112bd8b828130 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Sun, 4 Nov 2012 12:13:19 +0200
+Subject: [PATCH] solver: fix package prefence calculation a bit
+
+---
+ src/solver.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/solver.c b/src/solver.c
+index 5d85792..b12fc70 100644
+--- a/src/solver.c
++++ b/src/solver.c
+@@ -413,12 +413,14 @@ static void calculate_pkg_preference(struct apk_package *pkg)
+ continue;
+ for (j = 0; j < d0->name->providers->num; j++) {
+ struct apk_provider *p0 = &d0->name->providers->item[j];
+- if (pkg == p0->pkg)
++ if (name == p0->pkg->name)
+ continue;
+ if (compare_absolute_package_preference(&p, p0) < 0)
+ ps->preference++;
+ }
+ }
++
++ dbg_printf(PKG_VER_FMT ": preference=%d\n", PKG_VER_PRINTF(pkg), ps->preference);
+ }
+
+ static void count_name(struct apk_solver_state *ss, struct apk_name *name)
+--
+1.8.0
+
diff --git a/main/apk-tools/APKBUILD b/main/apk-tools/APKBUILD
index 65261dd87..b652800f8 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.3.3
-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-solver-fix-package-prefence-calculation-a-bit.patch
"
url="http://git.alpinelinux.org/cgit/apk-tools/"
@@ -19,7 +20,7 @@ prepare() {
sed -i -e 's:-Werror::' Make.rules
for i in $source; do
case $i in
- *.patch) patch -p1 -i "$srcdir"/$i || return 1
+ *.patch) msg "$i"; patch -p1 -i "$srcdir"/$i || return 1
esac
done
@@ -58,4 +59,5 @@ luaapk() {
mv "$pkgdir"/usr/lib "$subpkgdir"/usr/lib/
}
-md5sums="659c04201019781c3ea092f946369fed apk-tools-2.3.3.tar.bz2"
+md5sums="659c04201019781c3ea092f946369fed apk-tools-2.3.3.tar.bz2
+c24bc4404b4b25d175d1e657b2d9513f 0001-solver-fix-package-prefence-calculation-a-bit.patch"