403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/DistUpgrade/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/DistUpgrade/__pycache__/DistUpgradeCache.cpython-314.pyc
+
�[�i���Z�^RIt^RIt^RIt^RIt^RIt^RIt^RIt^RIt^RIt^RI	t	^RI
t
^RIHtH
t
^RIHt^RIHt^RIHt!RR]4t!RR	]4t!R
R]4t!RR
]4tRt]!4wtt!RR]4t!RR]4t!RR]P>4t R#)�N)�Popen�PIPE)�gettext)�ngettext)�
inside_chrootc��]tRt^(tRtR#)�CacheException�N��__name__�
__module__�__qualname__�__firstlineno__�__static_attributes__r
��>/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeCache.pyr	r	(���rr	c��]tRt^,tRtR#)�CacheExceptionLockingFailedr
Nrr
rrrr,rrrc��]tRt^0tRtR#)�CacheExceptionDpkgInterruptedr
Nrr
rrrr0rrrc�2aa�]tRt^4toV3RltRtVtV;t#)�PackageRemovalDeniedExceptionc�:<�Wn\R4PVP4p\P!R4PVP4'd,V\R4PVP4,
p\SV`V4R#)zHThe package {} is marked for removal but it is in the removal deny list.z^postgresql-[0-9]*$z�

To prevent data loss, postgresql packages are not removed automatically during the upgrade. If you are certain you no longer need {}, you can manually remove it and try the upgrade again.N)�package�_�format�re�compile�match�super�__init__)�selfr�msg�	__class__s&& �rr"�&PackageRemovalDeniedException.__init__5s�������
2�
��&����
�	��:�:�,�-�3�3�D�L�L�A�A��1�-��
�f�T�\�\�"�
#�C�	����r)r)rr
rrr"r�__classdictcell__�
__classcell__)r%�
__classdict__s@@rrr4s�����rrc��^p^p\P!4^,p\P!RV,4F�pVRV,8Xd)V\PP	V4,
pK9VPR4^8�g-VPR4^8�gVPR4^8�dK}V\PP	V4,
pK�	V^8Xd\P!R4R	pV^8Xd\P!R4R
pVR,
pRpVR,V8�d
VR,pW,
pW3#)zbestimate the amount of space used by the kernel and initramfs in /boot,
including a safety margin
z
/boot/*%s*z/boot/initrd.img-%sz
initrd.imgz.bakz.dpkg-z>estimate_kernel_initrd_size_in_boot() returned '0' for kernel?z>estimate_kernel_initrd_size_in_boot() returned '0' for initrd?g�������?ii�
i)�os�uname�glob�path�getsize�find�logging�warning)�kernel�initrd�kver�f�
initrd_buffers     r�#estimate_kernel_initrd_size_in_bootr8Is���F�
�F�
�8�8�:�a�=�D�
�Y�Y�|�d�*�
+���%��,�,��b�g�g�o�o�a�(�(�F��f�f�\�"�a�'�1�6�6�&�>�Q�+>�����!�Q�&���b�g�g�o�o�a�(�(�F�,���{����L�	N���
��{����L�	N���
�k��F��M�
��}�}�$���
�
�
��F��=�rc�0a�]tRt^mtoRtRtRtRtVtR#)�FreeSpaceRequiredz�FreeSpaceRequired object:

This exposes:
- the total size required (size_total)
- the dir that requires the space (dir)
- the additional space that is needed (size_needed)
c�*�WnW nW0nR#�N)�
size_total�dir�size_needed)r#r=r>r?s&&&&rr"�FreeSpaceRequired.__init__us��$����&�rc�Z�RVP:RVP:RVP:2#)zFreeSpaceRequired Object: Dir: z
 size_total: z size_needed: )r>r=r?�r#s&r�__str__�FreeSpaceRequired.__str__ys1��UY�U]�U]�_c�_n�_n�pt�qA�qA�B�	Br)r>r?r=N)	rr
rr�__doc__r"rCrr'�r)s@rr:r:ms�����'�B�Brr:c�*a�]tRt^}toRtRtRtVtR#)�NotEnoughFreeSpaceErrorzA
Exception if there is not enough free space for this operation

c��WnR#r<��free_space_required_list)r#rKs&&rr"� NotEnoughFreeSpaceError.__init__�s��(@�%rrJN�rr
rrrEr"rr'rFs@rrHrH}s�����A�ArrHc��a�]tRt^�to^t^tR5Rlt]R4tRt	Rt
RtRtRt
]R	4t]R
4t]R4t]R4tR
tRtR6RltRtRtRtR7RltRtRtRtRtRtRtR8RltR8Rlt R8Rlt!R8Rlt"Rt#Rt$R t%R!t&R"t'R#t(R$t)]
R%4t*R&t+R't,]R(4t-R)t.R*t/R+t0R,t1R-t2]
R.4t3R/t4R0t5R1t6R2t7R9R3lt8R4t9Vt:R#):�MyCacheNc�,�.Vn.VnW nW0nRVnRVnWnVPPRR4VnW`n	Wpn
RVnV'd.\P!4VP4RVn\&P(P+W4VP-RR4VnVPP1VR4Vn\5RR.\6RR	7P94^,P;4VnVP?4\PPAR
R4R# \d,pR\!T49d\#T4h\%T4hRp?ii;i)
F�Distro�MetaPkgsTzdpkg --configure -aN�RemovalDenylistFiler,z-r)�stdout�universal_newlinesz"APT::AutoRemove::SuggestsImportant�false���)!�
to_install�	to_remove�view�quirks�lock�partialUpgrade�config�getlist�metapkgs�	from_dist�to_dist�
_listsLock�apt_pkg�pkgsystem_lock�lock_lists_dir�SystemError�strrr�apt�Cacher"�getListFromFile�removal_denylist�_get_linux_metapackage�linux_metapackagerr�communicate�stripr,�_initAptLog�set)	r#r^rZr[�progressr\rarb�es	&&&&&&&& rr"�MyCache.__init__�sH���������	�����	�#��������+�+�H�j�A��
�"��������
5��&�&�(��#�#�%� ��	�	�	�	���4�*� &� 6� 6�x�AV� W���!%���!C�!C�D�%�!P����G�T�?�4�.2�4�4?�K�M�!�E�EJ�U�W�	
�
����������?��I���
5�(�C��F�2�7��:�:�1�!�4�4��	
5�s�,,E�F�(&F�Fc�Z�\4pVF�pVP'dVPP'dK3VPPVP
8Xg(VPPVP8XgKVPVP4K�	V#)zAreturn the packages not downloadable packages in reqreinst state )	rr�	candidate�downloadable�_pkg�
inst_state�	ReInstReq�
HoldReInstReq�add�name)r#�	reqreinst�pkgs&  r�req_reinstall_pkgs�MyCache.req_reinstall_pkgs�ss���E�	��C��]�]�]�#�-�-�*D�*D�*D����$�$����6����$�$��(:�(:�:��
�
�c�h�h�'���rc��VPp\V4^8�d�\RR\V44p\RR\V44RPV4,pVP	W44'dVVP4.RO\
V4,pVP4PV4VP4R#R#)	z.check for reqreinst state and offer to fix it zRemove package in bad statezRemove packages in bad statez�The package '%s' is in an inconsistent state and needs to be reinstalled, but no archive can be found for it. Do you want to remove this package now to continue?z�The packages '%s' are in an inconsistent state and need to be reinstalled, but no archives can be found for them. Do you want to remove these packages now to continue?�, TF)z
/usr/bin/dpkgz--removez--force-remove-reinstreq)
r��lenr�join�askYesNoQuestion�release_lock�list�getTerminal�call�get_lock)r#rZr�header�summary�cmds&&    r�fix_req_reinst�MyCache.fix_req_reinst�s����+�+�	��y�>�A���;�<�!�)�n�.�F�� 2�
 +�
 #�9�~�
/�26���9�1E�
F�G��$�$�V�5�5��!�!�#�O�RV�W`�Ra�a��� � �"�'�'��,��
�
���rc��VPPRRR4p\PP	V4'g\P
!V4\PPRV4\PPRR4\P!\PPVR4\P\P,\P,R4Vn
\PP4pR	V,p\P !VPVP#R
44\PPRR4\PPR
R4\PPRR4R#)zinit logging, create log file�Files�LogDirz/var/log/dist-upgradezDir::LogzDir::Log::Terminalzapt-term.logzapt.logi�z
Log time: %s
zutf-8zDebug::pkgProblemResolver�truezDebug::pkgDepCache::MarkerzDebug::pkgDepCache::AutoInstallN)r^�getWithDefaultr+r.�exists�makedirsrdrr�openr��O_RDWR�O_CREAT�O_APPEND�logfd�datetime�now�write�encode)r#�logdirr�r�s&   rrq�MyCache._initAptLog�s�����+�+�G�X�,C�E���w�w�~�~�f�%�%��K�K��������:�v�.������/��@��W�W�R�W�W�\�\�&�)�<��Y�Y����3�b�k�k�A�5�J��
����#�#�%��!�C�'��
������V�]�]�7�3�4�	�����6��?������7��@������<�f�Erc��\VR4'dA\P!VP4\P!VP4\P
!^4Vn\P
!^4Vn\P!VP^4\P!VP^4R#)�
old_stdoutN)�hasattrr+�closer��
old_stderr�dup�dup2r�rBs&r�_startAptResolverLog�MyCache._startAptResolverLog�sq���4��&�&��H�H�T�_�_�%��H�H�T�_�_�%��&�&��)����&�&��)���
����
�
�A��
����
�
�A�rc���\P!^4\P!^4\P!VP^4\P!VP^4R#)�N)r+�fsyncr�r�r�rBs&r�_stopAptResolverLog�MyCache._stopAptResolverLog�s<��
�����
�����
�������#�
�������#rc�a�V3RlpV#)z2decorator to ensure that the apt output is logged c�t<�V^,P4S!V/VBpV^,P4V#)r)r�r�)�args�kwargs�resr6s*, �r�wrapper�(MyCache.withResolverLog.<locals>.wrappers7�����G�(�(�*��T�$�V�$�C���G�'�'�)��Jrr
)r6r�sf r�withResolverLog�MyCache.withResolverLog�s���	�
�rc���\P!VP4p\P!4pVP	W P
VP4VP#)z;get the size of the packages that are required to download )rd�PackageManager�	_depcache�Acquire�get_archives�_list�_records�fetch_needed)r#�pm�fetchers&  r�required_download�MyCache.required_downloadsF���
#�
#�D�N�N�
3���/�/�#��
������T�]�]�;��#�#�#rc�.�VPP#)z8get the size of the additional required space on the fs )r��usr_sizerBs&r�additional_required_space�!MyCache.additional_required_spaces���~�~�&�&�&rc�T�VPP# \d^#i;i)z;get the extra size needed to install the snap replacements )r[�extra_snap_space�AttributeErrorrBs&r�#additional_required_space_for_snaps�+MyCache.additional_required_space_for_snapss+��
	��;�;�/�/�/���	��	�s��'�'c�4�VPP^8�#)zis the cache broken )r��broken_countrBs&r�	is_broken�MyCache.is_broken!s���~�~�*�*�Q�.�.rc���\PPR4R,p\P!V4VnVP^8dRV,p\V4hR#)zDir::State::Listsr\zCan not lock '%s' N)rdr^�find_dirr�rcr)r#r~rts&  rrf�MyCache.lock_lists_dir'sT���~�~�&�&�':�;�f�D��!�*�*�4�0����?�?�Q��$�t�+�A�-�a�0�0�rc�z�VP^8�d*\P!VP4RVnR#R#)rNrW)rcr+r�rBs&r�unlock_lists_dir�MyCache.unlock_lists_dir-s*���?�?�Q���H�H�T�_�_�%� �D�O�rc��VP4\PPW4pVP	4V'd'VP
