From 2c5f000d5b2fd5db3b70670b835e6b932c0d10e3 Mon Sep 17 00:00:00 2001 From: Pang Yan Han Date: Tue, 30 Aug 2011 00:58:48 +0800 Subject: Improve advice for sync ops when db.lck is present When the database is locked, sync operations involving transactions, such as pacman -Syy, show the following: :: Synchronizing package databases... error: failed to update core (unable to lock database) error: failed to update extra (unable to lock database) error: failed to update community (unable to lock database) error: failed to update multilib (unable to lock database) error: failed to synchronize any databases Whereas pacman -U shows: error: failed to init transaction (unable to lock database) if you're sure a package manager is not already running, you can remove /var/lib/pacman/db.lck Which is much more meaningful, since the presence of db.lck may indicate an erroneous lockfile instead of an ongoing transaction. Improve the error messages for sync operations by advising the user to remove db.lck if he is sure that no package manager is running. Signed-off-by: Pang Yan Han Signed-off-by: Dan McGee --- src/pacman/util.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/pacman/util.h') diff --git a/src/pacman/util.h b/src/pacman/util.h index 66698474..6a26b086 100644 --- a/src/pacman/util.h +++ b/src/pacman/util.h @@ -39,6 +39,7 @@ /* update speed for the fill_progress based functions */ #define UPDATE_SPEED_SEC 0.2f +void trans_init_error(void); int trans_init(alpm_transflag_t flags, int check_valid); int trans_release(void); int needs_root(void); -- cgit v1.2.3-24-g4f1b