]> git.tdb.fi Git - builder.git/blobdiff - source/buildercli.cpp
Convert all list containers to vectors
[builder.git] / source / buildercli.cpp
index 2e588aded12e2a2158432b83bbfb0d289ca8c534..2469f5162862faf199f0931105cede9e0f0b72fa 100644 (file)
@@ -39,7 +39,7 @@ BuilderCLI::BuilderCLI(int argc, char **argv):
        bool no_externals = false;
        unsigned verbose = 1;
        bool silent = false;
-       list<string> log_channels;
+       vector<string> log_channels;
        string build_type;
 
        GetOpt getopt;
@@ -136,7 +136,7 @@ BuilderCLI::BuilderCLI(int argc, char **argv):
 
        builder.set_architecture(tolower(arch));
 
-       list<FS::Path> start_files;
+       vector<FS::Path> start_files;
        start_files.push_back(FS::get_sys_data_dir()/"builderrc");
        start_files.push_back(FS::get_user_data_dir()/"rc");
        for(const FS::Path &f: start_files)
@@ -203,12 +203,6 @@ int BuilderCLI::main()
                return 0;
        }
 
-       if(!prepare_build())
-               return 1;
-
-       if(conf_only)
-               return 0;
-
        const Architecture &native_arch = builder.get_native_arch();
        const Architecture &current_arch = builder.get_current_arch();
        logger.log("environment", format("Building on %s, for %s%s", native_arch.get_name(),
@@ -222,9 +216,15 @@ int BuilderCLI::main()
        const BuildType &build_type = builder.get_build_type();
        logger.log("environment", format("Build type is %s", build_type.get_name()));
 
+       if(!prepare_build())
+               return 1;
+
+       if(conf_only)
+               return 0;
+
        BuildGraph &build_graph = builder.get_build_graph();
        PackageManager &package_manager = builder.get_package_manager();
-       list<string> package_details;
+       vector<string> package_details;
        for(const auto &kvp: package_manager.get_packages())
        {
                if(!kvp.second->is_prepared())
@@ -265,7 +265,7 @@ int BuilderCLI::main()
 
        if(build_graph.get_goals().is_broken())
        {
-               list<string> problems = builder.collect_problems();
+               vector<string> problems = builder.collect_problems();
                IO::print(IO::cerr, "The following problems were detected:\n");
                for(const string &p: problems)
                        IO::print(IO::cerr, "  %s\n", p);