aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-05-14 19:18:38 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-05-14 19:18:38 +0100
commita890dc2df1d3fbf3ce4f3dc7781a47e5952b02a8 (patch)
tree2b24ed90e5e2230d56ca89d2889578f165bf8919
parent55a2a8453c2d5650c06328777f1e107c7b7b5d7b (diff)
downloadpaludis-a890dc2df1d3fbf3ce4f3dc7781a47e5952b02a8.tar.gz
paludis-a890dc2df1d3fbf3ce4f3dc7781a47e5952b02a8.tar.xz
Sync and cache fix
-rw-r--r--paludis/repositories/repository/repository_repository.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/paludis/repositories/repository/repository_repository.cc b/paludis/repositories/repository/repository_repository.cc
index d421291..2a18959 100644
--- a/paludis/repositories/repository/repository_repository.cc
+++ b/paludis/repositories/repository/repository_repository.cc
@@ -35,6 +35,7 @@
#include <paludis/hook.hh>
#include <paludis/package_id.hh>
#include <paludis/output_manager.hh>
+#include <paludis/environment.hh>
#include <list>
using namespace paludis;
@@ -467,6 +468,16 @@ RepositoryRepository::merge(const MergeParams & m)
SafeOFStream config_filename_output(config_filename_file);
config_filename_output << data;
}
+
+ m.output_manager()->stdout_stream() << "Syncing..." << std::endl;
+ _imp->params.environment()->repository_from_new_config_file(config_filename_file)->sync(m.output_manager());
+
+ /* the repo we'd get before syncing is mostly unusable */
+ const std::tr1::shared_ptr<Repository> newly_created_repo(
+ _imp->params.environment()->repository_from_new_config_file(config_filename_file));
+
+ m.output_manager()->stdout_stream() << "Fixing cache..." << std::endl;
+ newly_created_repo->regenerate_cache();
}
catch (...)
{