diff --git a/srcpkgs/xbps/patches/c8d676f10e75d5bd41ff31695d7a747038f219c0.patch b/srcpkgs/xbps/patches/c8d676f10e75d5bd41ff31695d7a747038f219c0.patch new file mode 100644 index 00000000000..976f3f123f7 --- /dev/null +++ b/srcpkgs/xbps/patches/c8d676f10e75d5bd41ff31695d7a747038f219c0.patch @@ -0,0 +1,34 @@ +From c8d676f10e75d5bd41ff31695d7a747038f219c0 Mon Sep 17 00:00:00 2001 +From: Juan RP +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); diff --git a/srcpkgs/xbps/template b/srcpkgs/xbps/template index 03e6d8ccc56..1d9e85366bf 100644 --- a/srcpkgs/xbps/template +++ b/srcpkgs/xbps/template @@ -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"