summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-11-23 02:42:50 +0000
committerAaron Griffin <aaron@archlinux.org>2006-11-23 02:42:50 +0000
commit12fdce244c49133e9fce9e7356e78570dd1b4a1e (patch)
treefe76291a67c6e9a32be2ae28f3edd4b3dff93cfe
parent07b009273656f57c7691c3a62863a63ff1aac44e (diff)
* Move sync *after* transaction init (lock file). We don't want to stomp on the
databases while another instance of pacman /could/ be reading them.
-rw-r--r--src/pacman/sync.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index c2313b4b..828df1fd 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -372,16 +372,6 @@ int pacman_sync(list_t *targets)
return(sync_cleancache(config->op_s_clean));
}
- if(config->op_s_sync) {
- /* grab a fresh package list */
- MSG(NL, _(":: Synchronizing package databases...\n"));
- alpm_logaction(_("synchronizing package lists"));
- if(!sync_synctree(config->op_s_sync, pmc_syncs)) {
- ERR(NL, _("failed to synchronize any databases"));
- return(1);
- }
- }
-
if(config->op_s_search) {
return(sync_search(pmc_syncs, targets));
}
@@ -409,6 +399,17 @@ int pacman_sync(list_t *targets)
return(1);
}
+ if(config->op_s_sync) {
+ /* grab a fresh package list */
+ MSG(NL, _(":: Synchronizing package databases...\n"));
+ alpm_logaction(_("synchronizing package lists"));
+ if(!sync_synctree(config->op_s_sync, pmc_syncs)) {
+ ERR(NL, _("failed to synchronize any databases"));
+ return(1);
+ }
+ }
+
+
if(config->op_s_upgrade) {
MSG(NL, _(":: Starting full system upgrade...\n"));
alpm_logaction(_("starting full system upgrade"));