- BuildInfo::UpdateLevel level = BuildInfo::CHAINED;
- if(find(direct_reqs.begin(), direct_reqs.end(), *i)!=direct_reqs.end())
- level = BuildInfo::DEPENDENCY;
- final_build_info.update_from((*i)->get_exported_build_info(), level);
-
- const Package::Requirements &reqs = (*i)->get_required_packages();
- for(Package::Requirements::const_iterator j=reqs.begin(); j!=reqs.end(); ++j)
- if(find(all_reqs.begin(), all_reqs.end(), *j)==all_reqs.end())
- all_reqs.push_back(*j);
+ Package *req = queue.front();
+ queue.pop_front();
+
+ for(Package *r: req->get_required_packages())
+ if(!any_equals(all_reqs, r))
+ {
+ final_build_info.update_from(r->get_exported_build_info(), BuildInfo::CHAINED);
+ all_reqs.push_back(r);
+ queue.push_back(r);
+ }