xbps{,-static}: update to 0.48.

This commit is contained in:
Juan RP 2015-10-30 15:01:40 +01:00
parent 1a620b7763
commit e5a1f5a836
5 changed files with 7 additions and 184 deletions

View File

@ -2,15 +2,15 @@
#
# NOTE: keep this package synchronized with "srcpkgs/xbps".
pkgname=xbps-static
version=0.47
revision=4
version=0.48
revision=1
build_style=configure
short_desc="The XBPS package system utilities - static binaries"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="http://www.voidlinux.eu/xbps"
license="2-clause-BSD"
distfiles="https://github.com/voidlinux/xbps/archive/$version.tar.gz"
checksum=34d8b69c006330426fcd00240f7d53425c5581d0635e18f7dfef55e1f7a917d2
checksum=77d34651667ca717f33ceff983b7295f77c6c62903134286864b6aa92c9b11a7
wrksrc="xbps-${version}"
hostmakedepends="pkg-config"

View File

@ -1,75 +0,0 @@
From 0d5385ad2b7873746b91526e4b19c783584359c2 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@voidlinux.eu>
Date: Mon, 27 Jul 2015 09:44:25 +0200
Subject: [PATCH] xbps-checkvers: fixed an endless loop with "reverts"
containing extra alphanumeric chars.
---
NEWS | 4 ++++
bin/xbps-checkvers/main.c | 2 +-
tests/xbps/xbps-checkvers/checkvers.sh | 31 +++++++++++++++++++++++++++++++
3 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/bin/xbps-checkvers/main.c b/bin/xbps-checkvers/main.c
index d74a157..896053c 100644
--- bin/xbps-checkvers/main.c
+++ bin/xbps-checkvers/main.c
@@ -533,7 +533,7 @@ check_reverts(const char *repover, const map_item_t reverts)
* Check if it's the first character or the previous character is a
* whitespace.
*/
- if (p > sreverts && !isspace(p[-1]))
+ if (p > sreverts && !isalpha(p[-1]) && !isspace(p[-1]))
continue;
p += strlen(repover);
/*
diff --git a/tests/xbps/xbps-checkvers/checkvers.sh b/tests/xbps/xbps-checkvers/checkvers.sh
index 4b834e3..b6d3be2 100755
--- tests/xbps/xbps-checkvers/checkvers.sh
+++ tests/xbps/xbps-checkvers/checkvers.sh
@@ -301,6 +301,36 @@ EOF
atf_check_equal "$out" "pkgname: A repover: 1.1_1 srcpkgver: 1.0_1"
}
+atf_test_case reverts_alpha
+
+reverts_alpha_head() {
+ atf_set "descr" "xbps-checkvers(8): test with reverts containing an alphanumeric character"
+}
+
+reverts_alpha_body() {
+ mkdir -p some_repo pkg_A void-packages/srcpkgs/fs-utils
+ touch pkg_A/file00
+ cat > void-packages/srcpkgs/fs-utils/template <<EOF
+pkgname=fs-utils
+reverts=v1.10_1
+version=1.10
+revision=1
+do_install() {
+ :
+}
+EOF
+ cd some_repo
+ xbps-create -A noarch -n fs-utils-1.10_1 -s "A pkg" ../pkg_A
+ atf_check_equal $? 0
+ xbps-rindex -d -a $PWD/*.xbps
+ atf_check_equal $? 0
+ cd ..
+ xbps-checkvers -R $PWD/some_repo -D $PWD/void-packages
+ out=`xbps-checkvers -R $PWD/some_repo -D $PWD/void-packages`
+ atf_check_equal $? 0
+ atf_check_equal "$out" "pkgname: fs-utils repover: 1.10_1 srcpkgver: 1.10_1"
+}
+
atf_init_test_cases() {
atf_add_test_case srcpkg_newer
atf_add_test_case srcpkg_newer_with_refs
@@ -313,4 +343,5 @@ atf_init_test_cases() {
atf_add_test_case srcpkg_missing_pkgver
atf_add_test_case srcpkg_missing_pkgverrev
atf_add_test_case reverts
+ atf_add_test_case reverts_alpha
}
--
2.4.6

View File

@ -1,29 +0,0 @@
From 28f01b38365c407736aec0590920203f25ff18b9 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@voidlinux.eu>
Date: Sun, 26 Jul 2015 08:15:07 +0200
Subject: [PATCH 05/30] xbps_transaction_package_replace: fix a resource leak
(CID #98688).
---
lib/transaction_package_replace.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- lib/transaction_package_replace.c
+++ lib/transaction_package_replace.c
@@ -121,8 +121,12 @@ xbps_transaction_package_replace(struct xbps_handle *xhp, xbps_array_t pkgs)
*/
xbps_dictionary_set_cstring_nocopy(instd,
"transaction", "remove");
- if (!xbps_array_add_first(pkgs, instd))
+ if (!xbps_array_add_first(pkgs, instd)) {
+ xbps_object_iterator_release(iter);
+ free(pkgname);
+ free(curpkgname);
return EINVAL;
+ }
free(curpkgname);
}
xbps_object_iterator_release(iter);
--
2.6.1

