__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

���gy���~�SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKJ	r	J
r
 SSKJr
 "SS\5rg)�N)�PIPE�Popen�)�gettextc���\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSr
SrS
rSrSrSrSrSrSrSrSrSrSrSrSrSrSrSrSrS'Sjr S'Sjr!S r"S!r#S"r$S#r%S$r&S%r'g&)(�DistUpgradeQuirks�$a�
This class collects the various quirks handlers that can
be hooked into to fix/work around issues that the individual
releases have.

The following handlers are supported:
- PreCacheOpen: run *before* the apt cache is opened the first time
                to set options that affect the cache
- PostInitialUpdate: run *before* the sources.list is rewritten but
                     after an initial apt-get update
- PreDistUpgradeCache: run *right before* the dist-upgrade is
                       calculated in the cache
- PostDistUpgradeCache: run *after* the dist-upgrade was calculated
                        in the cache
- StartUpgrade: before the first package gets installed (but the
                download is finished)
- PostUpgrade: run *after* the upgrade is finished successfully and
               packages got installed
- PostCleanup: run *after* the cleanup (orphaned etc) is finished
c���XlURUlX l[SS/[SS9R5SR
5UlSUlSUl	SUl
SUlSUlg)N�unamez-rT)�stdout�universal_newlinesrF)
�
controller�_view�configrr�communicate�stripr�extra_snap_space�_poke�_snapstore_reachable�
_snap_list�_did_change_font)�selfrrs   �?/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeQuirks.py�__init__�DistUpgradeQuirks.__init__:so��$���%�%��
����G�T�?�4�.2�4�4?�K�M�!�E�EJ�U�W�	
�
� !�����
�$)��!���� %���c��URR(a[R"S5 g[R"S5 UR5 g)z2run before the apt cache is opened the first time �)not running quirks in partialUpgrade modeNzrunning Quirks.PreCacheOpen)r�_partialUpgrade�logging�info�debug�_add_apport_ignore_list�rs r�PreCacheOpen�DistUpgradeQuirks.PreCacheOpenGs:���?�?�*�*��L�L�D�E���
�
�3�4��$�$�&rc�x�URR(a[R"S5 g[R"S5 UR5 URRnURU5 UR5 SU;a[R"S5 gUSR(aX[RRS5(d$[RRS5(aUR5 UR(aUR5 gg)z1run after the apt cache is opened the first time rNz running Quirks.PostInitialUpdate�snapd�'package required for Quirk not in cachez/run/snapd.socketz/run/snapd-snap.socket)rrr r!r"�_test_and_fail_on_tpm_fde�cache�_test_and_warn_if_ros_installed�#_maybe_prevent_flatpak_auto_removal�is_installed�os�path�exists�_checkStoreConnectivityr�_calculateSnapSizeRequirements�rr+s  r�PostInitialUpdate�#DistUpgradeQuirks.PostInitialUpdateRs����?�?�*�*��L�L�D�E���
�
�8�9��&�&�(����%�%���,�,�U�3��0�0�2��%���M�M�C�D����>�&�&������ 3�4�4������ 8�9�9��(�(�*��$�$��/�/�1�%rc��URR(a[R"S5 g[R"S5 URR
nSU;a[R"S5 gUSR(a!UR(aUR5 SU;a$USR(aUR5 SU;a&USR(aUR5 ggg)Nrzrunning Quirks.PostUpgrader(r)zubuntu-desktop-raspizubuntu-server-raspi)rrr r!r"r+r.r�_replaceDebsAndSnaps�_replace_fkms_overlay�_add_kms_overlayr4s  r�PostUpgrade�DistUpgradeQuirks.PostUpgradeos����?�?�*�*��L�L�D�E���
�
�2�3����%�%���%���M�M�C�D����>�&�&�����%�%�'�!�U�*��+�,�9�9��*�*�,� �E�)��*�+�8�8��%�%�'�9�*rc�H�URR(a[R"S5 g[R"S5 UR5 [R"SS/5 g![a#n[R"SU35 SnAgSnAff=f)Nrzrunning Quirks.PostCleanup�snap�refreshzFailed to refresh snaps : )	rrr r!r"�_remove_apport_ignore_list�
subprocess�
check_call�	Exception)r�es  r�PostCleanup�DistUpgradeQuirks.PostCleanup�sz���?�?�*�*��L�L�D�E����
�
�2�3��'�'�)�	<��!�!�6�9�"5�6���	<��M�M�6�q�c�:�;�;��	<�s�A4�4
B!�>B�B!c�b�URR(a[R"S5 g[R"S5 URR
nUR
5 UR5 UR5 UR5 URU5 g)Nrzrunning Quirks.StartUpgrade)rrr r!r"r+�_removeOldApportCrashes�_killUpdateNotifier�_pokeScreensaver�_set_generic_font�_disable_kdump_tools_on_installr4s  r�StartUpgrade�DistUpgradeQuirks.StartUpgrade�sy���?�?�*�*��L�L�D�E���
�
�3�4����%�%���$�$�&�� � �"�������� ��,�,�U�3rc���URR(a[R"S5 g[R"S5 UR5 UR
5 g)z.run right before calculating the dist-upgrade rNz"running Quirks.PreDistUpgradeCache)rrr r!r"�_maybe_remove_gpg_wks_server�_install_linux_sysctl_defaultsr$s r�PreDistUpgradeCache�%DistUpgradeQuirks.PreDistUpgradeCache�sF���?�?�*�*��L�L�D�E���
�
�:�;��)�)�+��+�+�-rc��URR(a[R"S5 g[R"S5 UR5 g)z'run after calculating the dist-upgrade rNz#running Quirks.PostDistUpgradeCache)rrr r!r"�_install_linux_metapackager$s r�PostDistUpgradeCache�&DistUpgradeQuirks.PostDistUpgradeCache�s:���?�?�*�*��L�L�D�E���
�
�;�<��'�'�)rc���[5nSH+nUR[R"SU-55 M- SnUH\nU(a OTUHJnUR	UR
5(dM%UR(dUR(aSn MZ M^ U(aQURR[S5[S55nU(dURR5 ggg)z�
Test and warn if ROS is installed. A given ROS release only
supports specific Ubuntu releases, and can cause the upgrade
to fail in an overly-cryptic manner.
)�catkinzrosboost-cfg�roscleanzros-environmentz
ros-workspacez
ros-[^\-]+-%sFTz-The Robot Operating System (ROS) is installeda	It appears that ROS is currently installed. Each ROS release is very strict about the versions of Ubuntu it supports, and Ubuntu upgrades can fail if that guidance isn't followed. Before continuing, please either uninstall ROS, or ensure the ROS release you have installed supports the version of Ubuntu to which you're upgrading.

For ROS 1 releases, refer to REP 3:
https://www.ros.org/reps/rep-0003.html

For ROS 2 releases, refer to REP 2000:
https://www.ros.org/reps/rep-2000.html

Are you sure you want to continue?N)
�set�add�re�compile�match�namer.�marked_installr�askYesNoQuestion�_r�abort)rr+�ros_package_patterns�package_name�ros_is_installed�pkg�pattern�ress        rr,�1DistUpgradeQuirks._test_and_warn_if_ros_installed�s��� #�u��!�L�
!�$�$��
�
�+�l�:�;�
=�
!�!���C���/���=�=����*�*��'�'�3�+=�+=�+/�(��	0�	���*�*�-�-��A�B��7�8�
9�C�����%�%�'��rc�Z�SnSURR;agURRSR(dg[RRS5(dgSHZn[R"SU/[RS9nURRS5R5(dMXSn O [R"S	RU(aS
OS55 U(dgURRSRSS9 S
H�nX@RR;aMURRUR(dMH[R"SRU55 URRURSS9 M� URRR!UR"R%5UR"R'URR55 g)z�
If flatpak is installed, and there are either active remotes, or
flatpak apps installed, prevent flatpak's auto-removal on upgrade.
F�flatpakNz/usr/bin/flatpak)�remotes�list)r�utf-8Tz-flatpak will{}be marked as manually installed� z NOT )�auto)zplasma-discover-backend-flatpakzgnome-software-plugin-flatpakz'{} will be marked as manually installed)rr+r.r/r0r1rA�runrr�decoderr r"�format�	mark_auto�commitr�getAcquireProgress�getInstallProgress)r�prevent_auto_removal�subcmd�rrhs     rr-�5DistUpgradeQuirks._maybe_prevent_flatpak_auto_removal�s���
 %���D�O�O�1�1�1�����$�$�Y�/�<�<���w�w�~�~�0�1�1��)�F����'��0�%�?�?��A��x�x���w�'�-�-�/�/�'+�$��*�	�
�
�E��v�%9�c�w�G�	I�$�������i�(�2�2��2�>�5�C��/�/�/�/�/���?�?�(�(��-�:�:���M�M�C�!�6�#�;�
(��O�O�!�!�#�&�0�0�e�0�<�5�	
�����$�$��J�J�)�)�+��J�J�)�)�$�/�/�*?�*?�@�	
rc�b�SS/nSn[R"[RRU5SS9 [	US5nUHnURUS35 M SSS5 g!,(df   g=f![a&n[R"SUS	U35 SnAgSnAff=f)
Nz/usr/libexec/tracker-extract-3z!/usr/sbin/update-apt-xapian-index�2/etc/apport/blacklist.d/upgrade-quirks-ignore-listT��exist_ok�w�
zFailed to create �: )	r/�makedirsr0�dirname�open�writerCr r")r�ignore_listr0�f�binrDs      rr#�)DistUpgradeQuirks._add_apport_ignore_lists���,�/�
��
D��	;��K�K�������-��=��d�C��A�&�C��G�G�s�e�2�J�'�'�!�����	;��M�M�-�d�V�2�a�S�9�:�:��	;�s5�>A>�A-�$A>�-
A;�7A>�;A>�>
B.�B)�)B.c��Sn[R"U5 g![a&n[R"SUSU35 SnAgSnAff=f)NrzFailed to remove r�)r/�removerCr r")rr0rDs   rr@�,DistUpgradeQuirks._remove_apport_ignore_list/sD��C��	;��I�I�d�O���	;��M�M�-�d�V�2�a�S�9�:�:��	;�s��
A�A�Ac��[RRS5(a/[R"S5 [
R"/SQ5 gg)zkill update-notifierz/usr/bin/killallzkilling update-notifier)�killallz-qzupdate-notifierN)r/r0r1r r"rA�callr$s rrI�%DistUpgradeQuirks._killUpdateNotifier7s7���7�7�>�>�,�-�-��M�M�3�4��O�O�@�A�.rc��[RRS5(a�[RR	S5(a^[
R"S5 SnUS-
nUS-
n[R"USS9Ul	[R"UR5 ggg![[4a [
R"S	5 gf=f)
Nz/usr/bin/xdg-screensaver�DISPLAYz$setup poke timer for the screensaverzwhile true;z3 do /usr/bin/xdg-screensaver reset >/dev/null 2>&1;z sleep 30; doneT��shellz failed to setup screensaver poke)r/r0r1�environ�getr r"rArr�atexit�register�_stopPokeScreensaver�OSError�
ValueError�	exception)r�cmds  rrJ�"DistUpgradeQuirks._pokeScreensaver>s����G�G�N�N�5�6�6��
�
���y�)�)��M�M�@�A��C��H�H�C��$�$�C�
F�'�-�-�c��>��
����� 9� 9�:�*�
7���Z�(�
F��!�!�"D�E�
F�s�,:B)�)&C�Cc���SnURb<URR5 URR5nSUlU$![a [R
"S5 N+f=f)NFzfailed to stop screensaver poke)r�	terminate�waitr�r r�)rrjs  rr��&DistUpgradeQuirks._stopPokeScreensaverKsg�����:�:�!�
E��
�
�$�$�&��j�j�o�o�'���D�J��
���
E��!�!�"C�D�
E�s�4A� A1�0A1c	�"�SHXn[R"SU-5H8n[R"SU<SU<S35 [R"U5 M: MZ g![
a#n[R"SU-5 SnAgSnAff=f)z9remove old apport crash files and whoopsie control files )z.crashz.uploadz	.uploadedz/var/crash/*%sz
removing old z file '�'z+error during unlink of old crash files (%s)N)�globr r"r/�unlinkrC�warning)r�extr�rDs    rrH�)DistUpgradeQuirks._removeOldApportCrashesVsp��	O�9�����#3�c�#9�:�A��M�M��a�"H�I��I�I�a�L�;�:���	O��O�O�I�A�M�N�N��	O�s�AA!�!
B�+B	�	Bc�@�Sn[RR5nSUS'[/SQ[[USS9R5n[R"S	US
[R5(aSUl	g[R"SUS
[R5(Ga[R"S5 SnURRnS
U;aYUS
R (aEUS
R"R$R'S5(d[R"S5 SnU(aL[)S5n[)S5nUR*RXx5 URR-5 O�UR*R/[)S5[)S55nO�SUS;aE[R"S5 UR*R/[)S5[)S55nO8SUS;aSn[R"S5 O[R"S5 U(dURR-5 gg![a*n[R"SU35 SUl	SnAgSnAff=f)z9check for connectivity to the snap store to install snapsFzC.UTF-8�LANG)r>r"�connectivityT)r�stderr�envr
z8Failed to check snap store connectivity, assuming none: Nz	^ \* PASSrz^ \*.*unreachablezNo snap store connectivity�lxdz1:zlxd is installedz#Connection to the Snap Store faileda�You have the package lxd installed but your system is unable to reach the Snap Store. lxd is now provided via a snap and the release upgrade will fail if snapd is not functional. Please make sure you're connected to the Internet and update any firewall or proxy settings as needed so that you can reach api.snapcraft.io. If you are an enterprise with a firewall setup you may want to configure a Snap Store proxy.zConnection to Snap Store failedz�Your system does not have a connection to the Snap Store. For the best upgrade experience make sure that your system can connect to api.snapcraft.io.
Do you still want to continue with the upgrade?zerror: unknown commandrz snap debug command not availablezOutdated snapd packagez�Your system does not have the latest version of snapd. Please update the version of snapd on your system to improve the upgrade experience.
Do you still want to continue with the upgrade?zerror: access deniedzNot running as root!z-Unhandled error connecting to the snap store.)r/r��copyrrrrCr r"rr]�search�	MULTILINE�errorrr+r.�	candidate�version�
startswithrcrrdrb)	rrj�snap_env�	connectedrD�old_lxd_deb_installedr+�summary�msgs	         rr2�)DistUpgradeQuirks._checkStoreConnectivity`s$�����:�:�?�?�$��$����		��?��%)�x�15�7�7B�{�}�
��9�9�\�9�Q�<����>�>�(,�D�%��
�Y�Y�+�Y�q�\�2�<�<�
H�
H��M�M�6�7�$)�!��O�O�)�)�E���~���<�,�,��e��.�.�6�6�A�A�$�G�G��M�M�"4�5�,0�)�$��A�B���	.�
���
�
� � ��.����%�%�'��j�j�1�1��7�8��H�I���&��1��
5��M�M�<�=��*�*�-�-��*�+��D�E��C�$�y��|�
3��C��M�M�0�1��M�M�I�J���O�O�!�!�#���y�	��M�M�J�1�#�N�
�).�D�%���	�s�%I)�)
J�3 J�Jc	�<�SSKnSSKnSSKJn UR	5 UR
R
[S55 URR5GH	upEUSS:waMSSUSUS	S
.n/U/S.nURRS[URU5S
S9S9nURSS5 URSS5 URSURR 5 URR#U5R%5n	UR'U	5n
[)U
SSSSS5nU=R2U-
slGM g![*U[,4a [.R0"SU-5 GM=f=f)Nr)�URLErrorz"Calculating snap size requirements�command�installzupgrade-size-check�download�snap-id�channel)zinstance-key�actionr�r�)�context�actionsz)https://api.snapcraft.io/v2/snaps/refreshrp��encoding)�url�datazSnap-Device-Series�16zContent-typezapplication/jsonzSnap-Device-Architecture�resultsr>�sizezFailed fetching size of snap %s)�json�urllib.request�urllib.errorr��_prepare_snap_replacement_datar�updateStatusrcr�items�request�Request�bytes�dumps�
add_headerr�arch�urlopen�read�loads�int�KeyErrorr�r r"r)rr��urllibr�r>�snap_objectr�r��req�responser!r�s            rr3�0DistUpgradeQuirks._calculateSnapSizeRequirements�s�����)�
	
�+�+�-�	
�
�
����"F� G�H�!%���!6�!6�!8��D��9�%��2�� 4�$�&�y�1�&�y�1�	�F��"�8��D��.�.�(�(�?��4�:�:�d�+�g�>�)�@�C�
�N�N�/��6��N�N�>�+=�>��N�N�5�t���7K�7K�L�
�!�>�>�1�1�#�6�;�;�=���z�z�(�+���4�	�?�1�-�f�5�j�A�&�I�J��
�!�!�T�)�!�!�5"9��.�h�
�3�
��
�
�?�$�F�G��
�s�=AE,�,*F�Fc���URR[S55 URR	5GHlupUSnUS:Xa3USnURR[SU-55 SUSXA/nOcUS:Xa,URR[S	U-55 SX1/nO1URR[S
U-55 SUSUSU/nURR5 [R"U[RSS9nURR5 URS:Xa[R"U<S
U<S35 US:XdGM7US(dGMDURRRUS5 GMo g![Ra# [R"U<S
U<S35 GM�f=f)z>install a snap and mark its corresponding package for removal zProcessing snap replacementsr��switchr�zswitching channel for snap %sr>z	--channelr�zremoving snap %szinstalling snap %sT)r�checkz	 of snap z failedrz
 succeededr��debN)rr�rcrr��
processEventsrArsr�CalledProcessErrorr r"�
returncoder�forced_obsoletes�append)rr>r�r�r��	popenargs�procs       rr8�&DistUpgradeQuirks._replaceDebsAndSnaps�s����
�
����"@� A�B�"&���!6�!6�!8��D�!�)�,�G��(�"�%�i�0���
�
�'�'��5��<�=��$�W�k�7�I�	��H�$��
�
�'�'��*<�t�*C�(D�E�#�W�3�	��
�
�'�'��*>��*E�(F�G�#�W�(�+�i�*@�$�H�	�	
��
�
�(�(�*�!�~�~��%�?�?�� ���
�
�(�(�*����!�#��
�
�7�D�I�J��)�#��E�(:�(:����0�0�7�7��E�8J�K�;"9��.�0�0�
��
�
���F�G��
�s�'AF1�12G(�'G(c��[R"S5nURU5nURU5nU(aUU(aNURS5<SURS5<3nURS5<SURS5<3n[R
"SU<SU<35 [RRX5S:�$)z"copied from ubuntu-drivers common z(.+)-([0-9]+)-(.+)r�-�z
Comparing z with r)	r]r^r_�groupr r"�apt�apt_pkg�version_compare)r�term1�term2ri�match1�match2s      r�_is_greater_than�"DistUpgradeQuirks._is_greater_than�s����*�*�1�2�����u�%�����u�%���f�%�|�|�A��%�|�|�A��0�E�%�|�|�A��%�|�|�A��0�E�	�
�
��u�=�>��{�{�*�*�5�8�1�<�<rc	��U=(a S=(d Sn[R"S5n[R"S5nSnSnUGH1nSUR;dMSUR;dM(UR(dUR(dMLURUR5n	U	(dMpURRSn
U	RS5<S	U	RS
5<3nURUU5(dM�UnURU
5nSU
;a6U(a/SU<S	U	RS
5<S	URS5<3nGMSU<S	U	RS
5<3nGM4 U$)zMGet the linux headers or linux metapackage
copied from ubuntu-drivers-common
z-headers�zlinux-image-(.+)-([0-9]+)-(.+)z
linux-(.+)zlinux-image�extra�Sourcerr�r�z-lts-�linux�)
r]r^r`r.rar_r��recordr�r�)
rr+�headers�suffixri�source_pattern�metapackager�rhr_�source�current_version�match_sources
             r�_get_linux_metapackage�(DistUpgradeQuirks._get_linux_metapackages;���'�Z�-�2���*�*�=�>�����L�1�������C�����)�g�S�X�X�.E��%�%��);�);�);��
�
�c�h�h�/���5� �]�]�1�1�(�;�F�16���Q��16���Q��'A�O��,�,�_�-4�6�6�"1��'5�';�';�F�'C��"�f�,��,2�+0�;�;�q�>�+7�+=�+=�a�+@�+B�K��,2�+0�;�;�q�>�+;�K�C�H�rc��URRnURUS5nX!;a[R"SU-5 gXR
(d-[R"SU-5 SnUR
X#5 gg)zZEnsure the linux metapackage is installed for the newest_kernel
installed. (LP: #1509305)
Fz$linux metapackage (%s) not availableNz installing linux metapackage: %sz8linux metapackage may have been accidentally uninstalled)rr+rr r!r.�mark_install)rr+�linux_metapackage�reasons    rrU�,DistUpgradeQuirks._install_linux_metapackage4s������%�%�� �7�7��u�E���)��L�L�?�*�+�
,���'�4�4��L�L�;�*�+�
,�O�F����0�9�	5rc�(�URR(dw[RRRS5(dHSnUS-
n[R"U5 [RRRSS5 ggg)zHensure that on a desktop install recommends are installed
(LP: #759262)
zApt::Install-Recommendsz%Apt::Install-Recommends was disabled,z! enabling it just for the upgrade�1N)	r�
serverModer�r�r�find_br r�r[)rr�s  r�+ensure_recommends_are_installed_on_desktops�=DistUpgradeQuirks.ensure_recommends_are_installed_on_desktopsGso�����)�)��;�;�%�%�,�,�-F�G�G�=���:�:������$����"�"�&�&�'@�#�F�	H�*rc��URSS5n[U[5(dU/nUHMnX0RR;aMU(a(URRUR
SLaMM g g)zsHelper function that checks if the given deb2snap entry
has at least one metapkg which is installed on the system.
�metapkgNFT)r��
isinstancerorr+r.)r�deb2snap_entry�metapkg_listrs    r�_is_deb2snap_metapkg_installed�0DistUpgradeQuirks._is_deb2snap_metapkg_installedRsr��&�)�)�)�T�:���,��-�-�(�>�L�#�G��o�o�3�3�3����O�O�)�)�'�2�?�?�5�H���$�rc�*�SSKn0n0n[RR[RR	[RR[55S5n[US5nURUR55nSSS5 WSH�nUSUnURU5(dM#URSS5n	URSS5RURRS9n
URS	S
5RURRS9nURSS
5nX�X�4X''M� USHmnUSUn
U
RSS5n	URU
5(dM5WRSS5RURRS9n
X�4X7'Mo X#4$!,(df   GND=f![ a%n["R$"SU-5 SnAX#4$SnAff=f)Nrz
deb2snap.jsonr|�seededr��from_channelzstable/ubuntu-{FROM_VERSION})�FROM_VERSION�
to_channelzstable/ubuntu-{TO_VERSION})�
TO_VERSION�force_switchF�unseededz%error reading deb2snap.json file (%s))r�r/r0�joinr��abspath�__file__r�r�r�r r�rur�fromVersion�	toVersionrCr r�)rr��seeded_snaps�unseeded_snaps�
deb2snap_pathr��d2sr>�seedr��	from_chan�to_chanr(�unseedrDs               r�_parse_deb2snap_json�&DistUpgradeQuirks._parse_deb2snap_jsones�������-	I��G�G�L�L������������ 9�:���M��m�S�)�Q��j�j�����*��*��H�
���8�}�T�*���:�:�4�@�@���h�h�u�d�+��
!�H�H�"�2���&�!%���!<�!<�����(�(� �0���&�#���8�8���� $�x�x���>��&)�g�%L��"�-&�0�J����Z���.���j�j���-���:�:�6�B�B�� �H�H�"�2���&�!%���!<�!<����),�'7��$�(��+�+�U*�)��N�	I��O�O�C�a�G�H�H��+�+��	I�s1�A*G#�4 G�D:G#�
G �G#�#
H�-H
�
Hc	��	�0UlUR5upSn[R"SS/S[RS9R5nU(a�USR
S5SS	Vs/sHnUR
5SPM nnUHEnXa;dXb;aMS
SURR3SURR3S4X'MG URR[S
55 UR5GH�upgUup�p�0n[R"SSU/S[RS9R5n
URR5 [R "SU
S[R"5(ar[$R&"SU-5 [R "SU	-U
S[R"5(d"[$R&"SU-5 U(dM�SUS'O�URR(nU(a:X�;dX�R*(d"[$R&"SU<SU<S35 GMS[R "SU
S5nU(d[$R&"SU-5 GM�SUS'X�S'USUS'X�S'X�RU'GM� UR5GH�unup�0n[R"SSU/S[RS9R5n
URR5 [R "SU
S[R"5(dM�[$R&"SU-5 [R "SU	-U
S[R"5(d[$R&"SU-5 M�SUS'[R"SSU/S[RS9R5nURR5 USR
S5H�nUR
5n[-U5S :waM$USnUS!nUR/US"-5(dMIUR
S"5SnUS#:wdMeUU;dMm[$R&"S$U<S%U<S&35 SUS'S'US' O X�RU'GM UR$s snf)(z�Helper function fetching all required info for the deb-to-snap
migration: version strings for upgrade (from and to) and the list
of snaps (with actions).
rr>roT)r
rrr�r���Nzstable/ubuntu-FzChecking for installed snapsr!z^installed: zSnap %s is installedz^tracking:.*%sz+Snap %s is not tracking the release channelr�r�zDeb package z) is not installed. Skipping snap package z
 installationzsnap-id:\s*(\w*)z'Could not parse snap-id for the %s snapr�r�r�r�r��connections�r��:r�zSnap z is being used by z. Switching it to stable track�stable)rr7rArrr�splitrr-r.rr�rcr�r�r]r�r�r r"r+r.�lenr�)rr/r0�	snap_list�line�snaps_installedr>�propsr�r$r&r(r��	snap_infor+r_�conns�conn�	conn_cols�plug�slot�	plug_snaps                      rr��0DistUpgradeQuirks._prepare_snap_replacement_data�ss��
���'+�'@�'@�'B�$���	��$�$�f�f�%5�8<�,6�O�O�=�=H�[�]�	��,5�Q�<�+=�+=�d�+C�A�b�+I�K�+I�4� $�z�z�|�A��+I�
�K�(���'�4�+A���(����)D�)D�(E�F�(����)B�)B�(C�D��	*�L�&�	(�	
�
�
����"@� A�B�'�-�-�/�K�D�<A�9�S�
��K�"�(�(�&�&�$�)?�<@�0:���A�AL���
�
�J�J�$�$�&��y�y��)�A�,����E�E��
�
�4�t�;�<��y�y�!2�\�!A�!*�1��r�|�|�=�=��M�M�"O�$(�#)�*�(�!�)1��I�&����-�-���S�-�U�Z�5L�5L��M�M�DG��#O�P���	�	�"5�y��|�D����M�M�"K�$(�#)�*��)2��I�&�%(�E�"�).�q���I�&�%/�	�"�$/�O�O�D�!�O0�P*8�)=�)=�)?�%�D�%�3��K�"�(�(�&�&�$�)?�<@�0:���A�AL���
�
�J�J�$�$�&��y�y��)�A�,����E�E��
�
�4�t�;�<��y�y�!2�\�!A�!*�1��r�|�|�=�=��M�M�"O�$(�#)�*��)1��I�&�#�(�(�&�-��)F�<@�0:���A�AL�����
�
�(�(�*�!�!�H�N�N�4�0�D� $�
�
��I��9�~��*� �$�Q�<�D�$�Q�<�D����t�c�z�2�2�$(�J�J�s�O�A�$6�	�$��+�$�N�:�#�M�M�-1�9�+>�?�6>�K�	�2�5=�K�	�2�!�!1�$)4����%�U*@�V�����EKs�0S&c��US-n[USSS9nURU5 SSS5 [USSS9nURU5 SSS5 g!,(df   N5=f![a"n[R"SWXt5 SnAgSnAff=f!,(df   g=f![a"n[R"SX7U5 SnAgSnAff=f)Nz.distUpgrader�rpr�z0unable to write boot config backup to %s: %s; %sz-unable to write new boot config to %s: %s; %s)r�r��IOErrorr r�)r�
old_config�
new_config�boot_config_filename�failure_action�boot_backup_filenamer��excs        r�_replace_pi_boot_config�)DistUpgradeQuirks._replace_pi_boot_configs���	�#7�.�#H� ��*�C�'�B�a����
�#�C�	E��*�C�'�B�a����
�#�C�B�C�B���	��M�M�L�.��
E���	��
C�B���	E��M�M�I�.�^�
E�
E��	E�sg�A$�A�A$�B$�B�
B$�
A!�A$�!A$�$
B�.B�B�
B!�B$�!B$�$
C�.C�Cc��Sn[RRUS5n[USSS9nUR	5nSSS5 SRSWRS	S
955nXe:Xa[R"SU5 gURXVX25 g!,(df   Nc=f![
a [R"SWU5 gf=f)NzfYou may need to replace the vc4-fkms-v3d overlay with vc4-kms-v3d in config.txt on your boot partition�
config.txtr|rpr��+failed to open boot configuration in %s; %src3��# �UHdnURS5(aSU-URSS5-O0URS5(dUR5S:XaSU-OUv� Mf g7f)zdtoverlay=vc4-fkms-v3dz0# changed by do-release-upgrade (LP: #1923673)
#�dtoverlay=vc4-kms-v3dzgpu_mem=z	start_x=1z1# disabled by do-release-upgrade (LP: #1923673)
#N)r��replace�rstrip��.0rBs  r�	<genexpr>�:DistUpgradeQuirks._replace_fkms_overlay.<locals>.<genexpr>.sz���
�>�����7�8�8�
@�$�F��L�L�1�3J�K�
L����z�*�*�d�k�k�m�{�.J�
A�4�G��	
�>�s�A,A.T)�keependsz3no fkms overlay or camera firmware line found in %s)r/r0r*r�r��FileNotFoundErrorr r��
splitlinesr�rU)r�boot_dirrRrQr��boot_configrPs       rr9�'DistUpgradeQuirks._replace_fkms_overlay s���
?�	�	�#%�7�7�<�<��,�#G� ��*�C�'�B�a��f�f�h��C��W�W�
�$�.�.��.�=�
�
�
� �$��O�O�$�%9�
;���$�$��%9�	K�7C�B�� �	��M�M�G�.��
@��	�s.�+B.�B�B.�
B+�'B.�+B.�."C�Cc�&^
^�Sn/SQm
[RRUS5n[USSS9nUR	5nSSS5 SmU
U4S	jnWR5Vs/sHowR5PM nnU"U5nS
RSU55n	X�:Xa[R"SU5 gURXYX25 g!,(df   N�=f![
a [R"SWU5 gf=fs snf)
NzbYou may need to add dtoverlay=vc4-kms-v3d to an [all] section in config.txt on your boot partition)z,# added by do-release-upgrade (LP: #2065051)r[zdisable_fw_kms_setup=1rz[pi3+]�dtoverlay=vc4-kms-v3d,cma-128rz[pi02]rir�[all]rXr|rpr�rYc�D�SnSn[U5H�up4UR5nU(akUnURS5(aUs $URS5(aURS5(aUS:HnMkURS5(aSnM�M�US:HnM� U$)	NTrr[�[�]rjzinclude F)�	enumerater]r��endswith)�lines�in_all�last�indexrBs     r�find_insertion_point�@DistUpgradeQuirks._add_kms_overlay.<locals>.find_insertion_point_s����F��D�(��/����{�{�}��� �D����'>�?�?�#������-�-�$�-�-��2D�2D�!%��������4�4�"'��	5�"�W�_�F� 0� �Krc�x>�T"U5nXRS5(aU$TXU&U$![a Nf=f)Nr[)r��
IndexError)rp�insert_point�added_linesrts  ��r�add_kms_overlay�;DistUpgradeQuirks._add_kms_overlay.<locals>.add_kms_overlaywsW���/��6�L�
��&�1�1�2I�J�J� �L�K�
0;�E�|�,��L��	�
��
�s�,�
9�9rc3�*# �UH	oS-v� M g7f)r�N�r^s  rr`�5DistUpgradeQuirks._add_kms_overlay.<locals>.<genexpr>�s���;�U�T�D�[�U�s�z)no addition of KMS overlay required in %s)r/r0r*r�r�rcr r�rdr]r�rU)rrerRrQr�rfrzrBrprPryrts          @@rr:�"DistUpgradeQuirks._add_kms_overlayEs���
3�	�
��	�#%�7�7�<�<��,�#G� ��*�C�'�B�a��f�f�h��C�	�0		�,7�+A�+A�+C�D�+C�4����+C��D���&���W�W�;�U�;�;�
��$��O�O�G�0�
2���$�$��%9�	K�eC�B�� �	��M�M�G�.��
@��	��PEs4�+C&�C�C&�*D�
C#�C&�#C&�&"D�
Dc��SnUR(agURRSS5S;agURR5c[R
"S5 gSnURRSS5R
S	5nS
U;dSU;aSnOS
U;aSn[[/SQ5[U5-5nURRSSUS/[RSS9nURRS5RS5upgnU=(d Sn[U5 [R
"SUSUSUSUS3	5 URRSSUSSUSUS3/5nUR"S:wa[R
"SUSU35 gS Ul[$R&R)URR+5S!5n	[$R,"[$R&R/U	5S S"9 [0R2"U	5R5S#S$9 [$R6"U	URR5URR955 U(amS%n
[$R,"[$R&R/U
5S S"9 S&n[;U
S'5nUR=S(US)US*USUS+US,35 SSS5 gS-n
[$R,"[$R&R/U
5S S"9 [;U
S'5nUR=S.US/USUS035 SSS5 URR?S1/5 URR?S2[$R&RAU
5/5nUR"S:wa8[R
"S3[$R&RAU
5S435 gg![ a SnGN�f=f!,(df   g=f!,(df   N�=f)5z�Due to changes to the Ubuntu font we enable a generic font
(in practice DejaVu or Noto) during the upgrade.
See https://launchpad.net/bugs/2034986
�SansN�XDG_SESSION_TYPEr)r�ttyz3Cannot determine non-root UID, will not change fontzorg.gnome.desktop.interface�XDG_CURRENT_DESKTOPr=�MATE�UKUIzorg.mate.interface�
X-Cinnamonzorg.cinnamon.desktop.interface)�Budgie�LXQtr�r�r��XFCEz/usr/bin/gsettingsr�z	font-namerp)rr�z'
rq�Ubuntu�11zSetting generic font z& during the upgrade. Original font is �.r[�"rzFailed to change font to Tz!.config/upgrade-need-font-restorer�i�)�modez//etc/xdg/autostart/upgrade-restore-font.desktopz'$HOME/.config/upgrade-need-font-restorer�z�[Desktop Entry]
Name=Restore font after upgrade
Comment=Auto-generated by ubuntu-release-upgrader
Type=Application
Exec=sh -c 'if [ -e "z" ]; then gsettings set z font-name "z	";rm -f "z"; fi'
NoDisplay=true
z2/usr/lib/systemd/user/upgrade-restore-font.servicez�# Auto-generated by ubuntu-release-upgrader
[Unit]
Description=Restore font after upgrade
After=graphical-session.target dconf.service
ConditionPathExists=%h/.config/upgrade-need-font-restore

[Service]
Type=oneshot
ExecStart=/usr/bin/gsettings set z font-name 'zm'
ExecStart=/usr/bin/rm -f %h/.config/upgrade-need-font-restore

[Install]
WantedBy=graphical-session.target
z
daemon-reload�enablezFailed to enable z%. Font will not be restored on reboot)!rr�get_user_env�get_user_uidr r"r?�boolr[�run_as_userrArrr�
rpartitionr�r�r�r/r0r*�
get_user_homer�r��pathlib�Path�touch�chown�get_user_gidr�r��systemctl_as_user�basename)r�	temp_font�schema�desktops�
use_autostartr|�fontrcr��need_font_restore_file�autostart_file�flagr��	unit_files              rrK�#DistUpgradeQuirks._set_generic_font�s���
�	�� � ���?�?�'�'�(:�B�?�;�N�
��?�?�'�'�)�1��M�M�E�
�
�.���?�?�/�/�!�2�
�
�%��*�	�
�X���8�!3�)�F�
�X�
%�5�F���H�I��(�m�
�
�
�

�O�O�'�'�
!�5��x�+�
'��?�?��	
(�
���(�(�.�.��0�;�;�C�@���$���x��	���I�	�
�
�-�i�[��$��@3�37�&��$��q�B�	C�
�O�O�'�'� �%�F�8��1�Y�K�q���a�0�)
�
��
�<�<�1���M�M�5�i�[��$��H�I�� $���"$������O�O�)�)�+�/�"
��	���B�G�G�O�O�$:�;�d�K����+�,�2�2��2�>�
���"��O�O�(�(�*��O�O�(�(�*�	
��N�N��K�K�������7�$�G�<�D��n�c�*�a����-�.2�F�2J��h�l�4�&��$��8�"�V�$'�
'�	�+�
�I�	�
���B�G�G�O�O�I�.��>�
�)�S�
!�Q�
�G�G�4��(�-��v�Q�t�f�56�6�
�"�&	
���)�)�?�*;�<��O�O�-�-�
�r�w�w�'�'�	�2�3�
��
�<�<�1���M�M�-�b�g�g�.>�.>�y�.I�-J�K@�@�
A���a�	��D�	��D+�*�
��"�
!�s*�5P�"P�P/�P�P�
P,�/
P=c�\�URRRnUSR(dgUSRnUVVs/sH%u p4UR
R(dM#UPM' nnn[U5(d�[R"S5 URRSRSS9 [R"URR5RURRS5 ggs snnf![a gf=f)ze
Prevent postfix from being unnecessarily installed, and leading to a
debconf prompt (LP: #2060578).
zgpg-wks-serverNzmail-transport-agentzENo mail-transport-agent installed, marking gpg-wks-server for removalF��auto_fix)rr+�_cache�current_ver�
provides_list�
parent_pkgr��anyr r!�mark_deleter��ProblemResolver�protect)rr+�provides_mtarc�ver�
installed_mtas      rrP�.DistUpgradeQuirks._maybe_remove_gpg_wks_servers�����%�%�,�,��	��)�*�6�6�� �!7�8�F�F�L�%1��%1�	��1��>�>�-�-��\�
���=�!�!��L�L�5�
�

�O�O�!�!�"2�3�?�?��?�O������� 5� 5�6�>�>����%�%�&6�7�
�"�����	��	�s.�D�D�"D�1D�7D�D�
D+�*D+c��[RRS5(a�SURR;a�URRSR
(a�[R"S5 [R"5nURURR5=(d SnURR[SU35[S55 URR5 gggg)z
LP: #2065229
z/snap/pc-kernelzubuntu-desktop-minimalzDetected TPM FDE systemznext releasez%Sorry, cannot upgrade this system to z�Upgrades for desktop systems running TPM FDE are not currently supported. Please see https://launchpad.net/bugs/2065229 for more information.N)r/r0r1rr+r.r r"�distro_info�UbuntuDistroInfor��toDistrr�rcrd)r�dir�s   rr*�+DistUpgradeQuirks._test_and_fail_on_tpm_fde7s���

�G�G�N�N�,�-�-�$����(=�(=�=��O�O�!�!�":�;�H�H��M�M�3�4��-�-�/�B��j�j����!7�!7�8�J�N�G��J�J����;�G�9�E���,��	
�
�O�O�!�!�#�'
I�
>�
.rc�>�SU;agUSnUR(a[R"S5 gUR(aX[R"S5 [R
"SSS9nURnUS:wa[R"S	U35 ggg)
z0Disable kdump-tools if installed during upgrade.zkdump-toolsNz-kdump-tools already installed. Not disabling.z1installing kdump-tools due to upgrade. Disabling.zOecho "kdump-tools kdump-tools/use_kdump boolean false" | debconf-set-selectionsTr�rz-kdump-tools debconf-set-selections returned: )r.r r!rarArsr�r")rr+rhr��ret_codes     rrL�1DistUpgradeQuirks._disable_kdump_tools_on_installSs�����%���M�"������L�L�H�I��
�
�
��L�L�L�M��>�>�0���D����H��1�}��
�
�&�&.�Z�1��� rc�:�URRS:wagSURR;afURRSR(d=[R
"S5 URRSR
SS9 ggg)z
LP: #2089759 �oracularNzlinux-sysctl-defaultsz Installing linux-sysctl-defaultsFr�)r�fromDistr+r.r r"rr$s rrQ�0DistUpgradeQuirks._install_linux_sysctl_defaultsps����?�?�#�#�z�1��
$�t���'<�'<�<����%�%�&=�>�K�K��M�M�<�=��O�O�!�!�"9�:�G�G��
H�
�	L�
=r)	rrrrrrrrrN)z/boot/firmware)(�__name__�
__module__�__qualname__�__firstlineno__�__doc__rr%r5r;rErMrRrVr,r-r#r@rIrJr�rHr2r3r8r�rrUrr r7r�rUr9r:rKrPr*rLrQ�__static_attributes__r}rrrr$s����*
&�'�2�:(�,<�"4� 	.�*�-(�^0
�d;�";�B�F�	�O�F$�P&*�P"L�H=� .�`:�&	G��&4,�lr�hE�"#K�JFK�PEA�N!�F$�8�:rr)r�r�r�r�r r/r]rAr�rr�DistUpgradeGettextrrc�objectrr}rr�<module>r�s6��,�
����	�	���"�,�Z��Zr

Filemanager

Name Type Size Permission Actions
DistUpgradeApport.cpython-313.pyc File 6.12 KB 0644
DistUpgradeCache.cpython-313.pyc File 59.35 KB 0644
DistUpgradeConfigParser.cpython-313.pyc File 4.2 KB 0644
DistUpgradeController.cpython-313.pyc File 101.91 KB 0644
DistUpgradeFetcher.cpython-313.pyc File 7.21 KB 0644
DistUpgradeFetcherCore.cpython-313.pyc File 12.6 KB 0644
DistUpgradeFetcherKDE.cpython-313.pyc File 10.51 KB 0644
DistUpgradeGettext.cpython-313.pyc File 2.68 KB 0644
DistUpgradeMain.cpython-313.pyc File 10.22 KB 0644
DistUpgradeQuirks.cpython-313.pyc File 49.98 KB 0644
DistUpgradeVersion.cpython-313.pyc File 186 B 0644
DistUpgradeView.cpython-313.pyc File 21.06 KB 0644
DistUpgradeViewGtk3.cpython-313.pyc File 48.36 KB 0644
DistUpgradeViewKDE.cpython-313.pyc File 53.71 KB 0644
DistUpgradeViewNonInteractive.cpython-313.pyc File 17.46 KB 0644
DistUpgradeViewText.cpython-313.pyc File 13.41 KB 0644
GtkProgress.cpython-313.pyc File 4.58 KB 0644
MetaRelease.cpython-313.pyc File 18.05 KB 0644
QUrlOpener.cpython-313.pyc File 3 KB 0644
ReleaseNotesViewer.cpython-313.pyc File 8.47 KB 0644
ReleaseNotesViewerWebkit.cpython-313.pyc File 2.53 KB 0644
SimpleGtk3builderApp.cpython-313.pyc File 2.36 KB 0644
SimpleGtkbuilderApp.cpython-313.pyc File 2.34 KB 0644
__init__.cpython-313.pyc File 151 B 0644
apt_btrfs_snapshot.cpython-313.pyc File 17.36 KB 0644
dist-upgrade.cpython-313.pyc File 347 B 0644
telemetry.cpython-313.pyc File 4.72 KB 0644
utils.cpython-313.pyc File 22.68 KB 0644
xorg_fix_proprietary.cpython-313.pyc File 5.96 KB 0644
Filemanager