diff --git a/srcpkgs/xbps/patches/83aa486f6ba049399.patch b/srcpkgs/xbps/patches/83aa486f6ba049399.patch new file mode 100644 index 00000000000..12c9575d8c2 --- /dev/null +++ b/srcpkgs/xbps/patches/83aa486f6ba049399.patch @@ -0,0 +1,56 @@ +commit 83aa486f6ba049399e457c34be23a7a435f83ceb +Author: Juan RP +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); + } diff --git a/srcpkgs/xbps/template b/srcpkgs/xbps/template index 0552bf2c309..a585f952f81 100644 --- a/srcpkgs/xbps/template +++ b/srcpkgs/xbps/template @@ -1,7 +1,7 @@ # Template file for 'xbps' pkgname=xbps version=0.56 -revision=1 +revision=2 bootstrap=yes build_style=configure short_desc="XBPS package system utilities"