/
var
/
opt
/
nydus
/
ops
/
customer_local_ops
/
operating_system
/
__pycache__
/
up file
home
� =�j� � �� � d dl mZmZmZ d dlZd dlmZ d dlmZ d dl m Z d dlmZ d dl mZmZ dgZ G d � d � Z G d� de� Z G d � de� Z G d� de� Z G d� de� Zy)� )�Dict�List�OptionalN)�rmtree)�Path)� read_text)�create_file)� runCommand�RunCommandResult�61EE28720129F5F3c �R � e Zd ZdZdeeeef fd�Zdd�dededefd�Z defd�Z y) �PackageManagerN�returnc � � y)z{Environment variables to send to subprocess. This version copies the environment from the parent process. N� ��selfs �d/opt/nydus/tmp/pip-target-hb7welcc/lib/python/customer_local_ops/operating_system/package_manager.py�_envzPackageManager._env s � � � ��tag�packagesr c � � |st d� �| j t |� z }|�dt |� z }t ||| j � �� S )z�Install one or more packages. :param *pkg_spec: one or more specifications of packages to install :param tag: optional identifier included in logs :returns: result of installation command as (exit_code, stdout, stderr) z At least one package is requiredz install %s��env)� ValueError�INSTALL_ARGS�list�strr r )r r r �cmds r �installzPackageManager.install sO � � ��?�@�@����$�x�.�0���;���X��.�C��#�s�� � ��4�4r c � � y)z�Update local package indices from remote sources. Not all package managers need this, so this version does nothing and returns a fake success result. :returns: result of update command as (exit_code, stdout, stderr) )r � r$ r r s r �update_indiceszPackageManager.update_indices+ s � � r )�__name__� __module__�__qualname__r r r r r r r"