%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/DistUpgrade/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/DistUpgrade/__pycache__/DistUpgradeViewText.cpython-312.pyc

�

>I�c2���ddlZddlZddlZddlZddlmZddlZddlZddlm	Z	m
Z
ddlmZmZm
Z
mZddlmZddlZddlZddlmZddlmZd	�ZGd
�deej0j2j�ZGd�d
e�ZGd�dej0j8j:�ZGd�de�Ze dk(�rOe�Z!e"edd���e�Z!e"e!jGddd��e"e!jGddd��ejHd�e!jK�ejL�Z'e!jQ�Z)e!jUe'�Z+ejXddD]Z-e'e-j]��e'j_e)e+�ejHd�e!ja�jcgd��e!jeddd�e!jgdgd�e"e!jGdd��yy) �N)�dgettext�)�
run_apport�apport_crash)�AcquireProgress�DistUpgradeView�ENCODING�InstallProgress)�get)�gettext)�twrapc��tjj�	t�}t|d�r|j
td�S|S#t$rd}Y�1wxYw)z( py2/py3 compatible readline from stdin ��decode�backslashreplace)�sys�stdout�flush�input�EOFError�hasattrrr	)�ss �A/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeViewText.py�readliner/sW���J�J������G���q�(���x�x��"4�5�5��H��	�����s�
A�A�Ac��eZdZd�Zd�Zy)�TextAcquireProgressc��tjjjj	|�tj|�y�N)�apt�progress�textr�__init__��selfs rr"zTextAcquireProgress.__init__<s.�������)�)�2�2�4�8�� � ��&�c��tjjjj	||�tj||�y�NT)rr r!r�pulse)r$�owners  rr(zTextAcquireProgress.pulse?s5�������)�)�/�/��e�<����d�E�*�r%N)�__name__�
__module__�__qualname__r"r(�r%rrr;s��'�r%rc�(��eZdZdZ�fd�Zd�Z�xZS)�TextInstallProgress�c�:��tt|�
|i|��d|_y)Nr)�superr/r"�
_prev_percent)r$�args�kwargs�	__class__s   �rr"zTextInstallProgress.__init__Js ���
�!�4�1�4�B�6�B���r%c���|j|jz|krDd}t|d�t|�z}tj
j
d|z�||_yy)Nzlibapt-pkg4.12zProgress: [%3i%%]z
%s
)r3�
MIN_REPORTINGr�intrr�write)r$�pkg�percent�status�domain�progress_strs      r�
status_changez!TextInstallProgress.status_changeNsZ������ 2� 2�2�W�<�%�F�#�F�,?�@�3�w�<�O�L��J�J���\�L�8�9�!(�D��=r%)r*r+r,r8r"r@�
__classcell__�r6s@rr/r/Es����M��)r%r/c�"�eZdZdZd�Zd�Zd�Zy)�TextCdromProgressAdapterz  Report the cdrom add progress  c�p�|r4td||jt|j�zdzfz�yy)z; update is called regularly so that the gui can be redrawn z%s (%f)�dN)�print�value�float�
totalSteps)r$r!�steps   r�updatezTextCdromProgressAdapter.updateYs3���
�	�T�4�:�:�e�D�O�O�.D�#D�S�#H�I�I�
J�r%c��y)N)Frr-r#s r�ask_cdrom_namez'TextCdromProgressAdapter.ask_cdrom_name]s��r%c��y�NFr-r#s r�change_cdromz%TextCdromProgressAdapter.change_cdrom_s��r%N)r*r+r,�__doc__rLrNrQr-r%rrDrDWs��*�K��r%rDc���eZdZdZdd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Z�fd
�Zd�Z
dd�Zdd
�Zd�Z	dd�Zdd�Zdd�Zd�Z�xZS)�DistUpgradeViewTextz' text frontend of the distUpgrade tool c��d|_t�jd�dtjvrdtjd<|r|dk(r3tj
j
tj�d�}nd}	tjd|�tjd�d|_tj j"j%�|_t)�|_t-�|_t1�|_|j4t6_y#t$r"}tjd	|z�Yd}~��d}~wwxYw)
NT�Text�DEBIAN_FRONTEND�dialog�.�moz)/usr/share/locale/ubuntu-release-upgraderzubuntu-release-upgraderzError setting locales (%s))�needs_screen�
get_telemetry�set_updater_type�os�environ�path�join�getcwdr�bindtextdomain�
textdomain�	Exception�logging�warning�	last_steprr r!�
OpProgress�_opCacheProgressr�_acquireProgressrD�_cdromProgressr/�_installProgress�_handleExceptionr�
excepthook)r$�datadir�logdir�	localedir�es     rr"zDistUpgradeViewText.__init__fs��� �����(�(��0��B�J�J�.�,4�B�J�J�(�)��'�S�.��G�G�L�L�����T�2�)�?�)�	<�
�
 �
 �!:�I�
