File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/pkg_resource.cpython-310.pyc
Back
o ;j@1 � @ s� d Z ddlZddlZddlZddlZddlZddlZddlZddl Zddl mZ e�e �ZdZd dd�Zd dd �Z d!dd�Zd d� Zdd� Zdd� Zdd� Zdd� Zd"dd�Zdd� Zdd� Zdd� ZdS )#z# Resources needed by pkg providers � N)�SaltInvocationError)�x86_64ZnoarchTc s` |rdt v rt d � ndd� � � fdd�tjj�| ��� D �}t| �t|�kr.td�| ���|S )zd Repack packages specified using "pkgs" argument to pkg states into a single dictionary �pkg.normalize_namec S � | S �N� ��pkgnamer r �M/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/pkg_resource.py�_normalize_name � z%_repack_pkgs.<locals>._normalize_namec s. i | ]\}}� t |��|d urt |�n|�qS r )�str)�.0�x�y�r r r � <dictcomp> s ��z _repack_pkgs.<locals>.<dictcomp>z�You are passing a list of packages that contains duplicated packages names: {}. This cannot be processed. In case you are targeting different versions of the same package, please target them individually) �__salt__�salt�utils�dataZrepack_dictlist�items�lenr �format)�pkgs� normalizeZ repacked_pkgsr r r �_repack_pkgs s ���r c C s� |rdt v rt d }ndd� }t| t�r;z tjj�| �} W n tjjjjy: } z t � |� i W Y d}~S d}~ww i }| D ]-}t|t�rLt|�dkr^t � dt �| �� t � d� i S tt|��}|| |||�<