cmaize.package_managers/get_package_manager

cmaize.package_managers/get_package_manager.get_package_manager_instance(_gpmi_result _gpmi_type)

Gets an existing instance or creates a new instance of a PackageManager object. This function should be used to ensure that only one instance of each PackageManager subclass can exist at a time.

Parameters:
  • _gpmi_result (PackageManager*) – Return variable for PackageManager instance

  • _gpmi_type (desc) – Package manager type to instantiate. Valid types can be found in the CMAIZE_SUPPORTED_PACKAGE_MANAGERS variable. This value is case-insensitive.

Returns:

PackageManager instance

cmaize.package_managers/get_package_manager.register_package_manager(_rpm_name _rpm_instance)

Stores a package manager instance to be retrieved by the get_package_manager_instance() function.