View File

@ -1,73 +0,0 @@
From c457b594aa29b6980e3887ee309d2df96a89884c Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@voidlinux.eu>
Date: Wed, 14 Oct 2015 11:46:56 +0200
Subject: [PATCH] libxbps: fix eudev-libgudev -> libgudev fallout.
Packages to be replaced must be collected *before* checking for
broken reverse dependencies, otherwise them will always be detected
as broken.
---
NEWS | 3 +++
lib/transaction_dictionary.c | 16 ++++++++--------
lib/transaction_package_replace.c | 1 +
lib/transaction_revdeps.c | 4 ++++
4 files changed, 16 insertions(+), 8 deletions(-)
--- lib/transaction_dictionary.c
+++ lib/transaction_dictionary.c
@@ -300,6 +300,14 @@ xbps_transaction_prepare(struct xbps_handle *xhp)
xbps_object_release(edges);
/*
+ * Check for packages to be replaced.
+ */
+ if ((rv = xbps_transaction_package_replace(xhp, pkgs)) != 0) {
+ xbps_object_release(xhp->transd);
+ xhp->transd = NULL;
+ return rv;
+ }
+ /*
* If there are missing deps or revdeps bail out.
*/
xbps_transaction_revdeps(xhp, pkgs);
@@ -331,14 +339,6 @@ xbps_transaction_prepare(struct xbps_handle *xhp)
}
}
/*
- * Check for packages to be replaced.
- */
- if ((rv = xbps_transaction_package_replace(xhp, pkgs)) != 0) {
- xbps_object_release(xhp->transd);
- xhp->transd = NULL;
- return rv;
- }
- /*
* Add transaction stats for total download/installed size,
* number of packages to be installed, updated, configured
* and removed to the transaction dictionary.
--- lib/transaction_package_replace.c
+++ lib/transaction_package_replace.c
@@ -121,6 +121,7 @@ xbps_transaction_package_replace(struct xbps_handle *xhp, xbps_array_t pkgs)
*/
xbps_dictionary_set_cstring_nocopy(instd,
"transaction", "remove");
+ xbps_dictionary_set_bool(instd, "replaced", true);
if (!xbps_array_add_first(pkgs, instd)) {
xbps_object_iterator_release(iter);
free(pkgname);
--- lib/transaction_revdeps.c
+++ lib/transaction_revdeps.c
@@ -166,6 +166,10 @@ xbps_transaction_revdeps(struct xbps_handle *xhp, xbps_array_t pkgs)
* the transaction.
*/
if (strcmp(tract, "remove") == 0) {
+ if (xbps_dictionary_get(obj, "replaced")) {
+ free(pkgname);
+ continue;
+ }
if (xbps_find_pkg_in_array(pkgs, pkgname, "remove")) {
free(pkgname);
continue;
--
2.6.1

View File

@ -1,7 +1,7 @@
# Template file for 'xbps'
pkgname=xbps
version=0.47
revision=5
version=0.48
revision=1
bootstrap=yes
build_style=configure
short_desc="The XBPS package system utilities"
@ -9,11 +9,11 @@ maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="https://github.com/voidlinux/xbps"
license="2-clause-BSD"
distfiles="https://github.com/voidlinux/xbps/archive/$version.tar.gz"
checksum=34d8b69c006330426fcd00240f7d53425c5581d0635e18f7dfef55e1f7a917d2
checksum=77d34651667ca717f33ceff983b7295f77c6c62903134286864b6aa92c9b11a7
hostmakedepends="pkg-config"
makedepends="zlib-devel libressl-devel libarchive-devel"
depends="xbps-triggers"
depends="ca-certificates xbps-triggers"
# xbps needs symbols from glibc-2.22
case "$XBPS_TARGET_MACHINE" in
*-musl) : ;;