22.16.146. salt.modules.portage_config

Configure portage(5)

salt.modules.portage_config.append_to_package_conf(conf, atom='', flags=None, string='', overwrite=False)

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']"
salt.modules.portage_config.append_use_flags(atom, uses=None, overwrite=False)

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']"
salt.modules.portage_config.enforce_nice_config()

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
salt.modules.portage_config.get_flags_from_package_conf(conf, atom)

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
salt.modules.portage_config.get_missing_flags(conf, atom, 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']"
salt.modules.portage_config.has_flag(conf, atom, flag)

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
salt.modules.portage_config.has_use(atom, use)

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
salt.modules.portage_config.is_present(conf, atom)

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

Docs for previous releases are available on salt.rtfd.org.

Latest Salt release: 2014.1.13

Try the shiny new release candidate of Salt, v2014.7.0rc6! More info here.

Previous topic

22.16.145. salt.modules.pkgutil

Next topic

22.16.147. salt.modules.postfix

SaltStack News

Upcoming SaltStack events, webinars and local meet ups and user groups.