diff --git a/srcpkgs/xbps/patches/0001-Do-not-configure-pkg-if-there-s-an-update-in-transac.patch b/srcpkgs/xbps/patches/0001-Do-not-configure-pkg-if-there-s-an-update-in-transac.patch new file mode 100644 index 00000000000..c4621b011c0 --- /dev/null +++ b/srcpkgs/xbps/patches/0001-Do-not-configure-pkg-if-there-s-an-update-in-transac.patch @@ -0,0 +1,47 @@ +From 9489f8a3dc1deff2548032c102e22c7308df74c7 Mon Sep 17 00:00:00 2001 +From: Juan RP +Date: Thu, 20 Dec 2012 12:08:55 +0100 +Subject: [PATCH] Do not configure pkg if there's an update in transaction. + +This fixes the following problem: + + - pkg is installed with state "unpacked". + - There's an update of pkg in transaction. + - xbps tries to configure the pkg because its state is "unpacked", + therefore ignoring the update. +--- + NEWS | 5 +++++ + lib/transaction_ops.c | 2 +- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/NEWS b/NEWS +index e198f02..5fb96fe 100644 +--- NEWS ++++ NEWS +@@ -1,5 +1,10 @@ + xbps-0.19.1 (???): + ++ * libxbps: when a package has not been configured and there's an update ++ in transaction, libxbps incorrectly tried to ignore the update and ++ configure this package. Fix this by not ignoring the update even if ++ package has any state. ++ + * xbps-query(8): -l, --list-packages option now prints pkg state as follows: + + STATE PKGVER DESCRIPTION +diff --git a/lib/transaction_ops.c b/lib/transaction_ops.c +index e25f1c4..89233f0 100644 +--- lib/transaction_ops.c ++++ lib/transaction_ops.c +@@ -145,7 +145,7 @@ trans_find_pkg(struct xbps_handle *xhp, const char *pkg, int action) + if ((rv = xbps_set_pkg_state_dictionary(pkg_repod, state)) != 0) + return rv; + +- if (state == XBPS_PKG_STATE_UNPACKED) ++ if ((action == TRANS_INSTALL) && (state == XBPS_PKG_STATE_UNPACKED)) + reason = "configure"; + else if (state == XBPS_PKG_STATE_NOT_INSTALLED) + reason = "install"; +-- +1.8.0.2 + diff --git a/srcpkgs/xbps/template b/srcpkgs/xbps/template index 72e58e3eef0..4212d2e103a 100644 --- a/srcpkgs/xbps/template +++ b/srcpkgs/xbps/template @@ -1,7 +1,7 @@ # Template file for 'xbps' pkgname=xbps version=0.19 -revision=2 +revision=3 build_style=configure configure_args="--prefix=/ --exec-prefix=/usr --sbindir=/usr/sbin --with-tests --with-static"