xbps: merge patch from master.
Fixes https://github.com/void-linux/xbps/issues/134
This commit is contained in:
parent
e2f098b972
commit
b1ac18a2a2
|
@ -0,0 +1,62 @@
|
|||
commit 58509996aabea52ffc40e5e01c9eb00730c6cdcc
|
||||
Author: Juan RP <xtraeme@gmail.com>
|
||||
Date: Fri Jun 21 19:19:09 2019 +0200
|
||||
|
||||
xbps-install: skip trans if all pkgs are installed or uptodate.
|
||||
|
||||
Fixes an issue pointed out by @Johnnynator
|
||||
|
||||
diff --git a/bin/xbps-install/main.c b/bin/xbps-install/main.c
|
||||
index 8cbba174..371f26c8 100644
|
||||
--- bin/xbps-install/main.c
|
||||
+++ bin/xbps-install/main.c
|
||||
@@ -124,7 +124,7 @@ main(int argc, char **argv)
|
||||
const char *rootdir, *cachedir, *confdir;
|
||||
int i, c, flags, rv, fflag = 0;
|
||||
bool syncf, yes, reinstall, drun, update;
|
||||
- int maxcols;
|
||||
+ int maxcols, eexist = 0;
|
||||
|
||||
rootdir = cachedir = confdir = NULL;
|
||||
flags = rv = 0;
|
||||
@@ -244,6 +244,8 @@ main(int argc, char **argv)
|
||||
exit(rv);
|
||||
}
|
||||
|
||||
+ eexist = optind;
|
||||
+
|
||||
if (update && (argc == optind)) {
|
||||
/* Update all installed packages */
|
||||
rv = dist_upgrade(&xh, maxcols, yes, drun);
|
||||
@@ -254,11 +256,15 @@ main(int argc, char **argv)
|
||||
if (rv == EEXIST) {
|
||||
/* pkg already updated, ignore */
|
||||
rv = 0;
|
||||
+ eexist++;
|
||||
} else if (rv != 0) {
|
||||
xbps_end(&xh);
|
||||
exit(rv);
|
||||
}
|
||||
}
|
||||
+ if (eexist == argc)
|
||||
+ return 0;
|
||||
+
|
||||
rv = exec_transaction(&xh, maxcols, yes, drun);
|
||||
} else if (!update) {
|
||||
/* Install target packages */
|
||||
@@ -267,11 +273,15 @@ main(int argc, char **argv)
|
||||
if (rv == EEXIST) {
|
||||
/* pkg already installed, ignore */
|
||||
rv = 0;
|
||||
+ eexist++;
|
||||
} else if (rv != 0) {
|
||||
xbps_end(&xh);
|
||||
exit(rv);
|
||||
}
|
||||
}
|
||||
+ if (eexist == argc)
|
||||
+ return 0;
|
||||
+
|
||||
rv = exec_transaction(&xh, maxcols, yes, drun);
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'xbps'
|
||||
pkgname=xbps
|
||||
version=0.55
|
||||
revision=2
|
||||
revision=3
|
||||
bootstrap=yes
|
||||
build_style=configure
|
||||
short_desc="XBPS package system utilities"
|
||||
|
|
Loading…
Reference in New Issue