Module Expr Str ImportFrom alias Import alias Import alias ImportFrom alias alias Import alias identifier Assign NameStore Str FunctionDef arguments args defaults body Expr Str If CompareEq SubscriptLoad NameLoad Index Str Str body Return NameLoad Return TupleLoad NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Str Return CompareEq Call SubscriptLoad NameLoad Index Str Str Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad If NameLoad body Assign NameStore Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Index Num attr If NameLoad body If CompareEq NameLoad Str body Return Str orelse Return NameLoad Return Str decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call NameLoad Assign NameStore Dict Assign NameStore Call AttributeLoad Call SubscriptLoad NameLoad Index Str Str attr For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str If CompareEq SubscriptLoad NameLoad Index Num Str body Continue If CompareEq SubscriptLoad NameLoad Index Num Str body Continue Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Return NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call NameLoad Assign NameStore Call NameLoad Assign NameStore Str Expr Call SubscriptLoad NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad kwarg body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Str body Return Dict If CompareIn Str NameLoad body If NameLoad body Return SubscriptLoad NameLoad Index Str orelse Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Expr Call SubscriptLoad NameLoad Index Str NameLoad Return NameLoad Assign NameStore Dict Assign NameStore Str Assign NameStore Call AttributeLoad Call SubscriptLoad NameLoad Index Str NameLoad attr For TupleStore NameStore NameStore Call NameLoad NameLoad body If CompareEq BinOpMod NameLoad Num Num body Assign NameStore Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Index Num attr If CompareEq BinOpMod NameLoad Num Num body Assign NameStore Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Index Num attr Expr Call SubscriptLoad NameLoad Index Str NameLoad NameLoad NameLoad Expr Call SubscriptLoad NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Expr Call SubscriptLoad NameLoad Index Str NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults vararg kwarg body Expr Str Return Call SubscriptLoad NameLoad Index Str NameLoad NameLoad decorator_list FunctionDef arguments args defaults vararg kwarg body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Str NameLoad If UnaryOpNot NameLoad body Return Str Assign NameStore Dict For NameStore NameLoad body Assign SubscriptStore NameLoad Index NameLoad Str If NameLoad body Expr Call NameLoad Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad Str attr Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad Call SubscriptLoad NameLoad Index Str NameLoad attr Str Str attr For NameStore NameLoad body TryExcept body Assign TupleStore NameStore NameStore SubscriptLoad Call AttributeLoad NameLoad attr Slice Num Num handlers ExceptHandler type NameLoad body Continue If CompareIn NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num If BoolOpOr UnaryOpNot NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword Str keyword NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad If CompareEq Call NameLoad NameLoad Num body Return SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index Num Return NameLoad decorator_list Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad kwarg body Expr Str If NameLoad body Expr Call NameLoad TryExcept body Assign NameStore SubscriptLoad Call SubscriptLoad NameLoad Index Str NameLoad NameLoad NameLoad Index Num handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad NameLoad If BoolOpOr CompareIs NameLoad NameLoad CompareEq Call NameLoad NameLoad Num body Return Dict If BoolOpAnd CompareIs NameLoad NameLoad NameLoad CompareEq Call NameLoad NameLoad Num body Assign NameStore Dict NameLoad NameLoad Assign NameStore ListLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad Expr Call SubscriptLoad NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad kwarg body Expr Str TryExcept body Assign NameStore SubscriptLoad Call SubscriptLoad NameLoad Index Str NameLoad NameLoad Index Num handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad NameLoad Assign NameStore Call NameLoad Assign NameStore ListComp NameLoad comprehension NameStore NameLoad CompareIn NameLoad NameLoad If UnaryOpNot NameLoad body Return Dict Assign NameStore Call AttributeLoad Str attr Call AttributeLoad Str attr NameLoad Expr Call SubscriptLoad NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad kwarg body Expr Str Return Call NameLoad keyword NameLoad keyword NameLoad decorator_list
N/A N/A 
Pkgutil support for Solaris

