From 5ff3ab5c60b871d5f38daeab5bc848375a02c127 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 18 Jan 2020 08:58:54 +0100 Subject: [PATCH] transaction_revdeps: do not skip pkgs that are being updated. Modified the test case with changes by @duncaen. Closes #205 --- lib/transaction_revdeps.c | 10 ---------- tests/xbps/libxbps/shell/install_test.sh | 14 +------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/lib/transaction_revdeps.c b/lib/transaction_revdeps.c index 35e190f6..e8271012 100644 --- a/lib/transaction_revdeps.c +++ b/lib/transaction_revdeps.c @@ -231,16 +231,6 @@ xbps_transaction_revdeps(struct xbps_handle *xhp, xbps_array_t pkgs) free(pkgname); continue; } - /* - * Installed package conflicts with package - * in transaction being updated, check - * if a new version of this conflicting package - * is in the transaction. - */ - if (xbps_find_pkg_in_array(pkgs, pkgname, "update")) { - free(pkgname); - continue; - } free(pkgname); broken_pkg(mdeps, curpkgver, pkgver, tract); } diff --git a/tests/xbps/libxbps/shell/install_test.sh b/tests/xbps/libxbps/shell/install_test.sh index a320f7cd..4854888b 100644 --- a/tests/xbps/libxbps/shell/install_test.sh +++ b/tests/xbps/libxbps/shell/install_test.sh @@ -646,19 +646,6 @@ update_and_install_body() { atf_check_equal $? 0 cd .. - # update pkgs: A and A-dbg - xbps-install -r root --repo=repo1 --repo=repo1-dbg -ydu - atf_check_equal $? 0 - - out=$(xbps-query -r root -l|wc -l) - atf_check_equal "$out" "2" - - out=$(xbps-query -r root -p pkgver A) - atf_check_equal "$out" "A-1.0_2" - - out=$(xbps-query -r root -p pkgver A-dbg) - atf_check_equal "$out" "A-dbg-1.0_2" - # Due to first repo wins, returns 19 because can't satisfy revdeps xbps-install -r root --repo=repo2 --repo=repo1 --repo=repo1-dbg -ydun A atf_check_equal $? 19 @@ -676,6 +663,7 @@ update_and_install_body() { out=$(xbps-query -r root -p pkgver A-dbg) atf_check_equal "$out" "A-dbg-1.0_2" + # check again with A-2.0_1 in first repo. xbps-install -r root --repo=repo2 --repo=repo1 --repo=repo1-dbg -ydun A atf_check_equal $? 19 }