From ecbf1738cff72fd5b934c40f388f62edf47875f5 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 23 Aug 2014 16:05:37 +0200 Subject: [PATCH] xbps: merge a patch from git to fix an issue with vpkgs and XBPS_TARGET_ARCH. --- ...alled-a-pkg-in-unpacked-state-is-now.patch | 51 +++++++++++++++++++ srcpkgs/xbps/template | 4 +- 2 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/xbps/patches/0004-xbps_pkg_is_installed-a-pkg-in-unpacked-state-is-now.patch diff --git a/srcpkgs/xbps/patches/0004-xbps_pkg_is_installed-a-pkg-in-unpacked-state-is-now.patch b/srcpkgs/xbps/patches/0004-xbps_pkg_is_installed-a-pkg-in-unpacked-state-is-now.patch new file mode 100644 index 0000000000..7cc1daea1c --- /dev/null +++ b/srcpkgs/xbps/patches/0004-xbps_pkg_is_installed-a-pkg-in-unpacked-state-is-now.patch @@ -0,0 +1,51 @@ +From 5a1919e5206c589b8bf682a288a8954413647e69 Mon Sep 17 00:00:00 2001 +From: Juan RP +Date: Sat, 23 Aug 2014 15:54:24 +0200 +Subject: [PATCH] xbps_pkg_is_installed(): a pkg in "unpacked" state is now + accepted as installed too. + +The reason is that even if the pkg was not configured, it should still be accepted +as installed. If installing packages via XBPS_TARGET_ARCH, pkgs are never configured, +so this must be taken into account. + +Will be cherry-picked to 0.37 meanwhile. +--- + include/xbps.h.in | 3 ++- + lib/util.c | 6 +++--- + 2 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/include/xbps.h.in b/include/xbps.h.in +index 5e7fb31..90d7ef4 100644 +--- include/xbps.h.in ++++ include/xbps.h.in +@@ -1635,7 +1635,8 @@ int xbps_file_hash_check(const char *file, const char *sha256); + bool xbps_verify_file_signature(struct xbps_repo *repo, const char *fname); + + /** +- * Checks if a package is currently installed by matching \a pkg. ++ * Checks if a package is currently installed in pkgdb by matching \a pkg. ++ * To be installed, the pkg must be in "installed" or "unpacked" state. + * + * @param[in] xhp The pointer to an xbps_handle struct. + * @param[in] pkg Package name, version pattern or exact pkg to match. +diff --git a/lib/util.c b/lib/util.c +index d10bcee..a34b706 100644 +--- lib/util.c ++++ lib/util.c +@@ -79,10 +79,10 @@ xbps_pkg_is_installed(struct xbps_handle *xhp, const char *pkg) + */ + if (xbps_pkg_state_dictionary(dict, &state) != 0) + return -1; /* error */ +- if (state != XBPS_PKG_STATE_INSTALLED) +- return 0; /* not fully installed */ ++ if (state == XBPS_PKG_STATE_INSTALLED || state == XBPS_PKG_STATE_UNPACKED) ++ return 1; + +- return 1; ++ return 0; /* not fully installed */ + } + + const char * +-- +2.1.0 + diff --git a/srcpkgs/xbps/template b/srcpkgs/xbps/template index acb72a2dfb..deb0b5c6b0 100644 --- a/srcpkgs/xbps/template +++ b/srcpkgs/xbps/template @@ -1,7 +1,7 @@ # Template file for 'xbps' pkgname=xbps version=0.37 -revision=5 +revision=6 bootstrap=yes short_desc="The XBPS package system utilities" maintainer="Juan RP " @@ -17,7 +17,7 @@ if [ -z "$CHROOT_READY" ]; then CFLAGS+=" -idirafter ${XBPS_MASTERDIR}/usr/include" LDFLAGS+=" -L${XBPS_MASTERDIR}/usr/lib" else - hostmakedepends="which pkg-config git" + hostmakedepends="pkg-config git" makedepends+=" atf-devel" xbps-tests_package() {