From d4a25b7ebf55f336294f0a9b2161991a56e9df0c Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 10 Jan 2015 19:26:24 +0100 Subject: [PATCH] xbps-remove: xbps_pkgdb_unlock -> xbps_end. --- bin/xbps-remove/main.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/bin/xbps-remove/main.c b/bin/xbps-remove/main.c index 74c4a0a2..53db3cc1 100644 --- a/bin/xbps-remove/main.c +++ b/bin/xbps-remove/main.c @@ -280,7 +280,7 @@ main(int argc, char **argv) if (orphans) { if ((rv = xbps_transaction_autoremove_pkgs(&xh)) != 0) { - xbps_pkgdb_unlock(&xh); + xbps_end(&xh); if (rv != ENOENT) { fprintf(stderr, "Failed to queue package " "orphans: %s\n", strerror(rv)); @@ -295,23 +295,19 @@ main(int argc, char **argv) if (rv == 0) continue; else if (rv != EEXIST) { - if (!drun) { - xbps_pkgdb_unlock(&xh); - } + xbps_end(&xh); exit(rv); } else { reqby_force = true; } } if (reqby_force && !ignore_revdeps && !drun) { - xbps_pkgdb_unlock(&xh); + xbps_end(&xh); exit(EXIT_FAILURE); } if (orphans || (argc > optind)) { rv = exec_transaction(&xh, maxcols, yes, drun); } - if (!drun) { - xbps_pkgdb_unlock(&xh); - } + xbps_end(&xh); exit(rv); }