'd\
\R44hVR8Xd\
R4hR#)zN
our own update implementation is required because we keep the lists
dir lock
zThe server may be overloadedFzAapt.cache.update() returned False, but did not raise exception?!?N)r�rirj�updaterf�release_file_download_error�IOErrorr)r#�	fprogressr�s&& rr��MyCache.update1si��
	
�����i�i���t�/��������>�>�>��!�:�;�<�<��%�<��]�^�^�rc��\P!R4VP'dVP4\P
P
WV4R#)zcache.commit()N)r1�infor\r�rirj�commit)r#r��	iprogresss&&&rr��MyCache.commit@s8�����%�&��9�9�9������	�	����)�4rc���VP'd \P!4RVnR#R# \d)p\P
!RT,4Rp?R#Rp?ii;i)Fzfailed to SystemUnLock() (%s) N)r\rd�pkgsystem_unlockrgr1�debug�r#rts& rr��MyCache.release_lockFsR���9�9�9�
D��(�(�*�!��	����
D��
�
�>��B�C�C��
D���4�A'�A"�"A'c���VP'g \P!4RVnR#R# \d)p\P
!RT,4Rp?R#Rp?ii;i)Tzfailed to SystemLock() (%s) N)r\rdrergr1r�r�s& rr��MyCache.get_lockNsR���y�y�y�
B��&�&�(� ��	����
B��
�
�<�q�@�A�A��
B�r�c��V'd'VPPVP4pMVPPpVR8Xd,\P
!RVP:RV:R24R#VP#)z)check if the given pkg can be downloaded Nzno version information for 'z' (useCandidate=�)F)r��get_candidate_verry�current_verr1r2r~rx)r#r��useCandidate�vers&&& rrx�MyCache.downloadableVs[����.�.�2�2�3�8�8�<�C��(�(�&�&�C��$�;��O�O�SV�S[�S[�]i�j�k�����rc�6�VPP4#)zQtry to fix broken dependencies on the system, may throw
SystemError when it can't)r��
fix_brokenrBs&rr��MyCache.fix_brokenas���~�~�(�(�*�*rc�T�.Vn.VnVP4F�pVP'gVP'd&VPPVP4VP'gK`VPPVP4K�	R#)z)create a snapshot of the current changes N)rXrY�get_changes�marked_install�marked_upgrade�appendr~�
marked_delete)r#r�s& r�create_snapshot�MyCache.create_snapshotfsr���������#�#�%�C��!�!�!�S�%7�%7�%7����&�&�s�x�x�0�� � � ����%�%�c�h�h�/�	&rc�:�VPP4R#r<)r��initrBs&r�clear�
MyCache.clearps�������rc��\P!VP4pVVP4VPFpW,pVP4K	VPFpW,pVPRRR7K 	R#)zrestore a snapshot F)�auto_fix�	auto_instN)rd�ActionGroupr�rrY�mark_deleterX�mark_install)r#�actiongroupr~r�s&   r�restore_snapshot�MyCache.restore_snapshotssm���)�)�$�.�.�9��	��
�
���N�N�D��*�C��O�O��#��O�O�D��*�C����e�u��=�$rc���VPPRR4pVF�pW 9d9W,P'd!\P!RV,4R#RpVPPVR4F(pY4V9;'dW,P,pK*	V'gK�\P!RV,4R#	\P!R4R#)	a+
This checks if we run on a desktop or a server install.

A server install has more freedoms, for a desktop install
we force a desktop meta package to be install on the upgrade.

We look for a installed desktop meta pkg and for key
dependencies, if none of those are installed we assume
server mode
rQrRz@need_server_mode(): run in 'desktop' mode, (because of pkg '%s')FT�KeyDependencieszIneed_server_mode(): run in 'desktop' mode, (because of key deps for '%s')z[need_server_mode(): can not find a desktop meta package or key deps, running in server mode)r^r_�is_installedr1r�)r#r`�key�
deps_foundr�s&    r�need_server_mode�MyCache.need_server_mode�s����;�;�&�&�x��<���C��{�t�y�5�5�5��
�
�`�cf�f�g���J��{�{�*�*�3�0A�B���T�k�D�D�d�i�.D�.D�D�
�C��z��
�
�i�lo�o�p���	�
�
�s�t�rc���VP'd*\P!R4VP4R#R# \d)TP\
R4\
R44R#i;i)zDcheck if the cache is ok and if the required metapkgs
are installed
z$Have broken pkgs, trying to fix themzBroken packagesz�Your system contains broken packages that couldn't be fixed with this software. Please fix them first using synaptic or apt-get before proceeding.FT)r�r1r�r�rg�errorr)r#rZs&&r�coherence_check�MyCache.coherence_check�sh���>�>�>�

��
�
�D�E����!����
��
�
�1�.�/�!"�$@�"A�B��
�s�&>�/A1�0A1c��\P!RV:RV:R24W9dhW,P!R/VBW,P'g8W,P'g \P
!RV,4R#R#)zInstalling '�' (r�z Installing/upgrading '%s' failedFTr
)r1r�rr�r�r�r#r��reason�flagss&&&,rr�MyCache.mark_install�s^���
�
��V�<�=��;��I�"�"�+�U�+��I�,�,�,��	�0H�0H�0H��
�
�@�3�F�G��rc��\P!RV:RV:R24W9dfW,P'dNW,P4W,P'g \P
!RV,4R#R#)zUpgrading 'rr�zUpgrading '%s' failedFT)r1r�r�mark_upgrader�r�r#r�rs&&&rr�MyCache.mark_upgrade�sY���
�
�s�F�;�<��;�4�9�1�1�1��I�"�"�$��9�+�+�+��
�
�5��;�<��rc��\P!RV:RV:R24W9dW,P!R/VBR#R#)z
Removing 'rr�Nr
)r1r�rrs&&&,r�mark_remove�MyCache.mark_remove�s0���
�
�c�6�:�;��;��I�!�!�*�E�*�rc��\P!RV:RV:R24W9d/VPPW,PR4R#R#)z	Purging 'rr�TN)r1r�r�rryrs&&&r�
mark_purge�MyCache.mark_purge�s7���
�
�S�&�9�:��;��N�N�&�&�t�y�~�~�t�<�rc��W9dHW,P'd.W,P'dVPW4R#R#R#R#r<)rr�r)r#�pkgnamers&&&r�_keep_installed�MyCache._keep_installed�s@���O��
�*�*�*��
�+�+�+����g�.�,�+�
rc	��VPPRR4FpVPVR4K	VPFypW 9gKW,P'gW,P
'gK=VPPVR4FpVPVRV,4K	K{	\P!R4VPPRR4F�pVF�pVP'gKVPP'gK5VP'gKIVPPV8XgKfVPVPRV,4K�	K�	VPF�pW 9gKW,P'gW,P
'gK=VPPVR4F�pVF�pVP'gKVPP'gK5VP'gKIVPPV8XgKfVPVPV:RV:24K�	K�	K�	R	#)
zNrun after the dist-upgrade to ensure that certain
packages are kept installed rQ�KeepInstalledPkgszDistro KeepInstalledPkgs rulez%s KeepInstalledPkgs rulez"Running KeepInstalledSection rules�KeepInstalledSectionz$Distro KeepInstalledSection rule: %sz KeepInstalledSection rule: N)
r^r_r)r`rr�r1r�rwrxr��sectionr~)r#r(rr.r�s&    r�keep_installed_rule�MyCache.keep_installed_rule�s����{�{�*�*�8�5H�I�G�� � ��*I�J�J��=�=�C��{��	� 6� 6� 6� $�	� 8� 8� 8�#�{�{�2�2�3�8K�L�G��(�(��2M�PS�2S�T� M�!�	�
�
�:�;��{�{�*�*�8�5K�L�G����M�M�M�c�m�m�&@�&@�&@��)�)�)��
�
�-�-��8��(�(����3Y�\c�3c�d�	�M��=�=�C��{��	� 6� 6� 6� $�	� 8� 8� 8�#�{�{�2�2�3�8N�O�G�#���M�M�M�c�m�m�.H�.H�.H� #� 1� 1� 1��M�M�1�1�W�<� �0�0����ad�fm�;n�o�	 $� P�!rc�b�VP'gVPP4R#R#)z-run before the upgrade was done in the cache N)r]r[�PreDistUpgradeCacherBs&r�pre_upgrade_rule�MyCache.pre_upgrade_rule�s%���"�"�"��K�K�+�+�-�#rc
�b�RVP3RVP3RVP3RVP33F�wrVPPRRV,4FpV!VRV,4K	VPFwpW@9gKW,P'gW,P'gK=VPPVRV,4FpV!W4:RV:R	24K	Ky	K�	VP'gVPP4R
#R
#)z,run after the upgrade was done in the cache �Install�Upgrade�Remove�PurgerQz
PostUpgrade%szDistro PostUpgrade%s rulez PostUpgradez ruleN)rrr"r%r^r_r`rr�r]r[�PostDistUpgradeCache)r#�rule�actionr�rs&    r�post_upgrade_rule�MyCache.post_upgrade_rule�s��� )�4�+<�+<�=� )�4�+<�+<�=� (�$�*:�*:�;� '����9�;�N�T�
�{�{�*�*�8�_�t�5K�L���s�7�$�>�?�M��}�}���;�D�I�$:�$:�$:�$(�I�$<�$<�$<�#�{�{�2�2�3��$�8N�O���s�s�D�$I�J� P�%�;��"�"�"��K�K�,�,�.�#rc��\P!RVP,4VPPR4wpp\
R.\R7P4^,pRT9d\P!R	4R
# \d)p\P
!RT,4Rp?R#Rp?ii;i)zOcheck for the running kernel and try to ensure that we have
an updated version
zKernel uname: '%s' �-z/Can't parse kernel uname: '%s' (self compiled?)NF�dmesg)rTsWARNING: NR_CPUS limitzUP kernel on SMP system!?!T)	r1r�r,�split�	Exceptionr2rrro)r#�versionrrtrAs&    r�checkForKernel�MyCache.checkForKernels���	�
�
�+�d�j�j�8�9�	�"�j�j�.�.�s�3�O�W�a��
�w�i��-�9�9�;�A�>��$��-��M�M�6�7����	��O�O�M�PQ�Q�R���	�s�B�C�B<�<Cc��RpVPPRR4pVEF6pVPPP	VP
4pV'd;VP^8Xd*\P!RVP,4KuVP'gK�VPP'gK�VP'dK�VP'dK�VPV9dK�RVP9dK�VPPV9gEKVPVPRV,4EK9	R#)�requiredrQ�RemoveEssentialOkzPackage %s has no priority set�:z;priority in required set '%s' but not scheduled for installN)rH)r^r_�_pcacher�r�ry�priorityr1rr~rwrxrr�r)r#�need�removeEssentialOkr�r�s&    r�
checkPriority�MyCache.checkPrioritys����� �K�K�/�/��:M�N���C��+�+�'�'�9�9�#�(�(�C�C��s�|�|�q�(��
�
�>����I�J���
�
�
�#�-�-�"<�"<�"<��%�%�%��);�);�);��H�H� 1�1��3�8�8�O��
�
�&�&�$�.��!�!�#�(�(�,i�lp�,p�q�rc��^pVP4'dPV^,^8XdVP4VP4\P!R4V^,
pKeVPRR7VP4R#)rg{�G�z�?T)�finishedN)�locked�
pulseProgress�
processEvents�time�sleep)r#rZr\�is&&& r�	updateGUI�MyCache.updateGUI1sg��
���k�k�m�m��2�v��{��"�"�$���� ��J�J�t��
��F�A����D��)����rc��\P!4pVP4\P!VPVP
V3R7pVP
4VP4VPV4V'gVPV4VPR4VP4VP4\4'd\P!R4MVP!4VP#4VP%4VP&'d2\)\+R4RP-RV44,4hTP=4TP-4.p
.pTP?4EFopTP@'dKTPB'd�TPETPF4TPHPJF�p
\LPN!T
PPTPRPT4^8gK?T
PVFdwr�TPXPZP]T4pT'gK4TP^'dKHT
PETPF4K�	K�	EKTP`PbpRpTFpTTPd,pK	T'dEKTT
PETPF4EKr	TPfPiRR4pT'd\P!R4R#\oT4^8�d=TPq4\P8!RRP-T4,4\oT
4^8�d�T
Pq4\P8!RRP-T
4,4TP74TP9\+R4\+R4R
P-T
44TP;4R#R# \(\.3EdFp\+R4pTP14pT'dT\+R4,
pM�\3T\.4'dT\5T4R,,
pMWT'd,T\+R	4,
pTR
P-T4,
pM$T\+R4,
pT\+R4,
pTP74TP9\+R
4T4\5T4p	\P8!RT	4TP;4Rp?TP=4TP-4R#Rp?ii;i TP=4TP-4i;i \jPldEL�i;i))�targetr�Tz5skipping kernel checks because we run inside a chrootz!Broken packages after upgrade: %sr�c3�"�TF6qP'gVP'gK(VPx�K8	R#5ir<)�is_inst_broken�
is_now_brokenr~)�.0�ps& r�	<genexpr>�&MyCache.distUpgrade.<locals>.<genexpr>ds?���UR�ei�`a�m}�m}�m}�BC�BQ�BQ�U[�UV�U[�U[�ei�s
�%A�AzBAn unresolvable problem occurred while calculating the upgrade.

 z@This is most likely a transient problem, please try again later.z

z�This may be caused by unofficial packages installed on the system. Please try replacing the following packages with official versions from the Ubuntu archive, and then try the upgrade again.

�
z�If none of this applies, then please report this bug using the command 'ubuntu-bug ubuntu-release-upgrader-core' in a terminal. z�If you want to investigate this yourself the log files in '/var/log/dist-upgrade' will contain details about the upgrade. Specifically, look at 'main.log' and 'apt.log'.zCould not calculate the upgradezDist-upgrade failed: '%s'NFrQ�AllowUnauthenticatedzAllowUnauthenticated set!z!Packages to downgrade found: '%s'� z$Unauthenticated packages found: '%s'z"Error authenticating some packagesz�It was not possible to authenticate some packages. This may be a transient network problem. You may want to try again later. See below for a list of unauthenticated packages.)9�	threading�Lock�acquire�ThreadrYrZ�startr3�_keepBaseMetaPkgsInstalled�_installMetaPkgs�upgraderOr/rr1r2rEr=�_verifyChangesr�rgrr�r�foreign_packages�
isinstancerhr�rr��releaser�r��marked_downgrader�r~ry�version_listrd�version_compare�ver_str�	installedrD�	file_listrKr��
find_index�
is_trustedrw�origins�trustedr^�
getboolean�configparser�
NoOptionErrorr��sort)r#rZ�
serverModer]r\�trt�detailsrp�	error_msg�	untrusted�	downgrader�r��verFileIter�index�	indexfiler{r|�origin�bs&&&&                 r�distUpgrade�MyCache.distUpgrade<s����~�~����������D�N�N�$�)�)�T�9K�L��	���	�O	��!�!�#�
�+�+�D�1���%�%�d�+�
�L�L���
��� �
�$�$�&������� W�X��#�#�%�
�"�"�$�
���!��~�~�~�!�!�$G�"H�4�9�9�UR�ei�UR�LR�#R�S�S��\
�L�L�N�
�F�F�H��	��	��#�#�%�C�� � � ���#�#�#�� � ����*��8�8�0�0�C��.�.����S�]�]�%:�%:�<�>?�@�47�M�M�0�[�(+���(9�(9�(D�(D�[�(Q�I�(�y��1E�1E�1E� )� 0� 0���� :� %�	5B�	1���m�m�+�+�G��G�!���6�>�>�)��"��7�� � ����*�-&�0	����&�&�x�1G�H�A����� ;�<���
�y�>�A���N�N���M�M�=��(�(�9�-�.�
/��y�>�A���N�N���M�M�@��(�(�9�-�.�
/�
�$�$�&��J�J�q�=�>��=�>��y�y��+�
-�
�%�%�'����I�:�;�(	��9�:�G� $�4�4�6����1�7�8�8���A�<�=�=��3�q�6�F�?�*��!��1�1�����4�9�9�%5�6�6���1�e�f�f���1�O�P�P��

�$�$�&��J�J�q�:�;�W�E��A��I��M�M�5�y�A�
�%�%�'��
�L�L�N�
�F�F�H��Y(	��V
�L�L�N�
�F�F�H��D�)�)�	��	�sQ�%CQ�91Q�#W�8W�V�A-V�B,V�-V�V�V�"V=�W�Wc�\�\PPR4pVPPRR4pVP	4EFpVP
'dXVP
VP4'd7\P!RVP4\VP4hVP
'gK�VPPR8XgK�VPPVR39gK�VPV9dK�\P!RVP4\\!R4VP,4h	VPPRR	4pVF�pVP#R
4wrgW`9gKW,P$'gK8W,P$P&V8XgK[W,P('gW,P*'gK�\\!R4V,4h	R#)zdthis function tests if the current changes don't violate
our constraints (deny listed removals etc)
zAPT::ArchitecturerQrIzHThe package '%s' is marked for removal but it's in the removal deny listT�allzDThe package '%s' is marked for removal but it's an ESSENTIAL packagez1The essential package '%s' is marked for removal.�BadVersionsrz*Trying to install deny listed version '%s')rdr^r0r_r�r��_inRemovalDenylistr~r1r�rry�	essentialrw�architecturergrrBrwrDr�r�)r#�	main_archrNr��badVersions�bvr(r�s&       rro�MyCache._verifyChanges�s����N�N�'�'�(;�<�	� �K�K�/�/��:M�N���#�#�%�C�� � � �T�%<�%<�S�X�X�%F�%F��
�
�h�jm�jr�jr�s�3�C�H�H�=�=�� � � ��H�H�&�&�$�.��M�M�.�.�9�e�2D�D����$5�5��
�
�d�fi�fn�fn�o�!�!�$W�"X�[^�[c�[c�"c�d�d�&��k�k�)�)�(�M�B���B��X�X�c�]�N�W���D�M�$;�$;�$;��
�'�'�/�/�3�6���-�-�-���-�-�-�!�!�$P�"Q�TV�"V�W�W�
�rc��VPPPVP4pVf\	RVP
4R#VPf-\	RVPP4,4R#VPP^4wr4VPPPW434R#)z�
helper to make sure that the pkg._records is pointing to the right
location - needed because python-apt 0.7.9 dropped the python-apt
version but we can not yet use the new version because on upgrade
the old version is still installed
zNo candidate ver: FzNo file_list for: %s T)
rKr�r�ry�printr~rx�popr��lookup)r#r�r�r6r�s&&   r�_lookupPkgRecord�MyCache._lookupPkgRecord�s����k�k�#�#�5�5�c�h�h�?���;��&����1���=�=� ��)�D�I�I�N�N�,<�<�=���=�=�$�$�Q�'��������#�#�Q�J�/�rc��/p\4pVF�pVPV4'g*\P!RVP,4KCVP
PPPR4F�pVPR4'gKV\R4RPR4FFpVP4pWQ9d
\4W&W,PVP4KH	K�	K�	VFopRpVPPRR4pWW9dRpW,FpW,P'dKRpM	V'gK^VPV4Kq	V#)	z&no PkgRecord found for '%s', skipping rd�Task:N�,TrQ�IgnoredTasksF)rrr�r1r�r~rKr��recordrB�
startswithr�rpr}r^r_r)	r#�tasks�installed_tasksr��line�taskrw�
ignored_tasksr(s	&        r�installedTasks�MyCache.installedTasks�s7�����%���C��(�(��-�-��
�
�F����Q�R�����,�,�3�3�9�9�$�?���?�?�7�+�+�!%�c�'�l�m�!4� ;� ;�C� @��#�z�z�|���,�*-�%�E�K��������1�	!A�@�	��D��I� �K�K�/�/��.�I�M��$�!�	� �;�;���}�1�1�1� %�I��'��y��#�#�D�)���rc���\P!R4VEFKpVP'gVP'dK*VP	V4\VPPR4'd'VPPP'g*\P!RVP,4K�VPPPPR4FhpVPR4'gKV\R4RPR4F+pVP4pWA9gKVP4K-	Kj	EKN	R#)zrunning installTasksr�zcan not find Record for '%s'rdr�Nr�T)r1r�r�rr�r�rKr�r�r2r~rBr�r�rpr)r#r�r�r�r�s&&   r�installTasks�MyCache.installTaskss����
�
�,�-��C��!�!�!�S�%5�%5�%5���!�!�#�&��C�K�K�0�0�(�;�;����@T�@T�@[�@[�@[���� >���� I�J�����,�,�3�3�9�9�$�?���?�?�7�+�+�!%�c�'�l�m�!4� ;� ;�C� @��#�z�z�|���=��,�,�.�!A�@��rc�p�VPPRR4FpVPVR4K	R#)rQ�BaseMetaPkgsz%base meta package keep installed ruleN)r^r_r))r#rZr�s&& rrl�"MyCache._keepBaseMetaPkgsInstalled's/���;�;�&�&�x��@�C�� � ��&M�N�Arc	�<aa�VV3RlpSPPRR4oSPPRR4FFpSV,P4\P!S4PSV,4KH	SF�pVS9d�SV,P'd~SV,P'dc\P!RV,4SV,P4\P!S4PSV,4K�K�K�K�	V!4'g�\P!R	S,4SF�pR
pSPPVR4F)pYcS9;'dSV,P,pK+	V'gKX\P!RV,4SV,P4\P!RT:RST,P :R24M	V!4'gKRP#S^R4pVP\R4\R4VSR,3,4R#R
# \d,p\P!RT:RT:R24Rp?EKRp?ii;i \\3dWp\P!R
T:RT:R24TP\R4T,\R44Rp?R#Rp?ii;i)c�T<�SF�pVS9gKSV,pVP'd:VP'd(\P!RVP,4VP'dVP'dSV,P
'gK�R#	R#)zU
internal helper that checks if at least one meta-pkg is
installed or marked install
z(metapkg '%s' installed but marked_deleteTF)rr�r1r�r~r�)rr�r`r#s  ��r�metaPkgInstalled�2MyCache._installMetaPkgs.<locals>.metaPkgInstalled-s~���
 ���$�;��s�)�C��'�'�'�C�,=�,=�,=��
�
�&P�SV�S[�S[�&[�\��)�)�)�#�2C�2C�2C���9�3�3�3�#� �rrQrRr�zMarking '%s' for upgradezCan't mark 'z' for upgrade (r�Nz$none of the '%s' meta-pkgs installedTr
z!guessing '%s' as missing meta-pkgzfailed to mark 'z' for install (zCan't install '%s'z�It was impossible to install a required package. Please report this as a bug using 'ubuntu-bug ubuntu-release-upgrader-core' in a terminal.Fzmarked_install: 'z' -> '�'r�zCan't guess meta-packagez�Your system does not contain a %s or %s package and it was not possible to detect which version of Ubuntu you are running.
 Please install one of the packages above first using synaptic or apt-get before proceeding.rW)r^r_rri�ProblemResolver�protectr�
is_upgradabler1r�rrgr2�KeyErrorrrr�r�)	r#rZr�r�rrtr�	meta_pkgsr`s	f&      @rrm�MyCache._installMetaPkgs+s����
	� �;�;�&�&�x��<���;�;�&�&�x��@�C���I�"�"�$�����%�-�-�d�3�i�8�A��C�

O��4�K���I�*�*�*���I�+�+�+��M�M�"<�s�"B�C���I�*�*�,��'�'��-�5�5�d�3�i�@�,�+� �� �!�!��M�M�@�8�K�L���!�
��;�;�.�.�s�4E�F�C���+�"H�"H�$�s�)�2H�2H�H�J�G��:��M�M�"E��"K�L�%��S�	�.�.�0��M�M�C��c��Ia�Ia�"b�c��' �* �!�!��	�	�(�1�R�.�1�I��J�J�q�3�4��6�7�#�H�R�L�1�2�
3����S�
O����c�1� M�N�N��
O�� (��2�	%��
�
�'*�A�'/�0��
�
�1�%9�#:�S�#@�#$�&3�$4�5� %��	%�s>�I;�2I;�A I;�J4�;J1�J,�,J1�4L�A
L�Lc���VPFPp\P!V4PV4'gK0\P
!RV:RV:R24R#	R#)zdenylist expr 'z' matches 'r�TF)rlrrr r1r�)r#r(�exprs&& rr��MyCache._inRemovalDenylistysJ���)�)�D��z�z�$��%�%�g�.�.��
�
�#�W�.�/��	*�
rc��W9d \P!RV,4R#VPVP4'd \P!RV,4R#WP8Xd \P!RV,4R#VPV4'd \P!RV,4R#VPPRR4FfpW9gKW,P'gK%W,PPV8XgKH\P!RV,4R#	R#)	zskipping foreign pkg '%s'Fz skipping running kernel pkg '%s'z skipping kernel metapackage '%s'z"skipping '%s' (in removalDenylist)rQr-z'skipping '%s' (in KeepInstalledSection)T)
r1r��endswithr,rnr�r^r_rwr.)r#r(�foreign_pkgsr.s&&& r�isRemoveCandidate�MyCache.isRemoveCandidate�s����"��M�M�5��?�@�����D�J�J�'�'��M�M�<�w�F�G���,�,�,��M�M�<�w�F�G���"�"�7�+�+��M�M�>��H�I���{�{�*�*�8�5K�L�G���D�M�$;�$;�$;��M�+�+�3�3�w�>��
�
�G�'�Q�R��	M�rc
���W9dR#W9dR#VPPRR4pV'dVP	4W,PWTR7VPP4V'dmW9dR#VP4FPpVPV9gK\P!RV:RVP:R24VP4R#	R# \PdRpL�i;i \\3dPp\P!RT:R	\!T4:R
T:R24T'dTP4Rp?R#Rp?ii;i)
FTrQ�PurgeObsoletes)�purgerz	package 'z ' produces an unwanted removal 'z', skippingz'_tryMarkObsoleteForRemoval failed for 'r�: r�N)r^r}r~rr�rrZrUr�r~r1r�r
rgr�r2�repr)r#r(�remove_candidates�forced_obsoletesrr�r�rts&&&&&   r�tryMarkObsoleteForRemoval�!MyCache.tryMarkObsoleteForRemoval�s$��
�+�����	��K�K�*�*�8�5E�F�E��� � �"�	��M�%�%�E�%�E��I�I�#�#�%���.���+�+�-�C��x�x�'8�8��
�
�dk�mp�mu�mu�&v�w��-�-�/�$�	.���3�)�)�	��E�	��(�X�&�	��O�O�U\�^b�cd�^e�gh�i�j���%�%�'���		�s=�C/�AD�	!D�/:D�+D�/D	�D	�E,�AE'�'E,c��\4pVFKpVP'gKVPV4'dK0VPVP4KM	V#�z0get all package names that are not downloadable )rrr�anyVersionDownloadabler}r~)r#�
obsolete_pkgsr�s&  r�_getObsoletesPkgs�MyCache._getObsoletesPkgs�sL����
��C�����
�2�2�3�7�7�!�%�%�c�h�h�/���rc�j�VPPFpVP'gKR#	R#)z@helper that checks if any of the version of pkg is downloadable TF)ryrtrx)r#r�r�s&& rr��MyCache.anyVersionDownloadable�s*���8�8�(�(�C������)�rc���\4pVF_pVP'gKVPPVP4'gKDVPVP4Ka	V#r�)rrrr��
is_garbageryr}r~)r#�unused_dependenciesr�s&  r�_getUnusedDependencies�MyCache._getUnusedDependencies�sR��!�e���C�����D�N�N�$=�$=�c�h�h�$G�$G�#�'�'����1��#�"rc�l�\4pVEF"pVP'dVP'gK*VPV4'd�VPPP
F�wr4VP'dKVPR8Xd[VPPVP4'dKWVPPVP4'dK�W1VP&K�	K�VPV4'gEKRWP&EK%	V#)a\
Check for packages that do not have 'Ubuntu' as their origin.
Return this as a dict with <package name> -> <package file>.