F�
�
�
�6�
7���� #��� 1� 1� <� <� >��� 3� 5���6�8��� 3� 5����.�.�����	<�
�/�/�6��:�
;�
;��	<�s�+D%�%	E�.E�Ec�T�ddl}t�|j|||�}tjddj|�z�t
|||�t�s4|j	td�td�dj|��tjd�y)Nrznot handled exception:
%s�
zA fatal error occurredz�Please report this as a bug and include the files /var/log/dist-upgrade/main.log and /var/log/dist-upgrade/apt.log in your report. The upgrade has aborted.
Your original sources.list was saved in /etc/apt/sources.list.distUpgrade.r)�	tracebackrG�format_exceptionrf�errorrarr�_r�exit)r$�typerH�tbrv�liness      rrnz$DistUpgradeViewText._handleException�s���
	�
���*�*�4���;���
�
�2�T�Y�Y�u�5E�E�F��T�5�"�%��|��J�J�q�1�2��>�?��y�y��'�
)�	����r%c��|jSr)rkr#s r�getAcquireProgressz&DistUpgradeViewText.getAcquireProgress�����$�$�$r%c�<�||j_|jSr)rm�_cache)r$�caches  r�getInstallProgressz&DistUpgradeViewText.getInstallProgress�s��',����$��$�$�$r%c��|jSr)rjr#s r�getOpCacheProgressz&DistUpgradeViewText.getOpCacheProgress�r�r%c��|jSr)rlr#s r�getCdromProgressz$DistUpgradeViewText.getCdromProgress�s���"�"�"r%c�j�t�t|�tjj�yr)rGrrr)r$�msgs  r�updateStatusz DistUpgradeViewText.updateStatus�s���g��C�j�	�j�j���r%c�@�t�ttd��y)N�Aborting)rGryr#s r�abortzDistUpgradeViewText.abort�s���g��A�j�M�r%c�:��tt|�|�||_yr)r2rT�setSteprh)r$rKr6s  �rr�zDistUpgradeViewText.setStep�s������.�t�4��d�nr%c
�r�|j||td�tdj|��z�y)Nz	Demoted:
z, )�informationryr
ra)r$�summaryr��	demotionss    r�
showDemotionsz!DistUpgradeViewText.showDemotions�s/������#��<���t�y�y��/C�)D�D�	Fr%c���t�tt|��tt|��|rtt|��ttd��t�y)Nz To continue please press [ENTER])rGr
ryr�r$r�r��extended_msgs    rr�zDistUpgradeViewText.information�sB���g��E�'�N���E�#�J��	�
�e�L�!�"��A�0�1�2��jr%c��t�tt|��tt|��|rtt|��yrP)rGr
r�s    rrxzDistUpgradeViewText.error�s2���g��E�'�N���E�#�J��	�
�e�L�!�"�
r%c��t|t�s|jt�}dD]�}tj
j
|�s�#tj|dgtj��}	|jj|�|jj�|j�yt#|�y#t$r)}|jtj k7r�Yd}~yd}~wwxYw)z" helper to show output in a pager )z/usr/bin/sensible-pagerz	/bin/more�-)�stdinN)�
isinstance�bytes�encoder	r^r`�exists�
subprocess�Popen�PIPEr�r:�close�wait�IOError�errno�EPIPErG)r$�output�pager�prss     r�showInPagerzDistUpgradeViewText.showInPager�s������
&��=�=��*�&�;��%�
�W�W�^�^�E�
"��"�"�E�#�;�Z�_�_�E�a���'�'�-�-��'��'�'�-�-�/��&�&�(����F�m�����W�W����+��,����s�3AC�	C9�C4�4C9c
��tj||||||�t�tt|��tt|j��tdtd��dtd���d��	t
�j�j�}|jtd��ry|r|jtd��ry	|jtd
���r%d}t|j�dkDrR|dz
}|ttd
�dj|jD�	cgc]}	|	j��c}	�zd��z
}t|j�dkDrR|dz
}|ttd�dj|jD�	cgc]}	|	j��c}	�zd��z
}t|j�dkDrR|ttd�dj|jD�	cgc]}	|	j��c}	�zd��z
}|dz
}t|j �dkDrR|dz
}|ttd�dj|j D�	cgc]}	|	j��c}	�zd��z
}t|j"�dkDrR|dz
}|ttd�dj|j"D�	cgc]}	|	j��c}	�zd��z
}|j%|�ttd��dtd���d�����cc}	wcc}	wcc}	wcc}	wcc}	w)N� �Continue [yN] zDetails [d]r��endT�y�nF�drruzNo longer supported: %s
z  ��subsequent_indentzRemove: %s
zRemove (was auto installed) %szInstall: %s
zUpgrade: %s
)r�confirmChangesrGr
�confirmChangesMessageryr�strip�lower�
startswith�lenr�ra�name�toRemove�toRemoveAuto�	toInstall�	toUpgrader�)
r$r��changesr��downloadSize�actions�removal_bold�resr�r�s
          rr�z"DistUpgradeViewText.confirmChanges�s����$�$�T�7�G�Y�%1�7�<��g��E�'�N���E�$�,�,�-�.���*�+�Q�}�-=�>�B�G���j��� �&�&�(���>�>�!�C�&�!������q��v�.��
�^�^�A�c�F�
#��&�
����
 �1�
$���n�f����/�0�3�8�8�T�^�^�<\��Q�V�V�<\�3]�]�$(�*�*�f�����
�!�
#���n�f����N�#�c�h�h��
�
�/N�1����/N�&O�O�$(�*�*�f���"�"�
#�a�
'����4�5����RV�Rc�Rc�Ad�Q�!�&�&�Ad�8e�e�$(�*�*�f���n�f�
����
 �1�
$���n�f����O�$�s�x�x����0P�A����0P�'Q�Q�$(�*�*�f�����
 �1�
$���n�f����O�$�s�x�x����0P�A����0P�'Q�Q�$(�*�*�f��
�
�6�
"�
��+�,�a�
�.>�?�R�H�K
��=]��
0O��Be��1Q��
1Qs�>M�(M�
M�<M�&Mc���t�|rtt|��tt|��|dk(rXttd�d��t�}|j	�j�j
td��ryyttd�d��t�}|j	�j�j
td	��ryy)
N�Nor�rr�r�TFzContinue [Yn] r�)rGr
ryrr�r�r�)r$r�r��defaultr�s     r�askYesNoQuestionz$DistUpgradeViewText.askYesNoQuestion�s����g�	�
�e�G�n���E�#�J��	�D��
��"�#��
,��
�#�
�Y�Y�[�
�
�
 �
+�
+�A�c�F�
3���
��"�#��
,��
�#�
�Y�Y�[�
�
�
 �
+�
+�A�c�F�
3��r%c�B�|j|||dk(rd��Sd��S)N�Cancelr��Yes�r�)r�)r$r�r�r�s    r�askCancelContinueQuestionz-DistUpgradeViewText.askCancelContinueQuestions:��
�
"�
"�7�C��8�+��#�8�8�16�#�8�8r%c�N�|jtd�td�d��S)NzRestart requiredz]To finish the upgrade, a restart is required.
If you select 'y' the system will be restarted.r�r�)r�ryr#s r�confirmRestartz"DistUpgradeViewText.confirmRestart#s8��
�
"�
"�1�%7�#8�#$�&:�$;�EI�	#�J�Jr%)NNrr')r�)r�)r*r+r,rRr"rnrr�r�r�r�r�r�r�r�rxr�r�r�r�r�rArBs@rrTrTcsd���1�/�6�*%�%�%�#����F����,37�-I�^�(8� Jr%rT�__main__z�89 packages are going to be upgraded.
You have to download a total of 82.7M.
This download will take about 10 minutes with a 1Mbit DSL connection and about 3 hours 12 minutes with a 56k modem.r�r��helloz	Icecream?r�r�)z
/usr/bin/dpkgz--configurez-a�short�longa�asfds afsdj af asdf asdf asf dsa fadsf asdf as fasf sextended
asfds afsdj af asdf asdf asf dsa fadsf asdf as fasf sextended
asfds afsdj af asdf asdf asf dsa fadsf asdf as fasf sextended
asfds afsdj af asdf asdf asf dsa fadsf asdf as fasf sextended
asfds afsdj af asdf asdf asf dsa fadsf asdf as fasf sextended
asfds afsdj af asdf asdf asf dsa fadsf asdf as fasf sextended
asfds afsdj af asdf asdf asf dsa fadsf asdf as fasf sextended
�xxrF)4r�rrfr�rrrr^�DistUpgradeApportrrrrr	r
�	telemetryrr\�apt.progress�DistUpgradeGettextry�utilsr
rr r!rr/�base�
CdromProgressrDrTr*�viewrGr�rzr��Cacher�r�fpr��ip�argvr;�mark_install�commit�getTerminal�callrxr�r-r%r�<module>r�s���,
�
����
�	�7���,���,��	
��/�3�<�<�+<�+<�+L�+L��)�/�)�$	�s�|�|�0�0�>�>�	�EJ�/�EJ�P�z��	�	�$�
��S�gj�	k�l�
�	�$�����g�{�D�9�:�����g�{�E�:�;�
�#�(�(�1�+�����
�#�)�)�+�%���� �"����u�%�"��X�X�a�b�\��c�	�#�J������,�,�r�"��
�#�(�(�1�+�������>�?��*�*�W�V�O�����d�2�s�#�����g�{�3�4�Ur%

Zerion Mini Shell 1.0