xbps-remove(8): -n,--dry-run option does not need pkgdb write perms anymore.
This commit is contained in:
parent
bbae14f187
commit
26c1e80933
4
NEWS
4
NEWS
@ -1,5 +1,9 @@
|
||||
xbps-0.37 (???):
|
||||
|
||||
* xbps-remove(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-remove(8) -O, --clean-cache is now multithreaded. Gives a performance
|
||||
boost as the number of threads increases.
|
||||
|
||||
|
@ -262,7 +262,7 @@ main(int argc, char **argv)
|
||||
exit(rv);;
|
||||
}
|
||||
|
||||
if ((rv = xbps_pkgdb_lock(&xh)) != 0) {
|
||||
if (!drun && (rv = xbps_pkgdb_lock(&xh)) != 0) {
|
||||
fprintf(stderr, "failed to lock pkgdb: %s\n", strerror(rv));
|
||||
exit(rv);
|
||||
}
|
||||
@ -284,19 +284,23 @@ main(int argc, char **argv)
|
||||
if (rv == 0)
|
||||
continue;
|
||||
else if (rv != EEXIST) {
|
||||
xbps_pkgdb_unlock(&xh);
|
||||
if (!drun) {
|
||||
xbps_pkgdb_unlock(&xh);
|
||||
}
|
||||
exit(rv);
|
||||
} else {
|
||||
reqby_force = true;
|
||||
}
|
||||
}
|
||||
if (reqby_force && !ignore_revdeps) {
|
||||
if (reqby_force && !ignore_revdeps && !drun) {
|
||||
xbps_pkgdb_unlock(&xh);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (orphans || (argc > optind)) {
|
||||
rv = exec_transaction(&xh, maxcols, yes, drun);
|
||||
}
|
||||
xbps_pkgdb_unlock(&xh);
|
||||
if (!drun) {
|
||||
xbps_pkgdb_unlock(&xh);
|
||||
}
|
||||
exit(rv);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user