xbps: update to 0.57.1

This commit is contained in:
q66 2019-10-21 19:40:11 +02:00 committed by Juan RP
parent 3f0309df53
commit 3579b001df
9 changed files with 3 additions and 220 deletions

View File

@ -1,22 +0,0 @@
commit 44692f28d859728fb919a5d736ada82606196f75
Author: Johannes Brechtmann <johannes@jnbr.me>
Date: Wed Jun 26 22:51:41 2019 +0200
bin/xbps-install: update_pkg return EEXIST if package is up to date
makes 58509996aabea52ffc40e5e01c9eb00730c6cdcc work for
xbps-install -u <pkg>
diff --git a/bin/xbps-install/transaction.c b/bin/xbps-install/transaction.c
index cdcc92d7..fc5538bb 100644
--- bin/xbps-install/transaction.c
+++ bin/xbps-install/transaction.c
@@ -286,7 +286,7 @@ update_pkg(struct xbps_handle *xhp, const char *pkgname)
rv = xbps_transaction_update_pkg(xhp, pkgname);
if (rv == EEXIST) {
printf("Package '%s' is up to date.\n", pkgname);
- return 0;
+ return EEXIST;
} else if (rv == ENOENT)
fprintf(stderr, "Package '%s' not found in "
"repository pool.\n", pkgname);

View File

@ -1,30 +0,0 @@
commit 56ae1907b9d588910a5e4712fdaa5784c1641f14
Author: Duncan Overbruck <mail@duncano.de>
Date: Tue Aug 13 12:53:01 2019 +0200
lib/package_alternatives.c: check if alternative is a symlink before removing it
diff --git lib/package_alternatives.c lib/package_alternatives.c
index 9b4d0027..5e4f2b36 100644
--- lib/package_alternatives.c
+++ lib/package_alternatives.c
@@ -111,6 +111,7 @@ static int
remove_symlinks(struct xbps_handle *xhp, xbps_array_t a, const char *grname)
{
unsigned int i, cnt;
+ struct stat st;
cnt = xbps_array_count(a);
for (i = 0; i < cnt; i++) {
@@ -132,6 +133,11 @@ remove_symlinks(struct xbps_handle *xhp, xbps_array_t a, const char *grname)
} else {
lnk = xbps_xasprintf("%s%s", xhp->rootdir, l);
}
+ if (lstat(lnk, &st) == -1 || !S_ISLNK(st.st_mode)) {
+ free(lnk);
+ free(l);
+ continue;
+ }
xbps_set_cb_state(xhp, XBPS_STATE_ALTGROUP_LINK_REMOVED, 0, NULL,
"Removing '%s' alternatives group symlink: %s", grname, l);
unlink(lnk);

View File

@ -1,22 +0,0 @@
From 7b728f5ac0adc28f3d7270c26e14ecff73a7f16f Mon Sep 17 00:00:00 2001
From: Duncaen <mail@duncano.de>
Date: Wed, 26 Jun 2019 22:24:47 +0200
Subject: [PATCH] bin/xbps-remove: fix skipping executing orphans transaction
---
bin/xbps-remove/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/xbps-remove/main.c b/bin/xbps-remove/main.c
index 1ef328a8..4ff943c0 100644
--- bin/xbps-remove/main.c
+++ bin/xbps-remove/main.c
@@ -295,7 +295,7 @@ main(int argc, char **argv)
exit(rv);
}
}
- if (missing == argc) {
+ if (!orphans && missing == argc) {
goto out;
}
if (orphans || (argc > optind)) {

View File

@ -1,56 +0,0 @@
commit 83aa486f6ba049399e457c34be23a7a435f83ceb
Author: Juan RP <xtraeme@gmail.com>
Date: Tue Jun 25 10:32:02 2019 +0200
xbps-remove: skip trans if all pkgs were not found.
Restores behaviour with xbps<0.54.
diff --git a/bin/xbps-remove/main.c b/bin/xbps-remove/main.c
index 61057029..1ef328a8 100644
--- bin/xbps-remove/main.c
+++ bin/xbps-remove/main.c
@@ -145,7 +145,7 @@ remove_pkg(struct xbps_handle *xhp, const char *pkgname, bool recursive)
return rv;
} else if (rv == ENOENT) {
printf("Package `%s' is not currently installed.\n", pkgname);
- return 0;
+ return rv;
} else if (rv != 0) {
xbps_error_printf("Failed to queue `%s' for removing: %s\n",
pkgname, strerror(rv));
@@ -180,7 +180,7 @@ main(int argc, char **argv)
const char *rootdir, *cachedir, *confdir;
int c, flags, rv;
bool yes, drun, recursive, clean_cache, orphans;
- int maxcols;
+ int maxcols, missing;
rootdir = cachedir = confdir = NULL;
flags = rv = 0;
@@ -284,16 +284,24 @@ main(int argc, char **argv)
}
}
+ missing = optind;
for (int i = optind; i < argc; i++) {
rv = remove_pkg(&xh, argv[i], recursive);
- if (rv != 0) {
+ if (rv == ENOENT) {
+ missing++;
+ continue;
+ } else if (rv != 0) {
xbps_end(&xh);
exit(rv);
}
}
+ if (missing == argc) {
+ goto out;
+ }
if (orphans || (argc > optind)) {
rv = exec_transaction(&xh, maxcols, yes, drun);
}
+out:
xbps_end(&xh);
exit(rv);
}

