xbps: fix fix fix fix regression after regression

This commit is contained in:
Duncaen 2020-03-05 00:45:34 +01:00
parent 113543ae62
commit d056506930
No known key found for this signature in database
GPG key ID: 335C1D17EC3D6E35
3 changed files with 43 additions and 4 deletions

View file

@ -1,9 +1,13 @@
From 00a3e314b1204c7da4fd18c79f25429d67a55fa1 Mon Sep 17 00:00:00 2001
From aed9402d6282c193ac23252a8686394ac833b713 Mon Sep 17 00:00:00 2001
From: Duncan Overbruck <mail@duncano.de>
Date: Wed, 4 Mar 2020 23:39:27 +0100
Subject: [PATCH] lib/transaction_check_revdeps.c: fix regression in revdeps
check
Subject: [PATCH 1/2] lib/transaction_check_revdeps.c: fix regression in
revdeps check
this is probably the same as reported in #245.
Its again not resetting/initializing a variable in a loop,
falling back to the previous set value.
---
lib/transaction_check_revdeps.c | 2 ++
1 file changed, 2 insertions(+)

View file

@ -0,0 +1,35 @@
From 044f75450bf80a5434097385cec90715c8655c6f Mon Sep 17 00:00:00 2001
From: Duncan Overbruck <mail@duncano.de>
Date: Thu, 5 Mar 2020 00:39:21 +0100
Subject: [PATCH 2/2] lib/transaction_check_revdeps.c: fix previous fix
Don't set transaction type from inside the revdep check,
if the package is being removed then there is not point
in continueing checking if its breaks.
Referencing #245
---
lib/transaction_check_revdeps.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git lib/transaction_check_revdeps.c lib/transaction_check_revdeps.c
index 7e30e3e8..389daab2 100644
--- lib/transaction_check_revdeps.c
+++ lib/transaction_check_revdeps.c
@@ -173,11 +173,9 @@ xbps_transaction_check_revdeps(struct xbps_handle *xhp, xbps_array_t pkgs)
goto out;
}
- ttype = 0;
if ((revpkgd = xbps_find_pkg_in_array(pkgs, pkgname, 0))) {
- ttype = xbps_transaction_pkg_type(revpkgd);
- if (ttype == XBPS_TRANS_REMOVE)
- revpkgd = NULL;
+ if (xbps_transaction_pkg_type(revpkgd) == XBPS_TRANS_REMOVE)
+ continue;
}
if (revpkgd == NULL)
revpkgd = xbps_pkgdb_get_pkg(xhp, curpkgver);
--
2.25.1

View file

@ -1,7 +1,7 @@
# Template file for 'xbps'
pkgname=xbps
version=0.59
revision=4
revision=5
bootstrap=yes
build_style=configure
short_desc="XBPS package system utilities"