diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-07-16 08:21:11 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-07-16 08:25:28 +0000 |
commit | ec3b11dc1bec500609eebdd951720b3836e68d8c (patch) | |
tree | 0819027d91f74e8e3201c6ff38db75854311c59b /main/apk-tools | |
parent | 3f5ae0cf4f9b72fd52eca9aeb41aa3954d5d0b71 (diff) | |
download | aports-ec3b11dc1bec500609eebdd951720b3836e68d8c.tar.bz2 aports-ec3b11dc1bec500609eebdd951720b3836e68d8c.tar.xz |
main/apk-tools: fix to not hang when splitting -libs packages
Diffstat (limited to 'main/apk-tools')
3 files changed, 72 insertions, 6 deletions
diff --git a/main/apk-tools/0001-db-fix-segfault-when-root-points-to-invalid-dir.patch b/main/apk-tools/0001-db-fix-segfault-when-root-points-to-invalid-dir.patch new file mode 100644 index 0000000000..ddb1802bea --- /dev/null +++ b/main/apk-tools/0001-db-fix-segfault-when-root-points-to-invalid-dir.patch @@ -0,0 +1,28 @@ +From 50eef05ce75eaf9a14afb2d855fdf27e3d3ce69f Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Tue, 16 Jul 2013 06:26:12 +0000 +Subject: [PATCH 1/2] db: fix segfault when --root points to invalid dir + +fixes #2134 +--- + src/database.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/database.c b/src/database.c +index 33f7af8..d8b84b5 100644 +--- a/src/database.c ++++ b/src/database.c +@@ -1740,7 +1740,9 @@ void apk_db_close(struct apk_database *db) + struct hlist_node *dc, *dn; + int i; + +- apk_id_cache_free(&db->id_cache); ++ /* the id cache was never initialized if root_fd failed */ ++ if (db->root_fd >= 0) ++ apk_id_cache_free(&db->id_cache); + + /* Cleaning up the directory tree will cause mode, uid and gid + * of all modified (package providing that directory got removed) +-- +1.8.3.2 + diff --git a/main/apk-tools/0002-solver-do-not-disqualify-already-disqualified-packag.patch b/main/apk-tools/0002-solver-do-not-disqualify-already-disqualified-packag.patch new file mode 100644 index 0000000000..d35e2b25af --- /dev/null +++ b/main/apk-tools/0002-solver-do-not-disqualify-already-disqualified-packag.patch @@ -0,0 +1,30 @@ +From 716d5d91dc331e59d250b053bcc12a3191c94dcd Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Tue, 16 Jul 2013 07:58:13 +0000 +Subject: [PATCH 2/2] solver: do not disqualify already disqualified packages + +We should not disqualify non-selectable packages as it would mark it as +dirty, forcing it to reconsider the name again, which could end up in +an endless loop. + +fixes #2135 +--- + src/solver.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/solver.c b/src/solver.c +index bf57380..5383d0b 100644 +--- a/src/solver.c ++++ b/src/solver.c +@@ -313,7 +313,7 @@ static void exclude_non_providers(struct apk_solver_state *ss, struct apk_name * + dbg_printf("%s must provide %s\n", name->name, must_provide->name); + + foreach_array_item(p, name->providers) { +- if (p->pkg->name == must_provide) ++ if (p->pkg->name == must_provide || !p->pkg->ss.pkg_selectable) + goto next; + foreach_array_item(d, p->pkg->provides) + if (d->name == must_provide) +-- +1.8.3.2 + diff --git a/main/apk-tools/APKBUILD b/main/apk-tools/APKBUILD index fb075c486f..c3506665a2 100644 --- a/main/apk-tools/APKBUILD +++ b/main/apk-tools/APKBUILD @@ -1,16 +1,18 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=apk-tools pkgver=2.4.0_rc2 -pkgrel=0 +pkgrel=1 pkgdesc="Alpine Package Keeper - package manager for alpine" subpackages="$pkgname-static" depends= makedepends="zlib-dev openssl-dev" if [ "$CBUILD" == "$CHOST" ]; then - subpackages="$subpackages lua-apk:luaapk" - makedepends="$makedepends lua-dev" + subpackages="$subpackages lua5.2-apk:luaapk" + makedepends="$makedepends lua5.2-dev" fi source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.xz + 0001-db-fix-segfault-when-root-points-to-invalid-dir.patch + 0002-solver-do-not-disqualify-already-disqualified-packag.patch " url="http://git.alpinelinux.org/cgit/apk-tools/" @@ -80,6 +82,12 @@ luaapk() { mv "$pkgdir"/usr/lib "$subpkgdir"/usr/lib/ } -md5sums="970ac62007eb16f30344bf9169765067 apk-tools-2.4.0_rc2.tar.xz" -sha256sums="89e0a4d91b2eab372fdbd488f45c9db8c0c947bbe690c626b0160b3f338bac5b apk-tools-2.4.0_rc2.tar.xz" -sha512sums="08e2cae4e55602800d09db7951bec297ed4e3251a1e5df87a2437b44608db7560533af5994cc0902e8f5f505d388af6d89295f85245d2fc30d028b2e59a6d496 apk-tools-2.4.0_rc2.tar.xz" +md5sums="970ac62007eb16f30344bf9169765067 apk-tools-2.4.0_rc2.tar.xz +64c14782f96a25d9e3330c9e980cadc5 0001-db-fix-segfault-when-root-points-to-invalid-dir.patch +11764f6c050ab908c291552dc2766f52 0002-solver-do-not-disqualify-already-disqualified-packag.patch" +sha256sums="89e0a4d91b2eab372fdbd488f45c9db8c0c947bbe690c626b0160b3f338bac5b apk-tools-2.4.0_rc2.tar.xz +1dad8fd826337ad4cea737800ad1b5506a77c23acc1d4c61cbafeb02b270205c 0001-db-fix-segfault-when-root-points-to-invalid-dir.patch +a9de444758a78fe6a7408f3fad34280bbc60589767450a5ab1641cb09be2fcd4 0002-solver-do-not-disqualify-already-disqualified-packag.patch" +sha512sums="08e2cae4e55602800d09db7951bec297ed4e3251a1e5df87a2437b44608db7560533af5994cc0902e8f5f505d388af6d89295f85245d2fc30d028b2e59a6d496 apk-tools-2.4.0_rc2.tar.xz +aacb08fa26cdba29d84022b1945ccd3ac3d0c57a887ad6898d1028db35f88f5d67bff157269dff41d1994f0d38eb64a0eefbf7525647c08a970f18ca36c5766b 0001-db-fix-segfault-when-root-points-to-invalid-dir.patch +8f7345d86ffd392c914c3f95709173830d6da5fe858fb0e2d6a8d395d8036e4608567af6c02b3b30c76ddbdc083138f821e865e673f1c480ea7e3f9f5ec44565 0002-solver-do-not-disqualify-already-disqualified-packag.patch" |