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.
This commit is contained in:
Juan RP 2019-06-22 18:50:40 +02:00
parent 97672bd79f
commit 41b2cec356
No known key found for this signature in database
GPG Key ID: AF19F6CB482F9368
3 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);