index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2012-02-19 23:24:26 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-02-19 23:24:26 -0600 |
commit | fe659153d5971e41b7483bb40c31cd40f58f9d9c (patch) | |
tree | ac5adaff9ed0542e28acab67f9c95da9984dd889 /src | |
parent | 4899b5bd864919830fe4ce5786d37a00ab5a0da3 (diff) |
-rw-r--r-- | src/pacman/util.c | 10 |
diff --git a/src/pacman/util.c b/src/pacman/util.c index 0b076d97..f7f8ecf5 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -69,9 +69,13 @@ void trans_init_error(void) pm_printf(ALPM_LOG_ERROR, _("failed to init transaction (%s)\n"), alpm_strerror(err)); if(err == ALPM_ERR_HANDLE_LOCK) { - fprintf(stderr, _(" if you're sure a package manager is not already\n" - " running, you can remove %s\n"), - alpm_option_get_lockfile(config->handle)); + const char *lockfile = alpm_option_get_lockfile(config->handle); + pm_printf(ALPM_LOG_ERROR, _("could not lock database: %s\n"), + strerror(errno)); + if(access(lockfile, F_OK) == 0) { + fprintf(stderr, _(" if you're sure a package manager is not already\n" + " running, you can remove %s\n"), lockfile); + } } } |