From 2edb1e2396da9910b8dbcb426fccbe64f398a85d Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Thu, 21 Mar 2019 23:39:09 +0000 Subject: system/apk-tools: fix orphan list functionality --- ...w-names-with-only-one-provider-to-be-auto.patch | 57 ---------------------- system/apk-tools/APKBUILD | 4 +- system/apk-tools/list.patch | 22 +++++++++ system/apk-tools/openssl-compat.patch | 11 ----- 4 files changed, 25 insertions(+), 69 deletions(-) delete mode 100644 system/apk-tools/0001-solver-allow-names-with-only-one-provider-to-be-auto.patch create mode 100644 system/apk-tools/list.patch delete mode 100644 system/apk-tools/openssl-compat.patch (limited to 'system/apk-tools') diff --git a/system/apk-tools/0001-solver-allow-names-with-only-one-provider-to-be-auto.patch b/system/apk-tools/0001-solver-allow-names-with-only-one-provider-to-be-auto.patch deleted file mode 100644 index 107676e93..000000000 --- a/system/apk-tools/0001-solver-allow-names-with-only-one-provider-to-be-auto.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 0dcbd933c8d3d305395a99b7b1690a187ce5ec8c Mon Sep 17 00:00:00 2001 -From: William Pitcock -Date: Wed, 21 Feb 2018 15:35:53 +0000 -Subject: [PATCH] solver: allow names with only one provider to be autoselected - regardless of priority - ---- - src/solver.c | 5 +++-- - test/provides.repo | 9 ++++++++- - 2 files changed, 11 insertions(+), 3 deletions(-) - -diff --git a/src/solver.c b/src/solver.c -index 91e5958..d27a7a3 100644 ---- a/src/solver.c -+++ b/src/solver.c -@@ -671,11 +671,12 @@ static void select_package(struct apk_solver_state *ss, struct apk_name *name) - (!p->pkg->ss.iif_triggered || - !p->pkg->ss.tag_ok)) - continue; -- /* Virtual packages without provider_priority cannot be autoselected */ -+ /* Virtual packages without provider_priority cannot be autoselected, -+ * unless there is only one provider */ - if (p->version == &apk_null_blob && - p->pkg->name->auto_select_virtual == 0 && - p->pkg->name->ss.requirers == 0 && -- p->pkg->provider_priority == 0) -+ (p->pkg->provider_priority == 0 && name->providers->num > 1)) - continue; - if (compare_providers(ss, p, &chosen) > 0) - chosen = *p; -diff --git a/test/provides.repo b/test/provides.repo -index 58bd416..358151e 100644 ---- a/test/provides.repo -+++ b/test/provides.repo -@@ -82,7 +82,7 @@ P:conflicted-provider-b - V:0.1 - S:1 - I:1 --p:conflicted-provider -+p:conflicted-provider conflicted-provider-2 - - C:Q1EyN5AdpAOBJWKMR89ppC66ccccj= - P:conflicted-dep -@@ -104,3 +104,10 @@ V:0.1 - S:1 - I:1 - p:self-provide -+ -+C:Q1EyN5AdpAOBJWKMR89ppC66eeeej= -+P:conflicted-dep-2 -+V:0.1 -+S:1 -+I:1 -+D:conflicted-provider-2 --- -2.16.1 - diff --git a/system/apk-tools/APKBUILD b/system/apk-tools/APKBUILD index c6b0b479a..d35a6b2f1 100644 --- a/system/apk-tools/APKBUILD +++ b/system/apk-tools/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Adelie Platform Group pkgname=apk-tools pkgver=2.10.3 -pkgrel=0 +pkgrel=1 pkgdesc="Alpine Package Keeper - package manager" url="https://git.alpinelinux.org/cgit/apk-tools/" arch="all" @@ -13,6 +13,7 @@ makedepends_host="zlib-dev openssl openssl-dev linux-headers" makedepends="$makedepends_build $makedepends_host" subpackages="$pkgname-static" source="https://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.xz + list.patch pmmx.patch " @@ -68,4 +69,5 @@ static() { } sha512sums="1b190cfd04c69369bd4f2b708d4df0f8cf2937e1580c95138fd2c2257e7604d015deaca10a9fe0da6742981caadb6b067c15e417a1951866f781b8a5c71c98ee apk-tools-2.10.3.tar.xz +1c1bd86c47273f23c9c12639fbfa2978c3a1104cb8b30be7e92d1b1d0f863c28efe9153612d62402616dabc3e713877125f56798c908470937d0fa567db948db list.patch 746d00ce2af554a25db7ecea2b0a4d8f7399d2560efb6bf59ea144012d0163d3e0bad84c799bd706e8be6c0a543d4e35728d6beb269fddbbea626384009129cb pmmx.patch" diff --git a/system/apk-tools/list.patch b/system/apk-tools/list.patch new file mode 100644 index 000000000..ea264e0fa --- /dev/null +++ b/system/apk-tools/list.patch @@ -0,0 +1,22 @@ +diff --git a/src/list.c b/src/list.c +index e285e3f..dcbaeea 100644 +--- a/src/list.c ++++ b/src/list.c +@@ -61,7 +61,7 @@ static int is_orphaned(const struct apk_name *name) + /* repo 1 is always installed-db, so if other bits are set it means the package is available somewhere + * (either cache or in a proper repo) + */ +- return (repos & ~BIT(1)) == 0; ++ return (repos & ~BIT(0)) == 0; + } + + /* returns the currently installed package if there is a newer package that satisfies `name` */ +@@ -144,7 +144,7 @@ static void filter_package(const struct apk_package *pkg, const struct list_ctx + if (ctx->orphaned && !is_orphaned(pkg->name)) + return; + +- if (ctx->available && pkg->repos == BIT(1)) ++ if (ctx->available && pkg->repos == BIT(0)) + return; + + if (ctx->upgradable && !is_upgradable(pkg->name, pkg)) diff --git a/system/apk-tools/openssl-compat.patch b/system/apk-tools/openssl-compat.patch deleted file mode 100644 index cdafefd05..000000000 --- a/system/apk-tools/openssl-compat.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- apk-tools-2.8.1/libfetch/common.c.old 2017-10-27 08:12:05.000000000 -0500 -+++ apk-tools-2.8.1/libfetch/common.c 2017-11-11 22:37:18.661697875 -0600 -@@ -504,7 +504,7 @@ - - SSL_load_error_strings(); - -- conn->ssl_meth = TLS_client_method(); -+ conn->ssl_meth = SSLv23_client_method(); - conn->ssl_ctx = SSL_CTX_new(conn->ssl_meth); - SSL_CTX_set_mode(conn->ssl_ctx, SSL_MODE_AUTO_RETRY); - -- cgit v1.2.3-60-g2f50