If an installed package has a candidate that is not downloadable,
but *some* version of the package is downloadable, consider that
package foreign. In such cases, the package will have a value of None
in the returned dict.
�UbuntuN)�dictrrwrx�_candrx�
not_sourcer��archiver�rarbr~r�)r#�foreignr��pkg_file�_indexs&    rrp�MyCache.foreign_packages�s����&���C��$�$�$������� � ��%�%�*-�-�-�*=�*=�*G�*G�&�X��*�*�*� �!���8�3�$�,�,�7�7����G�G�$�,�,�7�7����E�E�-5����)��+H� �,�,�S�1�1�%)����!�1�4�rc�a�!RR\4pV3Rlp.o/p/p\R4;_uu_4pVF2pVP4wr�r�r�T	S9dK!SP
T	4K4	RRR4SP\R	R
7\PPR4pRR
RRVRR3EFp\PPV4pV!V4p\PPV4'd5\P !V4pVP"VP$,pM\P&!RV,4^pVV9d9\P
!RV:RVV,:24WTV,,W_&K�\P
!RV:RV:24W�V&V!V4W_&EK	?\P
!RV,4^pVF�p\(P*!RVP,4'gK,VP.'gVP0'gKR\P
!VP,:R\2:R24V^,
pK�	V\2,V^,\4,,pRpV'd~VFZpVP6'gKVP0'gVP8'gK=VVP:P<,
pK\	\P
!RV,4W�P>3R
VP@3RVPB3RRV3R R!R
V33F�wppV^8dK\PPV4p\P
!RVVVV,VV,PD3,4VV,;PDV,un"VV,;PFV,
un#K�	/pVEFpVV,PD^8gK\PH!\K\MVV,PD4^,44p\OV\P4'd%VPS\TPV!44p\PH!VV,PF4p\OV\P4'd%VPS\TPV!44p\YVV!V4V4VV!V4&EK	\V4^8�dY\PZ!RVUu.uFp\]V4NK	up,4\_\aVPc444hR	# \d,p
\P
!RT:RT
:R24Rp
?
EKRp
?
ii;i +'giELZ;iuupi)"z�
this checks if we have enough free space on /var, /boot and /usr
with the given cache

Note: this can not be fully accurate if there are multiple
      mountpoints for /usr, /var, /boot
c�*a�]tRtRtoRtRtRtVtR#)�)MyCache.checkFreeSpace.<locals>.FreeSpacei
z?helper class that represents the free space on each mounted fs c� �Wn^VnR#)rN��freerM)r#�initialFrees&&rr"�2MyCache.checkFreeSpace.<locals>.FreeSpace.__init__s��'�	���	rr�NrMrFs@r�	FreeSpacer�
s����N�
�
rr�c�P<�SFpVPV4'gKVu#	R#)zoreturn 'id' of a directory so that directories on the
same filesystem get the same id (simply the mount_point)
�/)r�)�d�mount_point�mounteds& �r�
make_fs_id�*MyCache.checkFreeSpace.<locals>.make_fs_ids)��� '���<�<��,�,�&�&� '�rz/proc/mountszline 'z"' in /proc/mounts not understood (r�NT)r�reversezDir::Cache::archivesr��/usrz/varz/bootz/homez/tmp/zdirectory '%s' does not existszDir z mounted on zFree space on r�zfs_free contains: '%s'z%^linux-(image|image-debug)-[0-9.]*-.*z (new-install) added with z to boot spacegz&additional space for the snapshots: %sz dir '%s' needs '%s' of '%s' (%f)zNot enough free space: %s)r�i )z/tmpiP)r�i�)2�objectr�rB�
ValueErrorr1r�r�r�r�rdr^r�r+r.�realpathr��statvfs�f_bavail�f_frsizer2rr r~r�r��KERNEL_SIZE�INITRD_SIZErr�rw�installed_sizer�r�r�r�rM�size_to_str�float�absrq�bytes�decode�locale�getpreferredencodingr:rrhrHr��values)r#�snapshots_in_user�r��mnt_map�fs_free�mountsr�r�where�options�ar�rt�
archivedirr��fs_id�str��kernel_countr��
space_in_boot�required_for_snapshotsr>�size�
required_list�
free_at_least�free_neededrXr�s&&                           @r�checkFreeSpace�MyCache.checkFreeSpaces����	��	�	�������
�.�
!�
!�V����37�:�:�<�0�Q�q�1���'��N�N�5�)��"�	����d��+��^�^�,�,�-C�D�
��v�v�w�
�G�W�M�A���� � ��#�A��q�M�E��w�w�~�~�a� � ��Z�Z��]���{�{�R�[�[�0����� @�1� D�E�������
�
� �'�%�.�2�3�$�U�^�4��
��
�
� �$�(�)�!"���&�t�_��
�#N�$
��
�
�.��8�9�
���C��x�x�?����J�J��%�%�%��);�);�);��M�M�TW�T\�T\�^i�"j�k� �A�%�L��&��3�(�1�,��;�<�
�"%������$�$�$��'�'�'�3�+<�+<�+<�*�c�m�m�.J�.J�J�*��
�M�M�B�E[�[�\�(�)?�)?�@�#�T�%C�%C�D�#�T�%M�%M�N�2�$�m�4�1�/�#�%;�<��K�S�$��a�x���'�'�"�"�3�'�C��M�M�<��T�7�SV�<�Y`�ad�Ye�Yj�Yj�?k�k�l��C�L����%���C�L����%��%�*�
��C��s�|� � �1�$� '� 3� 3�E�#�g�c�l�>O�>O�:P�QR�:R�4S� T�
��m�U�3�3�$1�$8�$8��3�3�5�%7�M�%�1�1�'�#�,�2C�2C�D���k�5�1�1�"-�"4�"4��3�3�5�#7�K�
2C�;�PZ�[^�P_�an�1o�
�j��o�.�� �}���!��M�M�5��8W��A��Q���8W�W�X�)�$�}�/C�/C�/E�*F�G�G���O"���M�M�UY�[\�"]�^�����	"�
!�
!��R9Xs@�V:�V�V:�V:�<W
�V7	�V2	�+V:�2V7	�7V:�:W	)rcr^rarnr\r�r`r�r�r]r[rlrbrXrYr,rZ)NTNNr<)T)�)F);rr
rrr{r|r"�propertyr�r�rqr�r�r�r�r�r�r�rfr�r�r�r�r�rxr�r�rr
rrrrr"r%r)r/r3r=rErOrYr�ror�r�r�rlrmr�r�r�r�r�r�rprrr'rFs@rrOrO�s������I��M�(J�T�	��	��6F�$�$���$��$��'��'������/��/�
1�!�
_�5�D�B�	 �+�
0��>��<�$��+�
=�
/�p�@.�/�$� r�*	��M��M�^�8�$����6�"O�L�\��.�%��%�N��#�&�PL�LrrO)!rirdr-rr+rr1rVr�rgr~�
subprocessrr�DistUpgradeGettextrrr�utilsrrCr	rrrr8r�r�r�r:rHrjrOr
rr�<module>rs���,���
�	�	������"�,�(� �	�Y�	�	�.�	�	�N�	��I��* �B?�@���[�
B��
B� A�n�A�J�c�i�i�Jr

Youez - 2016 - github.com/yon3zu
LinuXploit