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:
parent
97672bd79f
commit
41b2cec356
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user