xbps: add patch from git master to fix xbps-reconfigure -a.
This commit is contained in:
parent
824c00e63e
commit
f2b40a21ac
|
@ -0,0 +1,44 @@
|
|||
From 6a60bceb54b4a1cd01ecb5f7cd3da35677544dc7 Mon Sep 17 00:00:00 2001
|
||||
From: Juan RP <xtraeme@gmail.com>
|
||||
Date: Mon, 17 Dec 2012 11:27:10 +0100
|
||||
Subject: [PATCH] xbps_configure_pkg: set pkg state in our pkg dictionary from
|
||||
pkgdb.
|
||||
|
||||
Replacing a dictionary while the iterator is held invalidates this iterator, thus
|
||||
breaking the loop.
|
||||
|
||||
Thanks to pancake for finding this issue.
|
||||
---
|
||||
lib/package_configure.c | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/lib/package_configure.c b/lib/package_configure.c
|
||||
index eba9efa..08683e9 100644
|
||||
--- lib/package_configure.c
|
||||
+++ lib/package_configure.c
|
||||
@@ -62,8 +62,11 @@ xbps_configure_packages(struct xbps_handle *xhp, bool flush)
|
||||
while ((obj = prop_object_iterator_next(iter))) {
|
||||
prop_dictionary_get_cstring_nocopy(obj, "pkgname", &pkgname);
|
||||
rv = xbps_configure_pkg(xhp, pkgname, true, false, false);
|
||||
- if (rv != 0)
|
||||
+ if (rv != 0) {
|
||||
+ xbps_dbg_printf(xhp, "%s: failed to configure %s: %s\n",
|
||||
+ __func__, pkgname, strerror(rv));
|
||||
break;
|
||||
+ }
|
||||
}
|
||||
prop_object_iterator_release(iter);
|
||||
|
||||
@@ -133,8 +136,7 @@ xbps_configure_pkg(struct xbps_handle *xhp,
|
||||
return rv;
|
||||
}
|
||||
|
||||
- rv = xbps_set_pkg_state_installed(xhp, pkgname, version,
|
||||
- XBPS_PKG_STATE_INSTALLED);
|
||||
+ rv = xbps_set_pkg_state_dictionary(pkgd, XBPS_PKG_STATE_INSTALLED);
|
||||
if (rv != 0) {
|
||||
xbps_set_cb_state(xhp, XBPS_STATE_CONFIGURE_FAIL, rv,
|
||||
pkgname, version,
|
||||
--
|
||||
1.8.0.2
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'xbps'
|
||||
pkgname=xbps
|
||||
version=0.19
|
||||
revision=1
|
||||
revision=2
|
||||
build_style=configure
|
||||
configure_args="--prefix=/ --exec-prefix=/usr --sbindir=/usr/sbin
|
||||
--with-tests --with-static"
|
||||
|
|
Loading…
Reference in New Issue