Skip to content

Commit

Permalink
Fix pkg upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Sep 17, 2024
1 parent b125861 commit 613febf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/upgrade.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,16 +322,16 @@ exec_upgrade(int argc, char **argv)

if (dry_run && !auto_update)
retcode = pkgdb_access(PKGDB_MODE_READ,
PKGDB_DB_LOCAL|PKGDB_DB_REPO);
PKGDB_DB_LOCAL|PKGDB_DB_REPO, reponame, NULL);
else
retcode = pkgdb_access(PKGDB_MODE_READ |
PKGDB_MODE_WRITE |
PKGDB_MODE_CREATE,
PKGDB_DB_LOCAL|PKGDB_DB_REPO);
PKGDB_DB_LOCAL|PKGDB_DB_REPO, reponame, NULL);
if (retcode == EPKG_ENOACCESS && dry_run) {
auto_update = false;
retcode = pkgdb_access(PKGDB_MODE_READ,
PKGDB_DB_LOCAL|PKGDB_DB_REPO);
PKGDB_DB_LOCAL|PKGDB_DB_REPO, reponame, NULL);
}

if (retcode == EPKG_ENOACCESS) {
Expand Down

0 comments on commit 613febf

Please sign in to comment.