summaryrefslogtreecommitdiffstats
path: root/main/apk-tools
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-10-09 13:57:36 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-10-09 13:57:46 +0000
commitbbbce5f086af68543ec34f1a91529c4bc4558380 (patch)
tree86ce5815fa689cfd324437259f2c6868acacfde3 /main/apk-tools
parente6272288b1b8f6efc87475d39f65841ac8c08d52 (diff)
downloadaports-bbbce5f086af68543ec34f1a91529c4bc4558380.tar.bz2
aports-bbbce5f086af68543ec34f1a91529c4bc4558380.tar.xz
main/apk-tools: upgrade to 2.3.3
Diffstat (limited to 'main/apk-tools')
-rw-r--r--main/apk-tools/0001-db-remove-AT_SYMLINK_NOFOLLOW-for-directory-permissi.patch38
-rw-r--r--main/apk-tools/0002-apk-implement-progress-fd-to-write-progress-to-a-spe.patch176
-rw-r--r--main/apk-tools/0003-info-provides-alias-p-is-reserved-for-root-use-P.patch35
-rw-r--r--main/apk-tools/0004-solver-fix-compile-with-Werror-on-64bit.patch25
-rw-r--r--main/apk-tools/0005-solver-improve-assert-error-messages.patch32
-rw-r--r--main/apk-tools/0006-solver-various-fixes.patch239
-rw-r--r--main/apk-tools/APKBUILD18
7 files changed, 3 insertions, 560 deletions
diff --git a/main/apk-tools/0001-db-remove-AT_SYMLINK_NOFOLLOW-for-directory-permissi.patch b/main/apk-tools/0001-db-remove-AT_SYMLINK_NOFOLLOW-for-directory-permissi.patch
deleted file mode 100644
index 15436ca59..000000000
--- a/main/apk-tools/0001-db-remove-AT_SYMLINK_NOFOLLOW-for-directory-permissi.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 8a4371ccd73e8f8672466881bd3b782de919cd93 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
-Date: Tue, 4 Sep 2012 10:38:13 +0300
-Subject: [PATCH] db: remove AT_SYMLINK_NOFOLLOW for directory permissions
-
-fchmodat does not support this flag - symlinks do not have permissions.
-
-Sysadmin probably does not expect us to not follow symlinks either:
-if /var -> /mnt/foo/var, we should be making sure the permissions
-and ownership is correct on the target directory, not on the symlink.
-
-Since fchmodat never returned ENOENT with AT_SYMLINK_NOFOLLOW, this
-also fixes directory re-creation if it does not exist. fixes #1348.
----
- src/database.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/database.c b/src/database.c
-index efff29f..d1a8f1a 100644
---- a/src/database.c
-+++ b/src/database.c
-@@ -229,11 +229,11 @@ static void apk_db_dir_mkdir(struct apk_database *db, struct apk_db_dir *dir)
- return;
-
- if ((dir->refs == 1) ||
-- (fchmodat(db->root_fd, dir->name, dir->mode, AT_SYMLINK_NOFOLLOW) != 0 &&
-+ (fchmodat(db->root_fd, dir->name, dir->mode, 0) != 0 &&
- errno == ENOENT))
- if ((mkdirat(db->root_fd, dir->name, dir->mode) != 0 &&
- errno == EEXIST))
-- if (fchmodat(db->root_fd, dir->name, dir->mode, AT_SYMLINK_NOFOLLOW) != 0)
-+ if (fchmodat(db->root_fd, dir->name, dir->mode, 0) != 0)
- ;
-
- if (fchownat(db->root_fd, dir->name, dir->uid, dir->gid, 0) != 0)
---
-1.7.12.2
-
diff --git a/main/apk-tools/0002-apk-implement-progress-fd-to-write-progress-to-a-spe.patch b/main/apk-tools/0002-apk-implement-progress-fd-to-write-progress-to-a-spe.patch
deleted file mode 100644
index 7f57ac78d..000000000
--- a/main/apk-tools/0002-apk-implement-progress-fd-to-write-progress-to-a-spe.patch
+++ /dev/null
@@ -1,176 +0,0 @@
-From 43850a126b94690302bc2564905141b077b490e7 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
-Date: Thu, 20 Sep 2012 15:12:15 +0300
-Subject: [PATCH] apk: implement --progress-fd to write progress to a
- specified fd
-
----
- src/apk.c | 5 +++++
- src/apk_database.h | 4 ++--
- src/database.c | 1 +
- src/solver.c | 44 +++++++++++++++++++++++++++-----------------
- 4 files changed, 35 insertions(+), 19 deletions(-)
-
-diff --git a/src/apk.c b/src/apk.c
-index 3bf1154..0404831 100644
---- a/src/apk.c
-+++ b/src/apk.c
-@@ -48,6 +48,7 @@ static struct apk_option generic_options[] = {
- { 'f', "force", "Do what was asked even if it looks dangerous" },
- { 'U', "update-cache", "Update the repository cache" },
- { 0x101, "progress", "Show a progress bar" },
-+ { 0x10f, "progress-fd", "Write progress to fd", required_argument, "FD" },
- { 0x110, "no-progress", "Disable progress bar even for TTYs" },
- { 0x102, "clean-protected", "Do not create .apk-new files to "
- "configuration dirs" },
-@@ -265,6 +266,7 @@ static void setup_terminal(void)
- {
- setvbuf(stderr, NULL, _IOLBF, BUFSIZ);
- signal(SIGWINCH, on_sigwinch);
-+ signal(SIGPIPE, SIG_IGN);
- }
-
- static void setup_automatic_flags(void)
-@@ -383,6 +385,9 @@ int main(int argc, char **argv)
- case 0x110:
- apk_flags &= ~APK_PROGRESS;
- break;
-+ case 0x10f:
-+ dbopts.progress_fd = atoi(optarg);
-+ break;
- case 0x102:
- apk_flags |= APK_CLEAN_PROTECTED;
- break;
-diff --git a/src/apk_database.h b/src/apk_database.h
-index 235030c..4628c23 100644
---- a/src/apk_database.h
-+++ b/src/apk_database.h
-@@ -108,7 +108,7 @@ struct apk_repository_list {
- };
-
- struct apk_db_options {
-- int lock_wait;
-+ int lock_wait, progress_fd;
- unsigned long open_flags;
- char *root;
- char *arch;
-@@ -127,7 +127,7 @@ struct apk_repository_tag {
-
- struct apk_database {
- char *root;
-- int root_fd, lock_fd, cache_fd, cachetmp_fd, keys_fd;
-+ int root_fd, lock_fd, cache_fd, cachetmp_fd, keys_fd, progress_fd;
- unsigned num_repos, num_repo_tags;
- const char *cache_dir;
- char *cache_remount_dir;
-diff --git a/src/database.c b/src/database.c
-index d1a8f1a..e130f0b 100644
---- a/src/database.c
-+++ b/src/database.c
-@@ -1359,6 +1359,7 @@ int apk_db_open(struct apk_database *db, struct apk_db_options *dbopts)
- int r, fd, write_arch = FALSE;
-
- memset(db, 0, sizeof(*db));
-+ db->progress_fd = dbopts->progress_fd;
- if (apk_flags & APK_SIMULATE) {
- dbopts->open_flags &= ~(APK_OPENF_CREATE | APK_OPENF_WRITE);
- dbopts->open_flags |= APK_OPENF_READ;
-diff --git a/src/solver.c b/src/solver.c
-index 457d5ff..ec44958 100644
---- a/src/solver.c
-+++ b/src/solver.c
-@@ -10,6 +10,7 @@
- */
-
- #include <stdint.h>
-+#include <unistd.h>
- #include "apk_defines.h"
- #include "apk_database.h"
- #include "apk_package.h"
-@@ -1650,23 +1651,34 @@ struct progress {
- struct apk_stats done;
- struct apk_stats total;
- struct apk_package *pkg;
-- size_t count;
-+ size_t percent;
-+ int progress_fd;
- };
-
--static void progress_cb(void *ctx, size_t progress)
-+static void update_progress(struct progress *prog, size_t percent)
-+{
-+ if (prog->percent == percent)
-+ return;
-+ prog->percent = percent;
-+ if (apk_flags & APK_PROGRESS)
-+ draw_progress(percent);
-+ if (prog->progress_fd != 0) {
-+ char buf[8];
-+ size_t n = snprintf(buf, sizeof(buf), "%d\n", percent);
-+ write(prog->progress_fd, buf, n);
-+ }
-+}
-+
-+static void progress_cb(void *ctx, size_t pkg_percent)
- {
- struct progress *prog = (struct progress *) ctx;
-- size_t partial = 0, count;
-+ size_t partial = 0, percent;
-
- if (prog->pkg != NULL)
-- partial = muldiv(progress, prog->pkg->installed_size, APK_PROGRESS_SCALE);
--
-- count = muldiv(100, prog->done.bytes + prog->done.packages + partial,
-- prog->total.bytes + prog->total.packages);
--
-- if (prog->count != count)
-- draw_progress(count);
-- prog->count = count;
-+ partial = muldiv(pkg_percent, prog->pkg->installed_size, APK_PROGRESS_SCALE);
-+ percent = muldiv(100, prog->done.bytes + prog->done.packages + partial,
-+ prog->total.bytes + prog->total.packages);
-+ update_progress(prog, percent);
- }
-
- static int dump_packages(struct apk_changeset *changeset,
-@@ -1784,6 +1796,7 @@ int apk_solver_commit_changeset(struct apk_database *db,
-
- /* Count what needs to be done */
- memset(&prog, 0, sizeof(prog));
-+ prog.progress_fd = db->progress_fd;
- for (i = 0; i < changeset->changes->num; i++) {
- change = &changeset->changes->item[i];
- count_change(change, &prog.total);
-@@ -1831,17 +1844,15 @@ int apk_solver_commit_changeset(struct apk_database *db,
- change = &changeset->changes->item[i];
-
- print_change(db, change, i, changeset->changes->num);
-- if (apk_flags & APK_PROGRESS)
-- draw_progress(prog.count);
- prog.pkg = change->newpkg;
-+ progress_cb(&prog, 0);
-
- if (!(apk_flags & APK_SIMULATE)) {
- if (change->oldpkg != change->newpkg ||
- (change->reinstall && pkg_available(db, change->newpkg)))
- r = apk_db_install_pkg(db,
- change->oldpkg, change->newpkg,
-- (apk_flags & APK_PROGRESS) ? progress_cb : NULL,
-- &prog);
-+ progress_cb, &prog);
- if (r != 0)
- break;
- if (change->newpkg)
-@@ -1850,8 +1861,7 @@ int apk_solver_commit_changeset(struct apk_database *db,
-
- count_change(change, &prog.done);
- }
-- if (apk_flags & APK_PROGRESS)
-- draw_progress(100);
-+ update_progress(&prog, 100);
-
- run_triggers(db);
-
---
-1.7.12.2
-
diff --git a/main/apk-tools/0003-info-provides-alias-p-is-reserved-for-root-use-P.patch b/main/apk-tools/0003-info-provides-alias-p-is-reserved-for-root-use-P.patch
deleted file mode 100644
index f8b806e1a..000000000
--- a/main/apk-tools/0003-info-provides-alias-p-is-reserved-for-root-use-P.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 4b7b5d4668865b1026c7050c8872f256bc773605 Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Fri, 28 Sep 2012 10:24:27 +0300
-Subject: [PATCH] info: --provides alias -p is reserved for --root, use -P
-
-fixes #1396
----
- src/info.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/info.c b/src/info.c
-index e9f1b59..9b37f38 100644
---- a/src/info.c
-+++ b/src/info.c
-@@ -427,7 +427,7 @@ static int info_parse(void *ctx, struct apk_db_options *dbopts,
- case 'R':
- ictx->subaction_mask |= APK_INFO_DEPENDS;
- break;
-- case 'p':
-+ case 'P':
- ictx->subaction_mask |= APK_INFO_PROVIDES;
- break;
- case 'r':
-@@ -489,7 +489,7 @@ static struct apk_option info_options[] = {
- { 'e', "installed", "Check if PACKAGE is installed" },
- { 'W', "who-owns", "Print the package owning the specified file" },
- { 'R', "depends", "List packages that the PACKAGE depends on" },
-- { 'p', "provides", "List virtual packages provided by PACKAGE" },
-+ { 'P', "provides", "List virtual packages provided by PACKAGE" },
- { 'r', "rdepends", "List all packages depending on PACKAGE" },
- { 0x10000, "replaces", "List packages whom files PACKAGE might replace" },
- { 'i', "install-if", "List the PACKAGE's install-if rule" },
---
-1.7.12.2
-
diff --git a/main/apk-tools/0004-solver-fix-compile-with-Werror-on-64bit.patch b/main/apk-tools/0004-solver-fix-compile-with-Werror-on-64bit.patch
deleted file mode 100644
index 74043d60e..000000000
--- a/main/apk-tools/0004-solver-fix-compile-with-Werror-on-64bit.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 00958d92070c583e4fa9d01f5010bce12bcd1b40 Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Wed, 3 Oct 2012 09:04:35 +0200
-Subject: [PATCH] solver: fix compile with -Werror on 64bit
-
----
- src/solver.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/solver.c b/src/solver.c
-index ec44958..f9a2117 100644
---- a/src/solver.c
-+++ b/src/solver.c
-@@ -1664,7 +1664,7 @@ static void update_progress(struct progress *prog, size_t percent)
- draw_progress(percent);
- if (prog->progress_fd != 0) {
- char buf[8];
-- size_t n = snprintf(buf, sizeof(buf), "%d\n", percent);
-+ size_t n = snprintf(buf, sizeof(buf), "%zu\n", percent);
- write(prog->progress_fd, buf, n);
- }
- }
---
-1.7.12.2
-
diff --git a/main/apk-tools/0005-solver-improve-assert-error-messages.patch b/main/apk-tools/0005-solver-improve-assert-error-messages.patch
deleted file mode 100644
index 0773efcf6..000000000
--- a/main/apk-tools/0005-solver-improve-assert-error-messages.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 081155c438c0680b868175c95d160f1e3b519541 Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Wed, 3 Oct 2012 09:16:28 +0200
-Subject: [PATCH] solver: improve assert error messages
-
-Print name of package and void double "ERROR"
----
- src/solver.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/src/solver.c b/src/solver.c
-index f9a2117..edf1650 100644
---- a/src/solver.c
-+++ b/src/solver.c
-@@ -927,11 +927,12 @@ static int next_branch(struct apk_solver_state *ss)
-
- #ifdef DEBUG_CHECKS
- ASSERT(cmpscore(&d->saved_score, &ss->score) == 0,
-- "ERROR! saved_score "SCORE_FMT" != score "SCORE_FMT,
-+ "Saved_score "SCORE_FMT" != score "SCORE_FMT,
- SCORE_PRINTF(&d->saved_score),
- SCORE_PRINTF(&ss->score));
- ASSERT(d->saved_requirers == name->ss.requirers,
-- "ERROR! requirers not restored between decisions");
-+ "Requirers not restored between decisions (%s)",
-+ name->name);
- #endif
-
- if (backup_until >= ss->num_decisions &&
---
-1.7.12.2
-
diff --git a/main/apk-tools/0006-solver-various-fixes.patch b/main/apk-tools/0006-solver-various-fixes.patch
deleted file mode 100644
index 8c11c5311..000000000
--- a/main/apk-tools/0006-solver-various-fixes.patch
+++ /dev/null
@@ -1,239 +0,0 @@
-From 4dd8c58df9aa2e7821a7d5bb50407033858ed1c3 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
-Date: Wed, 3 Oct 2012 14:59:48 +0300
-Subject: [PATCH] solver: various fixes
-
- * push_decision expects to always get the package primary 'name'
- as apk_name. ASSERT that and fix problem cases.
- (though - this might need to be reverted, and store the non
- primary name in apk_decision instead to accomodate for better
- backtracking optimizations)
- * fix error reporting of virtual package names
- * make 'assign_name' errors soft. the incorrect packages just are
- no longer consider instead of aborting whole calculation.
- * fix backtracking of virtual packages that are not depended
- directly
----
- src/solver.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++------------
- 1 file changed, 58 insertions(+), 14 deletions(-)
-
-diff --git a/src/solver.c b/src/solver.c
-index edf1650..3fb7832 100644
---- a/src/solver.c
-+++ b/src/solver.c
-@@ -706,10 +706,14 @@ static inline void assign_name(
- struct apk_solver_state *ss, struct apk_name *name, struct apk_provider p)
- {
- if (p.version == &apk_null_blob) {
-- ASSERT(!name->ss.locked || name->ss.chosen.version == &apk_null_blob,
-- "Assigning locked name with version");
-+ /* Assigning locked name with version is a problem;
-+ * generally package providing same name twice */
-+ if (name->ss.locked && name->ss.chosen.version != &apk_null_blob)
-+ ss->impossible_state = 1;
- } else {
-- ASSERT(!name->ss.locked, "Assigning locked name");
-+ /* Similar to above */
-+ if (name->ss.locked)
-+ ss->impossible_state = 1;
- }
- name->ss.chosen = p;
- name->ss.locked++;
-@@ -721,7 +725,7 @@ static inline void assign_name(
-
- static inline void unassign_name(struct apk_solver_state *ss, struct apk_name *name)
- {
-- ASSERT(name->ss.locked, "Unassigning unlocked name");
-+ ASSERT(name->ss.locked, "Unassigning unlocked name %s", name->name);
- name->ss.locked--;
- if (name->ss.locked == 0) {
- name->ss.chosen = CHOSEN_NONE;
-@@ -793,7 +797,7 @@ static solver_result_t apply_decision(struct apk_solver_state *ss,
- addscore(&ss->score, &score);
-
- name->ss.chosen = CHOSEN_NONE;
-- name->ss.locked = 1;
-+ name->ss.locked++;
- list_del(&name->ss.unsolved_list);
- list_init(&name->ss.unsolved_list);
- } else {
-@@ -847,7 +851,7 @@ static void undo_decision(struct apk_solver_state *ss,
- for (i = 0; i < pkg->provides->num; i++)
- pkg->provides->item[i].name->ss.name_touched = 1;
-
-- if (name->ss.locked) {
-+ if (d->type == DECISION_ASSIGN) {
- if (ps->handle_install_if)
- foreach_rinstall_if_pkg(ss, pkg, untrigger_install_if);
- foreach_dependency(ss, pkg->depends, undo_constraint);
-@@ -871,12 +875,12 @@ static void undo_decision(struct apk_solver_state *ss,
- if (d->type == DECISION_ASSIGN) {
- get_unassigned_score(name, &score);
- subscore(&ss->score, &score);
-+ name->ss.locked--;
- } else {
- name->ss.none_excluded = 0;
- }
-
- /* Put back the name to unsolved list */
-- name->ss.locked = 0;
- promote_name(ss, name);
- }
- }
-@@ -890,6 +894,9 @@ static solver_result_t push_decision(struct apk_solver_state *ss,
- {
- struct apk_decision *d;
-
-+ ASSERT(pkg == NULL || pkg->name == name,
-+ "push_decision got non-primary name: %s != %s",
-+ pkg->name->name, name->name);
- ASSERT(ss->num_decisions <= ss->max_decisions,
- "Decision tree overflow.");
-
-@@ -897,6 +904,8 @@ static solver_result_t push_decision(struct apk_solver_state *ss,
- d = &ss->decisions[ss->num_decisions];
-
- #ifdef DEBUG_CHECKS
-+ dbg_printf("Saving score ("SCORE_FMT") and requirers (%d) for %s\n",
-+ SCORE_PRINTF(&ss->score), name->ss.requirers, name->name);
- d->saved_score = ss->score;
- d->saved_requirers = name->ss.requirers;
- #endif
-@@ -911,6 +920,12 @@ static solver_result_t push_decision(struct apk_solver_state *ss,
- d->pkg = pkg;
- d->no_package = 0;
- }
-+ /* FIXME: this is needed for virtual packages - should possible
-+ * consider making backtracking information also keep the
-+ * virtual apk_name causing the touched information to be more
-+ * accurate */
-+ if (name->ss.last_touched_decision == 0)
-+ name->ss.last_touched_decision = ss->num_decisions;
-
- return apply_decision(ss, d);
- }
-@@ -931,8 +946,8 @@ static int next_branch(struct apk_solver_state *ss)
- SCORE_PRINTF(&d->saved_score),
- SCORE_PRINTF(&ss->score));
- ASSERT(d->saved_requirers == name->ss.requirers,
-- "Requirers not restored between decisions (%s)",
-- name->name);
-+ "Requirers not restored between decisions (%s), %d != %d",
-+ name->name, d->saved_requirers, name->ss.requirers);
- #endif
-
- if (backup_until >= ss->num_decisions &&
-@@ -940,6 +955,10 @@ static int next_branch(struct apk_solver_state *ss)
- d->branching_point = BRANCH_NO;
- d->type = (d->type == DECISION_ASSIGN) ? DECISION_EXCLUDE : DECISION_ASSIGN;
- return apply_decision(ss, d);
-+ } else {
-+ if (d->branching_point == BRANCH_YES)
-+ dbg_printf("skipping %s, %d < %d\n",
-+ name->name, backup_until, ss->num_decisions);
- }
-
- if (d->no_package && !d->found_solution) {
-@@ -963,11 +982,15 @@ static void apply_constraint(struct apk_solver_state *ss, struct apk_dependency
- if (ss->num_decisions > 0) {
- requirer_name = decision_to_name(&ss->decisions[ss->num_decisions]);
- requirer_pkg = decision_to_pkg(&ss->decisions[ss->num_decisions]);
-+ /* FIXME: should probably take into account the requirer
-+ * package's provided name's 'requirer strength' */
- strength = requirer_name->ss.requirers ?: 1;
- } else {
- strength = 1;
- }
-
-+ dbg_printf("--->apply_constraint: %s (strength %d)\n", name->name, strength);
-+
- if (name->ss.locked) {
- if (name->ss.chosen.pkg)
- dbg_printf("%s: locked to " PKG_VER_FMT " already\n",
-@@ -1021,8 +1044,10 @@ static void apply_constraint(struct apk_solver_state *ss, struct apk_dependency
- if (changed)
- name->ss.last_touched_decision = ss->num_decisions;
-
-- if (!dep->conflict)
-+ if (!dep->conflict) {
-+ dbg_printf("%s requirers += %d\n", name->name, strength);
- name->ss.requirers += strength;
-+ }
-
- promote_name(ss, name);
- }
-@@ -1041,6 +1066,8 @@ static void undo_constraint(struct apk_solver_state *ss, struct apk_dependency *
- strength = 1;
- }
-
-+ dbg_printf("--->undo_constraint: %s (strength %d)\n", name->name, strength);
-+
- if (name->ss.locked) {
- if (name->ss.chosen.pkg != NULL) {
- dbg_printf(PKG_VER_FMT " selected already for %s\n",
-@@ -1091,8 +1118,16 @@ static void undo_constraint(struct apk_solver_state *ss, struct apk_dependency *
- if (name->ss.last_touched_decision > ss->num_decisions)
- name->ss.last_touched_decision = ss->num_decisions;
-
-- if (!dep->conflict)
-+ if (requirer_name && requirer_name->ss.requirers != strength) {
-+ dbg_printf("requirer %s, dependency %s: strength mismatch %d != %d\n",
-+ requirer_name->name, name->name,
-+ requirer_name->ss.requirers, strength);
-+ }
-+
-+ if (!dep->conflict) {
- name->ss.requirers -= strength;
-+ dbg_printf("%s requirers -= %d\n", name->name, strength);
-+ }
-
- demote_name(ss, name);
- }
-@@ -1144,7 +1179,7 @@ static int reconsider_name(struct apk_solver_state *ss, struct apk_name *name)
-
- /* viable alternative? */
- if (cmpscore2(&ss->score, &pkg0_score, &ss->best_score) >= 0)
-- return push_decision(ss, name, pkg0, DECISION_EXCLUDE, BRANCH_NO, FALSE);
-+ return push_decision(ss, pkg0->name, pkg0, DECISION_EXCLUDE, BRANCH_NO, FALSE);
-
- if (cmpscore(&pkg0_score, &best_score) < 0) {
- best_score = pkg0_score;
-@@ -1169,9 +1204,10 @@ static int reconsider_name(struct apk_solver_state *ss, struct apk_name *name)
- return SOLVERR_PRUNED;
- return push_decision(ss, name, NULL, DECISION_ASSIGN, BRANCH_NO, FALSE);
- } else if (options == 1 && score_locked && name->ss.none_excluded && name == next_p->pkg->name) {
-+ struct apk_package *pkg0 = next_p->pkg;
- dbg_printf("reconsider_name: %s: only one choice left with known score, locking.\n",
- name->name);
-- return push_decision(ss, name, next_p->pkg, DECISION_ASSIGN, BRANCH_NO, FALSE);
-+ return push_decision(ss, pkg0->name, pkg0, DECISION_ASSIGN, BRANCH_NO, FALSE);
- }
-
- name->ss.chosen = *next_p;
-@@ -1916,7 +1952,10 @@ static void print_dep_errors(struct apk_database *db, char *label,
-
- for (i = 0; i < deps->num; i++) {
- struct apk_dependency *dep = &deps->item[i];
-- struct apk_package *pkg = (struct apk_package*) dep->name->state_ptr;
-+ struct apk_package *pkg = NULL;
-+
-+ if (dep->name->state_int != 1)
-+ pkg = (struct apk_package*) dep->name->state_ptr;
-
- if (apk_dep_is_materialized_or_provided(dep, pkg))
- continue;
-@@ -1953,6 +1992,11 @@ void apk_solver_print_errors(struct apk_database *db,
- for (i = 0; i < solution->num; i++) {
- struct apk_package *pkg = solution->item[i].pkg;
- pkg->name->state_ptr = pkg;
-+ for (j = 0; j < pkg->provides->num; j++) {
-+ if (pkg->provides->item[j].version == &apk_null_blob)
-+ continue;
-+ pkg->provides->item[j].name->state_ptr = pkg;
-+ }
- }
-
- print_dep_errors(db, "world", world, &names);
---
-1.7.12.2
-
diff --git a/main/apk-tools/APKBUILD b/main/apk-tools/APKBUILD
index 699b5d3cb..65261dd87 100644
--- a/main/apk-tools/APKBUILD
+++ b/main/apk-tools/APKBUILD
@@ -1,18 +1,12 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=apk-tools
-pkgver=2.3.2
-pkgrel=3
+pkgver=2.3.3
+pkgrel=0
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-db-remove-AT_SYMLINK_NOFOLLOW-for-directory-permissi.patch
- 0002-apk-implement-progress-fd-to-write-progress-to-a-spe.patch
- 0003-info-provides-alias-p-is-reserved-for-root-use-P.patch
- 0004-solver-fix-compile-with-Werror-on-64bit.patch
- 0005-solver-improve-assert-error-messages.patch
- 0006-solver-various-fixes.patch
"
url="http://git.alpinelinux.org/cgit/apk-tools/"
@@ -64,10 +58,4 @@ luaapk() {
mv "$pkgdir"/usr/lib "$subpkgdir"/usr/lib/
}
-md5sums="813b7c9fd7f6159972dc4fa5dfcc97c5 apk-tools-2.3.2.tar.bz2
-e755492397eba99b3fe698151e4241ff 0001-db-remove-AT_SYMLINK_NOFOLLOW-for-directory-permissi.patch
-0a96443650fec545667b6eccc5d9ef1e 0002-apk-implement-progress-fd-to-write-progress-to-a-spe.patch
-6718b405982c5bfeed3761a9d57cfce8 0003-info-provides-alias-p-is-reserved-for-root-use-P.patch
-c32124de6cee4b1bea2d5e2ac954d73a 0004-solver-fix-compile-with-Werror-on-64bit.patch
-79188874b0a35983b182fa48b7c91643 0005-solver-improve-assert-error-messages.patch
-b83138b13bf534046d6cb7c62be87a69 0006-solver-various-fixes.patch"
+md5sums="659c04201019781c3ea092f946369fed apk-tools-2.3.3.tar.bz2"