View File

@ -1,33 +0,0 @@
commit bb96486b127054e7b0e02c467b0f61a20d227161
Author: Juan RP <xtraeme@gmail.com>
Date: Thu Jun 27 08:02:19 2019 +0200
xbps-install: make sure to call xbps_end() before exiting.
diff --git a/bin/xbps-install/main.c b/bin/xbps-install/main.c
index 371f26c8..3622af5a 100644
--- bin/xbps-install/main.c
+++ bin/xbps-install/main.c
@@ -263,7 +263,7 @@ main(int argc, char **argv)
}
}
if (eexist == argc)
- return 0;
+ goto out;
rv = exec_transaction(&xh, maxcols, yes, drun);
} else if (!update) {
@@ -280,11 +280,12 @@ main(int argc, char **argv)
}
}
if (eexist == argc)
- return 0;
+ goto out;
rv = exec_transaction(&xh, maxcols, yes, drun);
}
+out:
xbps_end(&xh);
exit(rv);
}

View File

@ -1,18 +0,0 @@
commit d72091a2060817ac10f55fbd8de4e0611d6d6940
Author: Duncaen <mail@duncano.de>
Date: Wed Jun 26 13:07:16 2019 +0200
lib/transaction_files.c: fix returning error on hash mismatch
diff --git lib/transaction_files.c lib/transaction_files.c
index 4dbf4584..9a6ca630 100644
--- lib/transaction_files.c
+++ lib/transaction_files.c
@@ -331,6 +331,7 @@ collect_obsoletes(struct xbps_handle *xhp)
continue;
case ERANGE:
/* hash mismatch don't delete it */
+ rv = 0;
continue;
default:
break;

View File

@ -1,30 +0,0 @@
diff --git lib/package_script.c lib/package_script.c
index a8c05dcf..919f821b 100644
--- lib/package_script.c
+++ lib/package_script.c
@@ -40,9 +40,10 @@ xbps_pkg_exec_buffer(struct xbps_handle *xhp,
bool update)
{
ssize_t ret;
- const char *tmpdir, *version;
+ const char *tmpdir, *version, *shell;
char *pkgname, *fpath;
int fd, rv;
+ struct stat st;
assert(blob);
assert(pkgver);
@@ -100,7 +101,12 @@ xbps_pkg_exec_buffer(struct xbps_handle *xhp,
version = xbps_pkg_version(pkgver);
assert(version);
- rv = xbps_file_exec(xhp, "/bin/sh", fpath, action, pkgname, version,
+ // Fallback
+ shell = "/bin/sh";
+ if (stat(shell, &st) < 0) {
+ shell = "/bin/dash";
+ }
+ rv = xbps_file_exec(xhp, shell, fpath, action, pkgname, version,
update ? "yes" : "no",
"no", xhp->native_arch, NULL);
free(pkgname);

View File

@ -1,6 +0,0 @@
d72091a20.patch
83aa486f6ba049399.patch
7b728f5ac.patch
44692f28d8.patch
bb96486b127.patch
fix-missing-sh.patch

View File

@ -1,7 +1,7 @@
# Template file for 'xbps'
pkgname=xbps
version=0.56
revision=7
version=0.57.1
revision=1
bootstrap=yes
build_style=configure
short_desc="XBPS package system utilities"
@ -10,7 +10,7 @@ license="BSD-2-Clause"
homepage="https://github.com/void-linux/xbps"
changelog="https://github.com/void-linux/xbps/blob/master/NEWS"
distfiles="https://github.com/void-linux/xbps/archive/${version}.tar.gz"
checksum=e46521513b0c0ff486cc190089277381b18db45e770b04f799dc4eec99ffccd4
checksum=bccad7c4187c467f322e6905fbe96839c00d2cbdda254c0c99b38eabeedb8678
hostmakedepends="pkg-config"
checkdepends="kyua"