From 41b2cec3566593f5efe90364bd44f8a3ddb8ce2d Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 22 Jun 2019 18:50:40 +0200 Subject: [PATCH] xbps-*: use xbps_pkgdb_update() correctly. xbps-{alternatives,pkgdb,reconfigure}: xbps_pkgdb_update() has been fixed to flush when told so, and we don't need to update the in-memory copy because we are exiting. --- bin/xbps-alternatives/main.c | 2 +- bin/xbps-pkgdb/main.c | 2 +- bin/xbps-reconfigure/main.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/xbps-alternatives/main.c b/bin/xbps-alternatives/main.c index 94ab31e8..4e08d6b2 100644 --- a/bin/xbps-alternatives/main.c +++ b/bin/xbps-alternatives/main.c @@ -247,7 +247,7 @@ main(int argc, char **argv) exit(EXIT_FAILURE); } if ((rv = xbps_alternatives_set(&xh, pkg, group)) == 0) - rv = xbps_pkgdb_update(&xh, true, true); + rv = xbps_pkgdb_update(&xh, true, false); } else if (list_mode) { /* list alternative groups */ rv = list_alternatives(&xh, pkg, group); diff --git a/bin/xbps-pkgdb/main.c b/bin/xbps-pkgdb/main.c index ee1eff34..4f1061ac 100644 --- a/bin/xbps-pkgdb/main.c +++ b/bin/xbps-pkgdb/main.c @@ -189,7 +189,7 @@ main(int argc, char **argv) out: if (rv == 0) - xbps_pkgdb_update(&xh, true, true); + xbps_pkgdb_update(&xh, true, false); xbps_end(&xh); exit(rv ? EXIT_FAILURE : EXIT_SUCCESS); diff --git a/bin/xbps-reconfigure/main.c b/bin/xbps-reconfigure/main.c index 1508c375..869f972c 100644 --- a/bin/xbps-reconfigure/main.c +++ b/bin/xbps-reconfigure/main.c @@ -182,7 +182,7 @@ main(int argc, char **argv) } } if (rv == 0) - xbps_pkgdb_update(&xh, true, true); + xbps_pkgdb_update(&xh, true, false); xbps_end(&xh); exit(rv ? EXIT_FAILURE : EXIT_SUCCESS);