We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61c3df0 commit 4c679eeCopy full SHA for 4c679ee
1 file changed
bin/xbps-alternatives/main.c
@@ -346,8 +346,11 @@ main(int argc, char **argv)
346
exit(EXIT_FAILURE);
347
}
348
if (set_mode) {
349
+ // XXX: xbps_pkgdb_init
350
+ (void)xbps_pkgdb_get_pkg(&xh, "foo");
351
+
352
/* in set mode pkgdb must be locked and flushed on success */
- if ((rv = xbps_pkgdb_lock(&xh)) != 0) {
353
+ if (xbps_pkgdb_lock(&xh) < 0) {
354
xbps_error_printf("failed to lock pkgdb: %s\n", strerror(rv));
355
xbps_end(&xh);
356
0 commit comments