aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-05-14 11:02:09 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-05-14 17:59:13 +0100
commit20e834878b400401c622c3f835af7200e830e7e2 (patch)
tree00f3bb0b57777780a80355424d9e5eba1b169935
parentc7bb76446302036f8250e95c70f10209fb9a9cc4 (diff)
downloadpaludis-20e834878b400401c622c3f835af7200e830e7e2.tar.gz
paludis-20e834878b400401c622c3f835af7200e830e7e2.tar.xz
Write config files
-rw-r--r--paludis/repositories/repository/repository_repository.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/paludis/repositories/repository/repository_repository.cc b/paludis/repositories/repository/repository_repository.cc
index 0b23c55..8217da2 100644
--- a/paludis/repositories/repository/repository_repository.cc
+++ b/paludis/repositories/repository/repository_repository.cc
@@ -28,6 +28,7 @@
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/simple_parser.hh>
#include <paludis/util/safe_ifstream.hh>
+#include <paludis/util/safe_ofstream.hh>
#include <paludis/literal_metadata_key.hh>
#include <paludis/action.hh>
#include <paludis/syncer.hh>
@@ -454,13 +455,14 @@ RepositoryRepository::merge(const MergeParams & m)
if (config_filename_file.exists())
throw ConfigurationError("config_filename '" + stringify(config_filename_file) + "' already exists");
- m.output_manager()->stdout_stream() << "Would write to " << config_filename_file << std::endl;
+ m.output_manager()->stdout_stream() << "Creating " << config_filename_file << "..." << std::endl;
SafeIFStream config_template_input(config_template_file);
std::string data((std::istreambuf_iterator<char>(config_template_input)), std::istreambuf_iterator<char>());
data = replace_vars(data, repo_sync, repo_format, repo_name);
- m.output_manager()->stdout_stream() << data << std::endl;
+ SafeOFStream config_filename_output(config_filename_file);
+ config_filename_output << data;
}
template class PrivateImplementationPattern<repository_repository::RepositoryRepository>;