Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/lay/lay/layMacroController.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "lymMacroInterpreter.h"
#include "lymMacro.h"
#include "gsiDecl.h"
#include "tlFileUtils.h"

#include <QDir>
#include <QUrl>
Expand Down Expand Up @@ -354,6 +355,8 @@ MacroController::sync_package_paths ()
{
std::vector<std::string> package_locations;

// Add package locations for packages

lay::SaltController *sc = lay::SaltController::instance ();
if (sc) {
lay::Salt &salt = sc->salt ();
Expand All @@ -362,6 +365,15 @@ MacroController::sync_package_paths ()
}
}

// Add package locations for technologies which share the same structure

for (db::Technologies::const_iterator t = db::Technologies::instance ()->begin (); t != db::Technologies::instance ()->end (); ++t) {
std::string bd = t->base_path ();
if (! bd.empty () && tl::is_dir (bd)) {
package_locations.push_back (bd);
}
}

// refresh the package locations by first removing the package locations and then rebuilding
// TODO: maybe that is a performance bottleneck, but right now, remove_package_location doesn't do a lot.

Expand Down
Loading