.. important::
    If you feel that Salt should be using this module to manage packages on a
    minion, and it is using a different module (or gives an error similar to
    *'pkg.install' is not available*), see :ref:`here
    <module-provider-override>`.
 __future__ absolute_import N/A copy N/A salt.utils salt.exceptions CommandExecutionError MinionError N/A salt.ext.six six N/A __virtualname__ pkgutil __virtual__ N/A N/A N/A N/A N/A 
    Set the virtual pkg module if the os is Solaris
     N/A N/A N/A __grains__ N/A os Solaris N/A N/A __virtualname__ N/A N/A False The pkgutil execution module cannot be loaded: only available on Solaris systems. N/A refresh_db N/A N/A N/A N/A N/A 
    Updates the pkgutil repo database (pkgutil -U)

    CLI Example:

    .. code-block:: bash

        salt '*' pkgutil.refresh_db
     N/A N/A N/A N/A __salt__ N/A cmd.retcode /opt/csw/bin/pkgutil -U 0 N/A upgrade_available N/A N/A name N/A N/A N/A 
    Check if there is an upgrade available for a certain package

    CLI Example:

    .. code-block:: bash

        salt '*' pkgutil.upgrade_available CSWpython
     N/A version_num None N/A cmd N/A N/A /opt/csw/bin/pkgutil -c --parse --single {0} format name N/A out N/A N/A __salt__ N/A cmd.run_stdout cmd N/A out N/A N/A version_num N/A N/A N/A N/A N/A out split N/A 2 strip N/A version_num N/A N/A N/A version_num SAME N/A N/A N/A N/A version_num N/A N/A list_upgrades N/A N/A refresh N/A True N/A N/A 
    List all available package upgrades on this system

    CLI Example:

    .. code-block:: bash

        salt '*' pkgutil.list_upgrades
     N/A N/A N/A N/A salt utils is_true refresh N/A N/A N/A refresh_db N/A upgrades N/A N/A lines N/A N/A N/A N/A __salt__ N/A cmd.run_stdout /opt/csw/bin/pkgutil -A --parse splitlines N/A line lines N/A N/A comps N/A N/A line split N/A N/A N/A comps N/A 2 SAME N/A N/A N/A N/A N/A comps N/A 2 not installed N/A N/A N/A N/A upgrades N/A N/A comps N/A 0 N/A comps N/A 1 N/A upgrades N/A upgrade N/A N/A refresh N/A True N/A N/A 
    Upgrade all of the packages to the latest available version.

    Returns a dict containing the changes::

        {'<package>': {'old': '<old-version>',
                       'new': '<new-version>'}}

    CLI Example:

    .. code-block:: bash

        salt '*' pkgutil.upgrade
     N/A N/A N/A N/A salt utils is_true refresh N/A N/A N/A refresh_db N/A old N/A list_pkgs N/A cmd /opt/csw/bin/pkgutil -yu N/A N/A N/A __salt__ N/A cmd.run_all cmd N/A N/A N/A __context__ pop pkg.list_pkgs None N/A new N/A list_pkgs N/A N/A N/A N/A salt utils compare_dicts old new N/A list_pkgs N/A N/A versions_as_list N/A False kwargs N/A N/A 
    List the packages currently installed as a dict::

        {'<package_name>': '<version>'}

    CLI Example:

    .. code-block:: bash

        salt '*' pkg.list_pkgs
        salt '*' pkg.list_pkgs versions_as_list=True
     N/A versions_as_list N/A N/A N/A salt utils is_true versions_as_list N/A N/A N/A N/A salt utils is_true N/A N/A kwargs get removed N/A N/A N/A N/A N/A pkg.list_pkgs __context__ N/A N/A versions_as_list N/A N/A N/A __context__ N/A pkg.list_pkgs N/A N/A ret N/A N/A copy deepcopy N/A __context__ N/A pkg.list_pkgs N/A N/A N/A __salt__ N/A pkg_resource.stringify ret N/A ret N/A ret N/A N/A cmd /usr/bin/pkginfo -x N/A lines N/A N/A N/A N/A __salt__ N/A cmd.run cmd splitlines N/A N/A index line N/A enumerate lines N/A N/A N/A N/A index 2 0 N/A N/A name N/A N/A N/A N/A N/A line split N/A 0 strip N/A N/A N/A index 2 1 N/A N/A version_num N/A N/A N/A N/A N/A line split N/A 1 strip N/A N/A N/A __salt__ N/A pkg_resource.add_pkg ret name version_num N/A N/A N/A __salt__ N/A pkg_resource.sort_pkglist ret N/A N/A __context__ N/A pkg.list_pkgs N/A N/A copy deepcopy ret N/A N/A versions_as_list N/A N/A N/A N/A __salt__ N/A pkg_resource.stringify ret N/A ret N/A version N/A N/A N/A names kwargs N/A N/A 
    Returns a version if the package is installed, else returns an empty string

    CLI Example:

    .. code-block:: bash

        salt '*' pkgutil.version CSWpython
     N/A N/A N/A __salt__ N/A pkg_resource.version names kwargs N/A latest_version N/A N/A N/A names kwargs N/A N/A 
    Return the latest version of the named package available for upgrade or
    installation. If more than one package name is specified, a dict of
    name/version pairs is returned.

    If the latest version of a given package is already installed, an empty
    string will be returned for that package.

    CLI Example:

    .. code-block:: bash

        salt '*' pkgutil.latest_version CSWpython
        salt '*' pkgutil.latest_version <package1> <package2> <package3> ...
     N/A refresh N/A N/A N/A salt utils is_true N/A N/A kwargs pop refresh True N/A N/A names N/A N/A N/A ret N/A N/A name names N/A N/A N/A ret N/A name N/A refresh N/A N/A N/A refresh_db N/A pkgs N/A list_pkgs N/A cmd N/A N/A /opt/csw/bin/pkgutil -a --parse {0} format N/A N/A join names N/A output N/A N/A N/A N/A N/A N/A __salt__ N/A cmd.run_all cmd get stdout splitlines N/A line output N/A N/A N/A N/A N/A name version_rev N/A N/A N/A line split N/A 1 3 N/A N/A N/A ValueError N/A N/A N/A N/A name names N/A N/A cver N/A N/A pkgs get name N/A nver N/A N/A N/A version_rev split , N/A 0 N/A N/A N/A cver N/A N/A N/A salt utils compare_versions ver1 cver oper < ver2 nver N/A N/A N/A ret N/A name version_rev N/A N/A N/A len names 1 N/A N/A N/A ret N/A N/A names N/A 0 N/A ret N/A N/A available_version N/A N/A N/A salt utils alias_function latest_version available_version install N/A N/A name refresh version pkgs N/A None False None None kwargs N/A N/A 
    Install packages using the pkgutil tool.

    CLI Example:

    .. code-block:: bash

        salt '*' pkg.install <package_name>
        salt '*' pkg.install SMClgcc346


    Multiple Package Installation Options:

    pkgs
        A list of packages to install from OpenCSW. Must be passed as a python
        list.

        CLI Example:

        .. code-block:: bash

            salt '*' pkg.install pkgs='["foo", "bar"]'
            salt '*' pkg.install pkgs='["foo", {"bar": "1.2.3"}]'


    Returns a dict containing the new package names and versions::

        {'<package>': {'old': '<old-version>',
                       'new': '<new-version>'}}
     N/A refresh N/A N/A N/A refresh_db N/A N/A N/A pkg_params N/A N/A N/A __salt__ N/A pkg_resource.parse_targets name pkgs kwargs N/A 0 N/A N/A N/A MinionError N/A exc N/A N/A N/A CommandExecutionError exc N/A N/A N/A pkg_params None N/A N/A len pkg_params 0 N/A N/A N/A N/A N/A N/A pkgs None version N/A N/A len pkg_params 1 N/A N/A pkg_params N/A name version N/A targets N/A N/A N/A param pkgver N/A N/A six iteritems pkg_params N/A N/A N/A pkgver None N/A N/A N/A N/A targets append param N/A N/A N/A N/A targets append N/A N/A {0}-{1} format param pkgver N/A cmd N/A N/A /opt/csw/bin/pkgutil -yu {0} format N/A N/A join targets N/A old N/A list_pkgs N/A N/A N/A __salt__ N/A cmd.run_all cmd N/A N/A N/A __context__ pop pkg.list_pkgs None N/A new N/A list_pkgs N/A N/A N/A N/A salt utils compare_dicts old new N/A remove N/A N/A name pkgs N/A None None kwargs N/A N/A 
    Remove a package and all its dependencies which are not in use by other
    packages.

    name
        The name of the package to be deleted.


    Multiple Package Options:

    pkgs
        A list of packages to delete. Must be passed as a python list. The
        ``name`` parameter will be ignored if this option is passed.

    .. versionadded:: 0.16.0


    Returns a dict containing the changes.

    CLI Example:

    .. code-block:: bash

        salt '*' pkg.remove <package name>
        salt '*' pkg.remove <package1>,<package2>,<package3>
        salt '*' pkg.remove pkgs='["foo", "bar"]'
     N/A N/A N/A pkg_params N/A N/A N/A __salt__ N/A pkg_resource.parse_targets name pkgs N/A 0 N/A N/A N/A MinionError N/A exc N/A N/A N/A CommandExecutionError exc N/A old N/A list_pkgs N/A targets N/A x N/A x pkg_params N/A x old N/A N/A targets N/A N/A N/A N/A cmd N/A N/A /opt/csw/bin/pkgutil -yr {0} format N/A N/A join targets N/A N/A N/A __salt__ N/A cmd.run_all cmd N/A N/A N/A __context__ pop pkg.list_pkgs None N/A new N/A list_pkgs N/A N/A N/A N/A salt utils compare_dicts old new N/A purge N/A N/A name pkgs N/A None None kwargs N/A N/A 
    Package purges are not supported, this function is identical to
    ``remove()``.

    name
        The name of the package to be deleted.


    Multiple Package Options:

    pkgs
        A list of packages to delete. Must be passed as a python list. The
        ``name`` parameter will be ignored if this option is passed.

    .. versionadded:: 0.16.0


    Returns a dict containing the changes.

    CLI Example:

    .. code-block:: bash

        salt '*' pkg.purge <package name>
        salt '*' pkg.purge <package1>,<package2>,<package3>
        salt '*' pkg.purge pkgs='["foo", "bar"]'
     N/A N/A remove name name pkgs pkgs N/A