]> git.tdb.fi Git - builder.git/blobdiff - source/lib/builder.h
Improve package brokenness checks and problem reporting
[builder.git] / source / lib / builder.h
index 0455637c9ca96808de0ebff64e3c4519dd0b5ac9..28379ed73a452409ad66715fc134e3a60365f754 100644 (file)
@@ -12,6 +12,7 @@
 #include "config.h"
 #include "logger.h"
 #include "packagemanager.h"
+#include "sourcepackage.h"
 #include "target.h"
 #include "toolchain.h"
 #include "virtualfilesystem.h"
@@ -19,7 +20,6 @@
 class FileTarget;
 class Package;
 class Plugin;
-class SourcePackage;
 
 /**
 This class ties everything else together.  It also contains code for loading
@@ -59,6 +59,7 @@ private:
 
        std::vector<LoadedPlugin> plugins;
        PackageManager package_manager;
+       SourcePackage::ComponentRegistry component_registry;
 
        Architecture native_arch;
        Architecture *current_arch = 0;
@@ -82,6 +83,7 @@ public:
 
        void load_plugins();
        PackageManager &get_package_manager() { return package_manager; }
+       SourcePackage::ComponentRegistry &get_component_registry() { return component_registry; }
 
        template<typename F>
        void call_plugins(F) const;
@@ -109,7 +111,10 @@ public:
        const Logger &get_logger() const { return *logger; }
 
        std::vector<std::string> collect_problems() const;
+private:
+       void collect_broken_packages(const Package &, std::vector<const Package *> &) const;
 
+public:
        /** Loads a build file.  If opts is not null, it is used to configure any
        packages loaded from this file.  If all is true, external packages are also
        configured. */