diff --git a/include/libdnf5/module/module_item.hpp b/include/libdnf5/module/module_item.hpp index 7b164f6df..84c3c3377 100644 --- a/include/libdnf5/module/module_item.hpp +++ b/include/libdnf5/module/module_item.hpp @@ -55,9 +55,9 @@ struct ModuleItemId { // @replaces libdnf:module/ModuleItem.hpp:class:ModuleItem class ModuleItem { public: - bool operator==(const ModuleItem & rhs) const noexcept { return id.id == rhs.id.id; } - bool operator!=(const ModuleItem & rhs) const noexcept { return id.id != rhs.id.id; } - bool operator<(const ModuleItem & rhs) const noexcept { return id.id < rhs.id.id; } + bool operator==(const ModuleItem & rhs) const noexcept; + bool operator!=(const ModuleItem & rhs) const noexcept; + bool operator<(const ModuleItem & rhs) const noexcept; ~ModuleItem(); @@ -156,10 +156,10 @@ class ModuleItem { /// @since 5.0 // // @replaces libdnf:module/ModuleItem.hpp:method:ModuleItem.getRepoID() - const std::string & get_repo_id() const { return repo_id; }; + const std::string & get_repo_id() const; // @replaces libdnf:module/ModuleItem.hpp:method:ModuleItem.getId() - ModuleItemId get_id() const { return id; }; + ModuleItemId get_id() const; // @replaces libdnf:module/ModuleItem.hpp:method:ModuleItem.getYaml() std::string get_yaml() const; @@ -179,8 +179,8 @@ class ModuleItem { ModuleItem(const ModuleItem & mpkg); ModuleItem & operator=(const ModuleItem & mpkg); - ModuleItem(ModuleItem && mpkg); - ModuleItem & operator=(ModuleItem && mpkg); + ModuleItem(ModuleItem && mpkg) noexcept; + ModuleItem & operator=(ModuleItem && mpkg) noexcept; private: friend class ModuleQuery; @@ -246,43 +246,15 @@ class ModuleItem { static void create_platform_solvable( const ModuleSackWeakPtr & module_sack, const std::string & name, const std::string & stream); - // Corresponds to one yaml document - _ModulemdModuleStream * md_stream; + libdnf5::module::ModuleSackWeakPtr get_module_sack() const; - ModuleSackWeakPtr module_sack; - ModuleItemId id; - std::string repo_id; + void set_computed_static_context(const std::string & context); - // For compatibility with older modules that didn't have static contexts - std::string computed_static_context; + class Impl; + std::unique_ptr p_impl; }; -inline std::vector ModuleItem::get_profiles(const std::string & name) const { - return get_profiles_internal(name.c_str()); -} - - -inline std::vector ModuleItem::get_profiles() const { - return get_profiles_internal(nullptr); -} - - -inline std::vector ModuleItem::get_module_dependencies(bool remove_platform) const { - return get_module_dependencies(md_stream, remove_platform); -} - - -inline std::string ModuleItem::get_module_dependencies_string(bool remove_platform) const { - return get_module_dependencies_string(md_stream, remove_platform); -} - - -inline std::string ModuleItem::get_name_stream() const { - return get_name_stream(md_stream); -} - - } // namespace libdnf5::module diff --git a/libdnf5/module/module_item.cpp b/libdnf5/module/module_item.cpp index e3fdb2dd6..c191ba2b1 100644 --- a/libdnf5/module/module_item.cpp +++ b/libdnf5/module/module_item.cpp @@ -38,58 +38,155 @@ extern "C" { #include #include +#include #include namespace libdnf5::module { +class ModuleItem::Impl { +public: + Impl(_ModulemdModuleStream * md_stream, const ModuleSackWeakPtr & module_sack, std::string repo_id); + + ~Impl(); + Impl(const Impl & mpkg); + Impl & operator=(const Impl & mpkg); + Impl(Impl && mpkg) noexcept; + Impl & operator=(Impl && mpkg) noexcept; + +private: + friend ModuleItem; + + ModuleSackWeakPtr module_sack; + + ModuleItemId id; + std::string repo_id; + + // Corresponds to one yaml document + _ModulemdModuleStream * md_stream; + + // For compatibility with older modules that didn't have static contexts + std::string computed_static_context; +}; + +ModuleItem::Impl::Impl(_ModulemdModuleStream * md_stream, const ModuleSackWeakPtr & module_sack, std::string repo_id) + : module_sack(module_sack), + repo_id(std::move(repo_id)), + md_stream(md_stream) { + if (md_stream != nullptr) { + g_object_ref(md_stream); + } +} + + +ModuleItem::Impl::~Impl() { + if (md_stream != nullptr) { + g_object_unref(md_stream); + } +} + +ModuleItem::Impl::Impl(const Impl & mpkg) + : module_sack(mpkg.module_sack), + id(mpkg.id), + repo_id(mpkg.repo_id), + md_stream(mpkg.md_stream), + computed_static_context(mpkg.computed_static_context) { + if (md_stream != nullptr) { + g_object_ref(md_stream); + } +} + + +ModuleItem::Impl & ModuleItem::Impl::operator=(const Impl & mpkg) { + if (this != &mpkg) { + if (md_stream != nullptr) { + g_object_unref(md_stream); + } + module_sack = mpkg.module_sack; + id = mpkg.id; + repo_id = mpkg.repo_id; + md_stream = mpkg.md_stream; + if (md_stream != nullptr) { + g_object_ref(md_stream); + } + computed_static_context = mpkg.computed_static_context; + } + return *this; +} + + +ModuleItem::Impl::Impl(Impl && mpkg) noexcept + : module_sack(mpkg.module_sack), + id(mpkg.id), + repo_id(std::move(mpkg.repo_id)), + md_stream(mpkg.md_stream), + computed_static_context(std::move(mpkg.computed_static_context)) { + mpkg.md_stream = nullptr; +} + + +ModuleItem::Impl & ModuleItem::Impl::operator=(Impl && mpkg) noexcept { + if (this != &mpkg) { + if (md_stream != nullptr) { + g_object_unref(md_stream); + } + module_sack = mpkg.module_sack; + id = mpkg.id; + repo_id = std::move(mpkg.repo_id); + md_stream = mpkg.md_stream; + mpkg.md_stream = nullptr; + computed_static_context = std::move(mpkg.computed_static_context); + } + return *this; +} + const char * ModuleItem::get_name_cstr() const { - return modulemd_module_stream_get_module_name(md_stream); + return modulemd_module_stream_get_module_name(p_impl->md_stream); } std::string ModuleItem::get_name() const { - return libdnf5::utils::string::c_to_str(modulemd_module_stream_get_module_name(md_stream)); + return libdnf5::utils::string::c_to_str(modulemd_module_stream_get_module_name(p_impl->md_stream)); } const char * ModuleItem::get_stream_cstr() const { - return modulemd_module_stream_get_stream_name(md_stream); + return modulemd_module_stream_get_stream_name(p_impl->md_stream); } std::string ModuleItem::get_stream() const { - return libdnf5::utils::string::c_to_str(modulemd_module_stream_get_stream_name(md_stream)); + return libdnf5::utils::string::c_to_str(modulemd_module_stream_get_stream_name(p_impl->md_stream)); } long long ModuleItem::get_version() const { - return (long long)modulemd_module_stream_get_version(md_stream); + return (long long)modulemd_module_stream_get_version(p_impl->md_stream); } std::string ModuleItem::get_version_str() const { - return std::to_string(modulemd_module_stream_get_version(md_stream)); + return std::to_string(modulemd_module_stream_get_version(p_impl->md_stream)); } const char * ModuleItem::get_context_cstr() const { - return modulemd_module_stream_get_context(md_stream); + return modulemd_module_stream_get_context(p_impl->md_stream); } std::string ModuleItem::get_context() const { - return libdnf5::utils::string::c_to_str(modulemd_module_stream_get_context(md_stream)); + return libdnf5::utils::string::c_to_str(modulemd_module_stream_get_context(p_impl->md_stream)); } const char * ModuleItem::get_arch_cstr() const { - return modulemd_module_stream_get_arch(md_stream); + return modulemd_module_stream_get_arch(p_impl->md_stream); } std::string ModuleItem::get_arch() const { - return libdnf5::utils::string::c_to_str(modulemd_module_stream_get_arch(md_stream)); + return libdnf5::utils::string::c_to_str(modulemd_module_stream_get_arch(p_impl->md_stream)); } @@ -104,9 +201,9 @@ std::string ModuleItem::get_name_stream(ModulemdModuleStream * md_stream) { std::string ModuleItem::get_name_stream_version() const { return fmt::format( "{}:{}:{}", - libdnf5::utils::string::c_to_str(modulemd_module_stream_get_module_name(md_stream)), - libdnf5::utils::string::c_to_str(modulemd_module_stream_get_stream_name(md_stream)), - std::to_string(modulemd_module_stream_get_version(md_stream))); + libdnf5::utils::string::c_to_str(modulemd_module_stream_get_module_name(p_impl->md_stream)), + libdnf5::utils::string::c_to_str(modulemd_module_stream_get_stream_name(p_impl->md_stream)), + std::to_string(modulemd_module_stream_get_version(p_impl->md_stream))); } @@ -119,11 +216,11 @@ std::string ModuleItem::get_name_stream_staticcontext() const { // } return fmt::format( "{}:{}:{}", - libdnf5::utils::string::c_to_str(modulemd_module_stream_get_module_name(md_stream)), - libdnf5::utils::string::c_to_str(modulemd_module_stream_get_stream_name(md_stream)), - computed_static_context.empty() - ? libdnf5::utils::string::c_to_str(modulemd_module_stream_get_context(md_stream)) - : computed_static_context); + libdnf5::utils::string::c_to_str(modulemd_module_stream_get_module_name(p_impl->md_stream)), + libdnf5::utils::string::c_to_str(modulemd_module_stream_get_stream_name(p_impl->md_stream)), + p_impl->computed_static_context.empty() + ? libdnf5::utils::string::c_to_str(modulemd_module_stream_get_context(p_impl->md_stream)) + : p_impl->computed_static_context); } @@ -131,36 +228,36 @@ std::string ModuleItem::get_name_stream_staticcontext_arch() const { return fmt::format( "{}:{}", get_name_stream_staticcontext(), - libdnf5::utils::string::c_to_str(modulemd_module_stream_get_arch(md_stream))); + libdnf5::utils::string::c_to_str(modulemd_module_stream_get_arch(p_impl->md_stream))); } std::string ModuleItem::get_full_identifier() const { return fmt::format( "{}:{}:{}:{}:{}", - libdnf5::utils::string::c_to_str(modulemd_module_stream_get_module_name(md_stream)), - libdnf5::utils::string::c_to_str(modulemd_module_stream_get_stream_name(md_stream)), - std::to_string(modulemd_module_stream_get_version(md_stream)), - libdnf5::utils::string::c_to_str(modulemd_module_stream_get_context(md_stream)), - libdnf5::utils::string::c_to_str(modulemd_module_stream_get_arch(md_stream))); + libdnf5::utils::string::c_to_str(modulemd_module_stream_get_module_name(p_impl->md_stream)), + libdnf5::utils::string::c_to_str(modulemd_module_stream_get_stream_name(p_impl->md_stream)), + std::to_string(modulemd_module_stream_get_version(p_impl->md_stream)), + libdnf5::utils::string::c_to_str(modulemd_module_stream_get_context(p_impl->md_stream)), + libdnf5::utils::string::c_to_str(modulemd_module_stream_get_arch(p_impl->md_stream))); } std::string ModuleItem::get_summary() const { return libdnf5::utils::string::c_to_str( - modulemd_module_stream_v2_get_summary((ModulemdModuleStreamV2 *)md_stream, NULL)); + modulemd_module_stream_v2_get_summary((ModulemdModuleStreamV2 *)p_impl->md_stream, NULL)); } std::string ModuleItem::get_description() const { return libdnf5::utils::string::c_to_str( - modulemd_module_stream_v2_get_description((ModulemdModuleStreamV2 *)md_stream, NULL)); + modulemd_module_stream_v2_get_description((ModulemdModuleStreamV2 *)p_impl->md_stream, NULL)); } std::vector ModuleItem::get_artifacts() const { std::vector result_rpms; - char ** rpms = modulemd_module_stream_v2_get_rpm_artifacts_as_strv((ModulemdModuleStreamV2 *)md_stream); + char ** rpms = modulemd_module_stream_v2_get_rpm_artifacts_as_strv((ModulemdModuleStreamV2 *)p_impl->md_stream); for (char ** iter = rpms; iter && *iter; iter++) { result_rpms.emplace_back(std::string(*iter)); @@ -173,7 +270,7 @@ std::vector ModuleItem::get_artifacts() const { std::vector ModuleItem::get_demodularized_rpms() const { std::vector result_rpms; - char ** rpms = modulemd_module_stream_v2_get_demodularized_rpms((ModulemdModuleStreamV2 *)md_stream); + char ** rpms = modulemd_module_stream_v2_get_demodularized_rpms((ModulemdModuleStreamV2 *)p_impl->md_stream); for (char ** iter = rpms; iter && *iter; iter++) { result_rpms.emplace_back(std::string(*iter)); @@ -186,8 +283,8 @@ std::vector ModuleItem::get_demodularized_rpms() const { std::vector ModuleItem::get_profiles_internal(const char * name) const { std::vector result_profiles; - GPtrArray * profiles = modulemd_module_stream_v2_search_profiles((ModulemdModuleStreamV2 *)md_stream, name); - const auto & default_profiles = module_sack->get_default_profiles(get_name(), get_stream()); + GPtrArray * profiles = modulemd_module_stream_v2_search_profiles((ModulemdModuleStreamV2 *)p_impl->md_stream, name); + const auto & default_profiles = p_impl->module_sack->get_default_profiles(get_name(), get_stream()); for (unsigned int i = 0; i < profiles->len; i++) { const auto & modulemd_profile = static_cast(g_ptr_array_index(profiles, i)); @@ -203,17 +300,17 @@ std::vector ModuleItem::get_profiles_internal(const char * name) std::vector ModuleItem::get_default_profiles() const { - return module_sack->get_default_profiles(get_name(), get_stream()); + return p_impl->module_sack->get_default_profiles(get_name(), get_stream()); } bool ModuleItem::is_default() const { - return module_sack->get_default_stream(get_name()) == get_stream(); + return p_impl->module_sack->get_default_stream(get_name()) == get_stream(); } bool ModuleItem::get_static_context() const { - return modulemd_module_stream_v2_is_static_context((ModulemdModuleStreamV2 *)md_stream); + return modulemd_module_stream_v2_is_static_context((ModulemdModuleStreamV2 *)p_impl->md_stream); } @@ -262,81 +359,40 @@ std::string ModuleItem::get_module_dependencies_string(ModulemdModuleStream * md ModuleItem::ModuleItem( _ModulemdModuleStream * md_stream, const ModuleSackWeakPtr & module_sack, const std::string & repo_id) - : md_stream(md_stream), - module_sack(module_sack), - repo_id(repo_id) { - if (md_stream != nullptr) { - g_object_ref(md_stream); - } -} + : p_impl(std::make_unique(md_stream, module_sack, repo_id)) {} +ModuleItem::~ModuleItem() = default; -ModuleItem::ModuleItem(const ModuleItem & mpkg) - : md_stream(mpkg.md_stream), - module_sack(mpkg.module_sack), - id(mpkg.id), - repo_id(mpkg.repo_id), - computed_static_context(mpkg.computed_static_context) { - if (md_stream != nullptr) { - g_object_ref(md_stream); - } -} - +ModuleItem::ModuleItem(const ModuleItem & mpkg) : p_impl(new Impl(*mpkg.p_impl)) {} +ModuleItem::ModuleItem(ModuleItem && mpkg) noexcept = default; ModuleItem & ModuleItem::operator=(const ModuleItem & mpkg) { if (this != &mpkg) { - if (md_stream != nullptr) { - g_object_unref(md_stream); - } - md_stream = mpkg.md_stream; - if (md_stream != nullptr) { - g_object_ref(md_stream); + if (p_impl) { + *p_impl = *mpkg.p_impl; + } else { + p_impl = std::make_unique(*mpkg.p_impl); } - module_sack = mpkg.module_sack; - id = mpkg.id; - repo_id = mpkg.repo_id; - computed_static_context = mpkg.computed_static_context; } + return *this; } +ModuleItem & ModuleItem::operator=(ModuleItem && mpkg) noexcept = default; - -ModuleItem::ModuleItem(ModuleItem && mpkg) - : md_stream(mpkg.md_stream), - module_sack(std::move(mpkg.module_sack)), - id(std::move(mpkg.id)), - repo_id(std::move(mpkg.repo_id)), - computed_static_context(std::move(mpkg.computed_static_context)) { - mpkg.md_stream = nullptr; +bool ModuleItem::operator==(const ModuleItem & rhs) const noexcept { + return p_impl->id.id == rhs.get_id().id; } - - -ModuleItem & ModuleItem::operator=(ModuleItem && mpkg) { - if (this != &mpkg) { - if (md_stream != nullptr) { - g_object_unref(md_stream); - } - md_stream = mpkg.md_stream; - mpkg.md_stream = nullptr; - module_sack = std::move(mpkg.module_sack); - id = std::move(mpkg.id); - repo_id = std::move(mpkg.repo_id); - computed_static_context = std::move(mpkg.computed_static_context); - } - return *this; +bool ModuleItem::operator!=(const ModuleItem & rhs) const noexcept { + return p_impl->id.id != rhs.get_id().id; } - - -ModuleItem::~ModuleItem() { - if (md_stream != nullptr) { - g_object_unref(md_stream); - } +bool ModuleItem::operator<(const ModuleItem & rhs) const noexcept { + return p_impl->id.id < rhs.get_id().id; } std::string ModuleItem::get_yaml() const { ModulemdModuleIndex * i = modulemd_module_index_new(); - modulemd_module_index_add_module_stream(i, md_stream, NULL); + modulemd_module_index_add_module_stream(i, p_impl->md_stream, NULL); gchar * cStrYaml = modulemd_module_index_dump_to_string(i, NULL); std::string yaml = std::string(cStrYaml); g_free(cStrYaml); @@ -379,15 +435,16 @@ static void create_solvable_worker( void ModuleItem::create_solvable() { - auto pool = module_sack->p_impl->pool; + auto pool = p_impl->module_sack->p_impl->pool; // Create new solvable and store its id - id = ModuleItemId(repo_add_solvable(pool_id2repo(pool, Id(module_sack->p_impl->repositories[repo_id])))); - auto solvable = pool_id2solvable(pool, id.id); - auto context = computed_static_context.empty() - ? libdnf5::utils::string::c_to_str(modulemd_module_stream_get_context(md_stream)) - : computed_static_context; - auto arch = modulemd_module_stream_get_arch(md_stream); + p_impl->id = ModuleItemId( + repo_add_solvable(pool_id2repo(pool, Id(p_impl->module_sack->p_impl->repositories[p_impl->repo_id])))); + auto solvable = pool_id2solvable(pool, p_impl->id.id); + auto context = p_impl->computed_static_context.empty() + ? libdnf5::utils::string::c_to_str(modulemd_module_stream_get_context(p_impl->md_stream)) + : p_impl->computed_static_context; + auto arch = modulemd_module_stream_get_arch(p_impl->md_stream); create_solvable_worker(pool, solvable, get_name(), get_stream(), get_version_str(), std::move(context), arch); } @@ -406,8 +463,8 @@ void ModuleItem::create_platform_solvable( void ModuleItem::create_dependencies() const { - Pool * pool = module_sack->p_impl->pool; - Solvable * solvable = pool_id2solvable(pool, id.id); + Pool * pool = p_impl->module_sack->p_impl->pool; + Solvable * solvable = pool_id2solvable(pool, p_impl->id.id); std::string req_formatted; for (const auto & dependency : get_module_dependencies()) { @@ -444,29 +501,66 @@ void ModuleItem::create_dependencies() const { void ModuleItem::create_solvable_and_dependencies() { - module_sack->p_impl->provides_ready = false; - module_sack->p_impl->considered_uptodate = false; + p_impl->module_sack->p_impl->provides_ready = false; + p_impl->module_sack->p_impl->considered_uptodate = false; create_solvable(); create_dependencies(); } bool ModuleItem::is_active() const { - if (!module_sack->active_modules_resolved) { - module_sack->resolve_active_module_items(); + if (!p_impl->module_sack->active_modules_resolved) { + p_impl->module_sack->resolve_active_module_items(); } - return module_sack->p_impl->active_modules.contains(id.id); + return p_impl->module_sack->p_impl->active_modules.contains(p_impl->id.id); } ModuleStatus ModuleItem::get_status() const { - const ModuleStatus & module_status = module_sack->p_impl->module_db->get_status(get_name()); + const ModuleStatus & module_status = p_impl->module_sack->p_impl->module_db->get_status(get_name()); if (module_status == ModuleStatus::ENABLED && - get_stream() != module_sack->p_impl->module_db->get_enabled_stream(get_name())) { + get_stream() != p_impl->module_sack->p_impl->module_db->get_enabled_stream(get_name())) { return ModuleStatus::AVAILABLE; } return module_status; } +void ModuleItem::set_computed_static_context(const std::string & context) { + p_impl->computed_static_context = context; +} + +const std::string & ModuleItem::get_repo_id() const { + return p_impl->repo_id; +}; +ModuleItemId ModuleItem::get_id() const { + return p_impl->id; +}; +libdnf5::module::ModuleSackWeakPtr ModuleItem::get_module_sack() const { + return p_impl->module_sack; +} + +std::vector ModuleItem::get_profiles(const std::string & name) const { + return get_profiles_internal(name.c_str()); +} + + +std::vector ModuleItem::get_profiles() const { + return get_profiles_internal(nullptr); +} + + +std::vector ModuleItem::get_module_dependencies(bool remove_platform) const { + return get_module_dependencies(p_impl->md_stream, remove_platform); +} + + +std::string ModuleItem::get_module_dependencies_string(bool remove_platform) const { + return get_module_dependencies_string(p_impl->md_stream, remove_platform); +} + + +std::string ModuleItem::get_name_stream() const { + return get_name_stream(p_impl->md_stream); +} } // namespace libdnf5::module diff --git a/libdnf5/module/module_query.cpp b/libdnf5/module/module_query.cpp index 8c6bac38b..5eb4e5bc6 100644 --- a/libdnf5/module/module_query.cpp +++ b/libdnf5/module/module_query.cpp @@ -103,9 +103,9 @@ void ModuleQuery::filter_arch(const std::vector & patterns, libdnf5 bool ModuleQuery::latest_cmp(const ModuleItem * module_item_1, const ModuleItem * module_item_2) { - Pool * pool = module_item_1->module_sack->p_impl->pool; - const Solvable * s1 = pool_id2solvable(pool, module_item_1->id.id); - const Solvable * s2 = pool_id2solvable(pool, module_item_2->id.id); + Pool * pool = module_item_1->get_module_sack()->p_impl->pool; + const Solvable * s1 = pool_id2solvable(pool, module_item_1->get_id().id); + const Solvable * s2 = pool_id2solvable(pool, module_item_2->get_id().id); if (s1->name != s2->name) { return s1->name < s2->name; } diff --git a/libdnf5/module/module_sack.cpp b/libdnf5/module/module_sack.cpp index 2176a2944..e4cf963c7 100644 --- a/libdnf5/module/module_sack.cpp +++ b/libdnf5/module/module_sack.cpp @@ -137,7 +137,7 @@ void ModuleSack::Impl::add_modules_without_static_context() { if (stream_iterator != static_context_map.end()) { auto context_iterator = stream_iterator->second.find(requires_string); if (context_iterator != stream_iterator->second.end()) { - module_item->computed_static_context = context_iterator->second[0]->get_context(); + module_item->set_computed_static_context(context_iterator->second[0]->get_context()); module_item->create_solvable_and_dependencies(); modules.push_back(std::move(module_item)); continue; @@ -149,7 +149,7 @@ void ModuleSack::Impl::add_modules_without_static_context() { if (requires_string.empty()) { requires_string.append("NoRequires"); } - module_item->computed_static_context = requires_string; + module_item->set_computed_static_context(requires_string); module_item->create_solvable_and_dependencies(); modules.push_back(std::move(module_item)); } @@ -399,7 +399,7 @@ void ModuleSack::Impl::set_active_modules(ModuleGoalPrivate & goal) { for (const auto & module_item : modules) { std::string solvable_name = module_item->get_name_stream_staticcontext(); if (solvable_names.contains(solvable_name)) { - active_modules[module_item->id.id] = module_item.get(); + active_modules[module_item->get_id().id] = module_item.get(); } } } @@ -737,7 +737,7 @@ ModuleSack::resolve_active_module_items() { const auto & module_name = module_item->get_name(); status = p_impl->module_db->get_status(module_name); if (status == ModuleStatus::DISABLED) { - p_impl->excludes->add(module_item->id.id); + p_impl->excludes->add(module_item->get_id().id); } else if ( status == ModuleStatus::ENABLED && p_impl->module_db->get_enabled_stream(module_name) == module_item->get_stream()) {