def upgrade(refresh=False, root=None, **kwargs):
    ret = {'changes': {},
           'result': True,
           'comment': ''}

    old = list_pkgs()
    cmd = ['pacman', '-Su', '--noprogressbar', '--noconfirm']

    if salt.utils.is_true(refresh):
        cmd.append('-y')

    if root is not None:
        cmd.extend(('-r', root))

    call = __salt__['cmd.run_all'](cmd,
                                   output_loglevel='trace',
                                   python_shell=False,
                                   redirect_stderr=True)

    if call['retcode'] != 0:
        ret['result'] = False
        if call['stdout']:
            ret['comment'] = call['stdout']

    __context__.pop('pkg.list_pkgs', None)
    new = list_pkgs()
    ret['changes'] = salt.utils.compare_dicts(old, new)

    return ret
Adds an IP address or subnet or IPRange to this IP set. Has no effect if
dataset/ETHPy150Open saltstack/salt/salt/modules/pacman.py/upgrade--crossover with--dataset/ETHPy150Open drkjam/netaddr/netaddr/ip/sets.py/IPSet.add