%PDF- %PDF-
Direktori : /lib/python3/dist-packages/uaclient/cli/__pycache__/ |
Current File : //lib/python3/dist-packages/uaclient/cli/__pycache__/fix.cpython-312.pyc |
� �(�f�r � �� � d dl Z d dlZd dlmZmZmZmZmZmZm Z d dl mZmZm Z mZmZ d dlmZmZ d dlmZ d dlmZmZ d dlmZmZ d dlmZmZmZmZ d d l m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4 d d l5m6Z6 d dl5m7Z8 d dl9m:Z: d dl9m7Z; d d l<m=Z=m>Z> d dl?m@Z@mAZAmBZB d dlCmDZD d dlEmFZF d dlGmHZHmIZImJZJ d dlKmLZL d dlMmNZN d dlOmPZP d dlQmRZRmSZSmTZT d dlUmVZV d dlWmXZX d dlYmZZZ d dl[m\Z\ G d� d� Z]de+fd�Z^de-fd�Z_d e`d!ead"eLfd#�Zbd e`d!ead$ead"eLfd%�Zc dSd&ee` d'e`d(edd)edd*ee` d+e`fd,�Zed"eLd-e`d+eafd.�ZfdTd/�Zgd"eLfd0�Zhd"eLd+eafd1�Zid2ee` d+e`fd3�Zjd"eLd!ead+eafd4�Zkd"eLd+eafd5�Zld"eLd6e`d+eafd7�Zmd6e`d"eLd!ead+eafd8�Zn dUd'ed9e`d:e`fd;�Zod<e`fd=�Zpd>e]d?e0fd@�Zqd>e]d?e1fdA�Zrd>e]d?e/fdB�Zsd>e]d?e$fdC�Ztd>e]d?e%fdD�Zud>e]d?e&fdE�Zvd>e]d?e*fdF�Zwd>e]d?e(fdG�Zxd>e]d?e'fdH�Zyde+d!ead"eLd+eeee f fdI�ZzdJ� Z{ eBdKe j� e j� e{eFj� eA e@d e j� �L� e@dMe �j dN�O� e@dPe �j dN�O� g�Q� g�R� Z�y)V� N)�Dict�List� NamedTuple�Optional�Set�Tuple�Union)�apt� exceptions�messages�system�util)�attach_with_token�enable_entitlement_by_name)� _initiate)�MagicAttachRevokeOptions�_revoke)�MagicAttachWaitOptions�_wait)�CVE_OR_USN_REGEX� FixStatus�UnfixedPackage�status_message)�ESM_APPS_POCKET�ESM_INFRA_POCKET�STANDARD_UPDATES_POCKET�FixPlanAptUpgradeStep�FixPlanAttachStep�FixPlanEnableStep�FixPlanNoOpAlreadyFixedStep�FixPlanNoOpLivepatchFixStep�FixPlanNoOpStatus�FixPlanNoOpStep� FixPlanResult�FixPlanStep�FixPlanUSNResult�FixPlanWarning�"FixPlanWarningFailUpdatingESMCache�&FixPlanWarningPackageCannotBeInstalled�#FixPlanWarningSecurityIssueNotFixed�NoOpAlreadyFixedData�NoOpLivepatchFixData�USNAdditionalData)�CVEFixPlanOptions)�_plan)�USNFixPlanOptions)�ContractExpiryStatus�_is_attached)�ProArgument�ProArgumentGroup� ProCommand)� action_detach)�HelpCategory)�CLOUD_TYPE_TO_TITLE�PRO_CLOUD_URLS�get_cloud_type)�UAConfig)�PRINT_WRAP_WIDTH)�entitlement_factory)�ApplicabilityStatus�CanEnableFailure�UserFacingStatus)�notices)�Notice)� PRO_HOME_PAGE)�colorize_commandsc �j � e Zd Zdededee defd�Zd� Z ddee d ed e e fd�Z dee d efd�Zy)� FixContext�title�dry_run� affected_pkgs�cfgc �� � d| _ g | _ t � | _ t j | _ || _ || _ || _ || _ d| _ d| _ d| _ y )Nr TF)� pkg_index�unfixed_pkgs�set�installed_pkgsr �SYSTEM_NON_VULNERABLE� fix_statusrG rI rH rJ �should_print_pkg_header� warn_package_cannot_be_installed�fixed_by_livepatch)�selfrG rH rI rJ s �2/usr/lib/python3/dist-packages/uaclient/cli/fix.py�__init__zFixContext.__init__S s_ � � ������!�e���#�9�9����� �*���������'+��$�05��-�"'��� c �Z � | j r�t j j t | j � � j t | j � dj t | j � � �� }t t j |t dd�� � y y )N�, )�count�pkgs� F)�width�subsequent_indent�replace_whitespace)rI r �SECURITY_AFFECTED_PKGS� pluralize�len�format�join�sorted�print�textwrap�fillr<