xbps: merge two patches from master for xbps-install(1).

This commit is contained in:
Juan RP 2019-06-27 08:55:07 +02:00
parent 774e562d8c
commit 3618e94511
No known key found for this signature in database
GPG Key ID: AF19F6CB482F9368
4 changed files with 58 additions and 1 deletions

View File

@ -0,0 +1,22 @@
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

@ -0,0 +1,33 @@
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,3 +1,5 @@
d72091a20.patch d72091a20.patch
83aa486f6ba049399.patch 83aa486f6ba049399.patch
7b728f5ac.patch 7b728f5ac.patch
44692f28d8.patch
bb96486b127.patch

View File

@ -1,7 +1,7 @@
# Template file for 'xbps' # Template file for 'xbps'
pkgname=xbps pkgname=xbps
version=0.56 version=0.56
revision=4 revision=5
bootstrap=yes bootstrap=yes
build_style=configure build_style=configure
short_desc="XBPS package system utilities" short_desc="XBPS package system utilities"