diff --git a/NEWS b/NEWS index 084780a3..19eaf590 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,9 @@ xbps-0.36 (???): + * xbps-install(8): the -n,--dry-run option does not acquire the pkgdb file lock + anymore, so that any user can use this mode even without write permission to + the target pkgdb. + * xbps-query(8): fix a segfault with '-vL' for local unsigned repositories. * xbps-create(8): new option --compression to specify a compression format; diff --git a/bin/xbps-install/main.c b/bin/xbps-install/main.c index 38cac4e9..463ca9df 100644 --- a/bin/xbps-install/main.c +++ b/bin/xbps-install/main.c @@ -215,7 +215,7 @@ main(int argc, char **argv) if (sync && !update && (argc == optind)) exit(EXIT_SUCCESS); - if ((rv = xbps_pkgdb_lock(&xh)) != 0) { + if (!drun && (rv = xbps_pkgdb_lock(&xh)) != 0) { fprintf(stderr, "Failed to lock the pkgdb: %s\n", strerror(rv)); exit(rv); } @@ -245,6 +245,8 @@ main(int argc, char **argv) rv = exec_transaction(&xh, maxcols, yes, drun); } - xbps_pkgdb_unlock(&xh); + if (!drun) + xbps_pkgdb_unlock(&xh); + exit(rv); }