xbps: add patch for recursive remove regression

This commit is contained in:
Duncaen 2020-02-22 00:13:22 +01:00
parent 23cfc81377
commit e43169e083
No known key found for this signature in database
GPG key ID: 335C1D17EC3D6E35
2 changed files with 35 additions and 1 deletions

View file

@ -0,0 +1,34 @@
From c8d676f10e75d5bd41ff31695d7a747038f219c0 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Fri, 21 Feb 2020 23:51:28 +0100
Subject: [PATCH] xbps_find_pkg_orphans: fix for #234
Make sure "automatic" bool is initialized to false before
checking its value. This way if xbps_dictionary_get_bool()
fails, "automatic" will be set to false.
Closes #234
---
lib/package_orphans.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/package_orphans.c b/lib/package_orphans.c
index f5352a9a..f7e2d941 100644
--- lib/package_orphans.c
+++ lib/package_orphans.c
@@ -156,7 +156,6 @@ xbps_find_pkg_orphans(struct xbps_handle *xhp, xbps_array_t orphans_user)
xbps_dictionary_t pkgd;
const char *pkgver = NULL;
unsigned int cnt = 0, reqbycnt = 0;
- bool automatic = false;
pkgd = xbps_array_get(array, i);
xbps_dictionary_get_cstring_nocopy(pkgd, "pkgver", &pkgver);
@@ -170,6 +169,7 @@ xbps_find_pkg_orphans(struct xbps_handle *xhp, xbps_array_t orphans_user)
xbps_array_t reqby;
xbps_dictionary_t deppkgd;
const char *deppkgver = NULL;
+ bool automatic = false;
cnt = 0;
xbps_array_get_cstring_nocopy(rdeps, x, &deppkgver);

View file

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