File: //lib/python3/dist-packages/uaclient/__pycache__/upgrade_lts_contract.cpython-312.pyc
�
wc�h� � �� � d Z ddlZddlZddlmZmZmZmZmZ ddl m
Z
ddlmZ ddl
mZ ddlmZmZ ddlmZmZ d d
ddd
ddd�Z ej, ej. e� � Zdeddfd�Zd� Zy)a�
This function is called from lib/upgrade_lts_contract.py and from
lib/reboot_cmds.py
This function should be used after running do-release-upgrade in a machine.
It will detect any contract deltas between the release before
do-release-upgrade and the current release. If we find any differences in
the uaclient contract between those releases, we will apply that difference
in the upgraded release.
For example, suppose we are on Trusty and we are upgrading to Xenial. We found
that the apt url for esm services on trusty:
https://esm.ubuntu.com/ubuntu
While on Xenial, the apt url is:
https://esm.ubuntu.com/infra/ubuntu
This script will detect differences like that and update the Xenial system
to reflect them.
� N)�defaults�
exceptions�messages�system�util)�ProgressWrapper)�_is_attached)�UAConfig)�entitlement_factory�entitlements_enable_order)�ApplicabilityStatus�ApplicationStatus�trusty�xenial�bionic�focal�jammy�noble�plucky)r r r r r r �questing�cfg�returnc � � t j d� t | � j st j d� y t j d� t t
j � t t
j � t dd� 5 }t j |j � t j � d d d � t | � D ]� } t | |d�� }j# � \ }}|j% � \ }}|t&