list<string> package_details;
for(PackageManager::PackageMap::const_iterator i=packages.begin(); i!=packages.end(); ++i)
{
- if(!i->second || !i->second->is_prepared())
+ if(!i->second->is_prepared())
continue;
string line = i->second->get_name();
Package *PackageManager::find_package(const string &name)
{
+ if(not_found.count(name))
+ return 0;
+
PackageMap::iterator i = packages.find(name);
if(i!=packages.end())
return i->second;
return i->second;
}
- Package *pkg = 0;
try
{
// Package source not found - create a binary package
string flags_str = run_pkgconfig(name, "flags");
vector<string> flags = split(flags_str);
- pkg = BinaryPackage::from_flags(builder, name, flags);
+ Package *pkg = BinaryPackage::from_flags(builder, name, flags);
+ packages.insert(PackageMap::value_type(name, pkg));
+ return pkg;
}
catch(...)
{
builder.problem(name, "not found");
+ not_found.insert(name);
+ return 0;
}
-
- packages.insert(PackageMap::value_type(name, pkg));
-
- return pkg;
}
string PackageManager::run_pkgconfig(const string &pkg, const string &what)