Configure portage(5)
Append a string or a list of flags for a given package or DEPEND atom to a given configuration file.
CLI Example:
salt '*' portage_config.append_to_package_conf use string="app-admin/salt ldap -libvirt"
salt '*' portage_config.append_to_package_conf use atom="> = app-admin/salt-0.14.1" flags="['ldap', '-libvirt']"
Append a list of use flags for a given package or DEPEND atom
CLI Example:
salt '*' portage_config.append_use_flags "app-admin/salt[ldap, -libvirt]"
salt '*' portage_config.append_use_flags ">=app-admin/salt-0.14.1" "['ldap', '-libvirt']"
Enforce a nice tree structure for /etc/portage/package.* configuration files.
See also
salt.modules.ebuild.ex_mod_init()
for information on automatically running this when pkg is used.
CLI Example:
salt '*' portage_config.enforce_nice_config
New in version 2015.8.0.
Filter function to remove hidden or otherwise not normally visible USE flags from a list.
@type use: list @param use: the USE flag list to be filtered. @type use_expand_hidden: list @param use_expand_hidden: list of flags hidden. @type usemasked: list @param usemasked: list of masked USE flags. @type useforced: list @param useforced: the forced USE flags. @rtype: list @return the filtered USE flags.
New in version 2015.8.0.
Uses portage to determine final USE flags and settings for an emerge.
@type cp: string @param cp: eg cat/pkg @rtype: lists @return use, use_expand_hidden, usemask, useforce
New in version 2015.8.0.
Uses portage for compare use flags which is used for installing package and use flags which now exist int /etc/portage/package.use/
@type cp: string @param cp: eg cat/pkg @rtype: tuple @rparam: tuple with two lists - list of used flags and list of flags which will be used
Get flags for a given package or DEPEND atom. Warning: This only works if the configuration files tree is in the correct format (the one enforced by enforce_nice_config)
CLI Example:
salt '*' portage_config.get_flags_from_package_conf license salt
New in version 2015.8.0.
Gets the installed USE flags from the VARDB.
@type: cp: string @param cp: cat/pkg @type use: string @param use: 1 of ["USE", "PKGUSE"] @rtype list @returns [] or the list of IUSE flags
New in version 2015.8.0.
Gets the current IUSE flags from the tree.
@type: cpv: string @param cpv: cat/pkg @rtype list @returns [] or the list of IUSE flags
Find out which of the given flags are currently not set.
CLI Example:
salt '*' portage_config.get_missing_flags use salt "['ldap', '-libvirt', 'openssl']"
Verify if the given package or DEPEND atom has the given flag. Warning: This only works if the configuration files tree is in the correct format (the one enforced by enforce_nice_config)
CLI Example:
salt '*' portage_config.has_flag license salt Apache-2.0
Verify if the given package or DEPEND atom has the given use flag. Warning: This only works if the configuration files tree is in the correct format (the one enforced by enforce_nice_config)
CLI Example:
salt '*' portage_config.has_use salt libvirt
New in version 2015.8.0.
Uses portage for determine if the use flags of installed package is compatible with use flags in portage configs.
@type cp: string @param cp: eg cat/pkg
Tell if a given package or DEPEND atom is present in the configuration files tree. Warning: This only works if the configuration files tree is in the correct format (the one enforced by enforce_nice_config)
CLI Example:
salt '*' portage_config.is_present unmask salt