28 {
29
31
33 if (initial_list.empty()) {
34 TLOG_DEBUG( 6) <<
"We have no disabled components";
35 return;
36 }
37
38
39
40 TestCircularDependency cd_fuse("component \'is-disabled\' status", root);
41 std::vector<const ResourceSet*> resource_sets;
42 fill(*root, resource_sets, cd_fuse);
43
44 for (auto & comp : initial_list) {
46 TLOG_DEBUG(6) << comp->UID() <<
" is disabled in session";
47 if (const ResourceSet * rs = comp->cast<ResourceSet>()) {
49 }
50 }
51
52 for (unsigned long count = 1; true; ++count) {
53 const unsigned long num(
size());
54
55 TLOG_DEBUG(6) <<
"before auto-disabling iteration " << count <<
" the number of disabled components is " << num ;
56 for (const auto& res_set : resource_sets) {
58 if (res_set->compute_disabled_state(
m_disabled)) {
59 TLOG_DEBUG(6) <<
"disable custom resource-set- " << res_set->UID() <<
" because children are disabled" ;
62 }
63 }
64 }
65
67 TLOG_DEBUG(6) <<
"after " << count <<
" iteration(s) auto-disabling algorithm found no newly disabled sets, exiting loop ..." ;
68 break;
69 }
70
71 unsigned int iLimit(1000);
72 if (count > iLimit) {
74 break;
75 }
76 }
77}
bool is_enabled(const Resource *component) const
void error(const Issue &issue)