9_fddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlmZddlmZddlmZddlmZmZmZmZmZmZmZmZmZddlm Z ddl!m"Z"dd l#m$Z$dd l%m&Z&dd l'm(Z(dd l)m)Z)dd l*m+Z+ddl*m,Z,e+jZe,_-ddl.m/Z/m0Z0m1Z1 ddl.m2Z2dZ3ddl5m6Z6m7Z7ddl8m9Z:ddl8m;Z;ddl9Z9ddl%mZ>ddl?m@Z@dZAdZBdZCdZDGddeEZFGddeGZHeId k(rSdd!lJmJZJejej"eJZMeHeMZNeNjeNjyy#e4$rdZ3YwxYw)#N) NoOptionError) ConfigParser)get) country_mirrorurl_downloadablecheck_and_fix_xbitget_archiptables_active inside_chroot)get_string_with_no_auth_from_source_entryis_child_of_process_name inhibit_sleep)Template)urlsplit)Step)MyCache)DistUpgradeConfig)DistUpgradeQuirks)distinfo) sourceslist) SourcesList SourceEntry is_mirror)Deb822SourceEntryTF) get_distroNoDistroTemplateException)gettext)ngettext)CacheExceptionDpkgInterruptedCacheExceptionLockingFailedNotEnoughFreeSpaceError) run_apportz/var/run/reboot-requiredchgd} |j|S#t$rt|dzcYSwxYw)zB key() function for sorted to ensure "correct" component ordering main restricteduniverse multiverser)index ValueErrorlen)aorderings C/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.pycomponent_ordering_keyr0Xs:?H~~a  8}Qs 11cgd}|jdd} |j|S#t$rt|dzcYSwxYw)z> key() function for sorted to ensure "correct" suite ordering )updatessecurity backportsproposed-r) partitionr*r+r,)r-r.pockets r/suite_ordering_keyr;bsKCH [[ a F~~f%% 8}Qs+AAczg}|jd|jdt|d5}tj|j }ddd|t dt dDcgc]}|||dzjdc}z }|jd|S#1swYXxYwcc}w)Nz$-----BEGIN PGP PUBLIC KEY BLOCK-----r2rbr@zus-asciiz"-----END PGP PUBLIC KEY BLOCK-----)appendopenbase64 b64encodereadranger,decode) keyring_pathoutfdatais r/gpg_keyring_to_asciirKls CJJ56JJrN lD !*Q)*U1c$i5L MD1R4L   + MMCJJ34 J ** Ns$B,6B8,B5c eZdZy)NoBackportsFoundExceptionN)__name__ __module__ __qualname__r/rMrM{srRrMcheZdZdZd:dZd;dZdZdZdZdZ d Z d Z d Z d Z dd0Z1d>d1Z2d2Z3d3Z4d4Z5d5Z6d6Z7d7Z8d8Z9d9Z:y)?DistUpgradeControllerz3 this is the controller that does most of the work Nc> d}|dk(s|dk(r4tj}tjj|d}||_||_t jd|t jdtjd|jjz||_ |jjtdd|_d|_|j r|j j$dk(rd|_n|j j$|_t)||_d|j*j-dd z|_|j*j1d |j*j3d d t5|j&|j*j3d d d |j r3|j j6r|j*j3d d d|j*j-dd|_|j*j-dd|_|j*j-dd|_t?|_ tjjtBj*jEdd|_#|j@dvr&djItK|_&d|_'nd|_&d|_'dtjPvr5tjdtBj*j3ddd|_)tU||j*|_+tY|_-dtjPd<dtjPd <tjd!zd"tjPd#tjPd#<t]d$|j*j_d%d&}tBj*j3d't5|tBj*j3d(t5d)tBj*j3d*t5d+tBj*j3d,d-tBj*j3d.d-tBj*j3d/d0tBj*j3d1d2|j*jad3d4|_1|j*jedd5|_3g|_4|j*jkd6r1|j*jmd6Dcgc]}|d7 c}|_4d8|_7d|_8ycc}w)9Nz/usr/share/locale/.moubuntu-release-upgraderzUsing '%s' viewz Reading cacheTFiles BackupExtOptions withNetwork devReleaseFalseTrueSourcesFromTo ValidOriginDir::Etc::sourcepartsubuntu.sourcesamd64i386z"http://{}archive.ubuntu.com/ubuntu!http://security.ubuntu.com/ubuntuz$http://ports.ubuntu.com/ubuntu-ports"RELEASE_UPGRADE_NO_FORCE_OVERWRITEzenable dpkg --force-overwritezDPkg::Options::z--force-overwriteF1RELEASE_UPGRADE_IN_PROGRESSPYCENTRAL_FORCE_OVERWRITEz /imported:PATHz./imported/invoke-rc.dNetwork MaxRetrieszAcquire::Retriesz Dpkg::MaxArgsizDpkg::MaxArgBytesizAcquire::http::Timeout20zAcquire::ftp::TimeoutzApt::Get::List-Cleanupfalsez'APT::Get::Always-Include-Phased-UpdatesyesDistroForcedObsoletes ValidMirrorsThirdPartyMirrorsri)9osgetcwdpathjoindatadiroptionsrbindtextdomain textdomainloggingdebug __class__rN_view updateStatus_cachefetcherr\ useNetworkrconfigrsources_backup_ext add_sectionsetstr devel_releasefromDisttoDistoriginr archapt_pkgfind_dirdefault_sources_filepathformatrdefault_source_urisecurity_source_urienviron_partialUpgraderquirksr inhibitor_fdr getintgetlistforced_obsoletesgetListFromFile valid_mirrorsvalid_3p_mirrors has_sectionitems_aptCronJobPerms _session_bus)selfdistUpgradeViewr~r} localedir maxRetriespairs r/__init__zDistUpgradeController.__init__s/( d?gniikG WT2I   8C45  '/*C*C*L*LLM$  / 23  ||t||774?"DO"ll66DO(0 "%dkkoogk&J"J  *  -T__1EF  ,8 <<||))  ,?  &9 kkooi5 kkooi > J )+ NN # #$; < ) % 99) )&J&Q&QR`Rb&cD #'JD $&LD #'MD $ 0rzz A MM9 : NN  01D E %(dkk: *O58 0125 ./(* K(?(* 6(:< 634[['' ,? -s:? ?CL9.H > 3D9248 3W= DeL!% 3 3H=N O![[88>R " ;; " "#6 7%)[[%6%67J%K%MT!W%MD ! !& %Ms7 Vctjd|j|jj dn4|jj |jj d}d} |j|S#t$r}|dz }|jjtjdtjd|z||kDrntjd|z|jjtd td |r|jnt!j"dYd}~nd}~wwxYw) Nz openCache() PreCacheOpenrr皙?z'failed to lock the cache, retrying (%i)zCache can not be locked (%s)zUnable to get exclusive lockzThis usually means that another package management application (like apt-get or aptitude) already running. Please close that application first.)rrrrrun release_lockunlock_lists_dir _openCacher!r processEventstimesleeperrorrabortsysexit)rlockrestore_sources_list_on_failMAX_LOCK_RETRIES lock_retryes r/ openCachezDistUpgradeController.openCaches m$ ::  KKOON + JJ # # % JJ ' ' )  $t,,. $a  ((* 3 = JL 00MM"@1"DEJJ$$Q'E%F%&(<&=> 4  ' $ s8B EB?EEc t|j|j|j|jj ||_|j |_|j |j _tj$dt'|j zy#t$rtjdgd}tjjddk(r|jd|jjj|t|j|j|j|jj |_YwxYw)Nz-dpkg interrupted, calling dpkg --configure -a /usr/bin/dpkgz --configurez-aDEBIAN_FRONTENDnoninteractive--force-confoldz/openCache(), new cache size %i)rrrrgetOpCacheProgressr apt_cacher rwarningryrrr? getTerminalcallrpartialUpgraderr,)rrcmds r/rz DistUpgradeController._openCaches  B !%!%!%!>!>!@!% 'DJ "ZZDN%)$8$8 ! 7#djj/IJ- B OOK L6Czz~~/04DD ,- JJ " " $ ) )# . !%!%!%!>!>!@BDJ BsAB$$CE/.E/c|jjdd}|jjj|vryy)z Returns True if this view support upgrades over ssh. In theory all views should support it, but for savety we do only allow text ssh upgrades (see LP: #322482) View SupportSSHTF)rrrrrN)r supporteds r/_viewSupportsSSHz&DistUpgradeController._viewSupportsSSH/s8 ++%%f\:i    & &) 3 rRc Ftjjd}tjj|sbtjj drBt dr6|j sYtjd|jjtdtdtjdyd }|jjtd td |z}|dk(rtjdtjd d d|zdt!|g}|dk(rUtd}td|z}t#rd|z}|td|zz }|jj%||y)z this will check for server mode and if we run over ssh. if this is the case, we will ask and spawn a additional daemon (to be sure we have a spare one around in case of trouble) z"/var/run/release-upgrader-sshd.pidz/procsshdzupgrade over ssh not allowedz.Upgrading over remote connection not supportedzYou are running the upgrade over a remote ssh connection with a frontend that does not support this. Please try a text mode upgrade with 'do-release-upgrade'. The upgrade will abort now. Please try without ssh.rFizContinue running under SSH?aThis session appears to be running under ssh. It is not recommended to perform a upgrade over ssh currently because in case of failure it is harder to recover. If you continue, an additional ssh daemon will be started at port '%s'. Do you want to continue?z/usr/sbin/sshdz-oz PidFile=%sz-przStarting additional sshdzTo make recovery in case of failure easier, an additional sshd will be started on port '%s'. If anything goes wrong with the running ssh you can still connect to the additional one. z-iptables -I INPUT -p tcp --dport %s -j ACCEPTzIf you run a firewall, you may need to temporarily open this port. As this is potentially dangerous it's not done automatically. You can open the port with e.g.: '%s'T)ryr{r|existsisdirrrrrrrrraskYesNoQuestion subprocessrrr information)rpidfileportressummarydescrrs r/ _sshMagiczDistUpgradeController._sshMagic:s '',,CDw' GGMM' " $V ,((* <=   #S!T!"$H"I # D**--/0-. 15 56Ce| //#3#')?#'D #34Cax67L $ $ #$IDPCQABEH HHE  &&w6rRcrddlm}ddlm}d}|jdk(s-|jdk(s|jdk(s|jdk(rd }|d| }|jj |j jd s6|jj |j jd s6|jtjd y|jj}||j||j|j}|jy )z this is a helper that is run if we are started from a CD and we have network - we will then try to fetch a update of ourself r)MetaReleaseCore)DistUpgradeFetcherSelfFdapperhardylucidpreciseT)useDevelopmentReleaseforceLTSrNzNo new dist found)new_distprogressr~view) MetaReleaserrreleaserr downloadedwaitrrrgetAcquireProgressr~r)rrrrmrrs r/_tryUpdateSelfz$DistUpgradeController._tryUpdateSelfus 1B LLH $ LLG # LLG # LLI %H %%- /   ",,##C( JJ $ $ &,,##C( ::  MM- .::002(!**2:15.2jj:  rRc tjddg}|D]\}}d|z}tjj |s+t }t |5}|j|ddd |jdd} tjjd |z}||tjjd |fvstj|d|d|dtjjd |d y y#1swYxYw#t$r tjd|d|d Yy wxYw#t$r#} tjd | zYd} ~ y d} ~ wwxYw)z check that /usr/bin/python3 points to the default python version. Users tend to modify this symlink, which breaks stuff in obscure ways (Ubuntu #75557). z_pythonSymlinkCheck run)python3rz/usr/share/%s/debian_defaultsNDEFAULTzdefault-versionzno default version for z found in ''Fz /usr/bin/%szos.path.realpath failed (%s)z/usr/binz symlink points to: 'z', but expected is 'z' or 'T)rrryr{rSafeConfigParserr@ read_filerrrealpathOSErrorrr|) rbinaries_and_dirnamesbinarydirnamedebian_defaultsrrHexpected_defaultfs_default_versionrs r/_pythonSymlinkCheckz)DistUpgradeController._pythonSymlinkChecks]  /0!7 84 !OFG=GOww~~o.)+/*(a$$Q'(!'-zz)=N'O$ !)+)9)9-&:P)Q&*.> ZYi@j-kkMM#)+=?OQSQXQXQ]Q]^hjzQ{#}~ ) !*#((%!MM#)6#34 ! !MM"@1"DE !s6D6D "E D %EE E7E22E7c tjgdtjdjdj x|_}t jd|z||jk(s||jk(szt jd|d|jd|jjtd td |d |jd tjd |jr^|jj rGt#j$dz}t j&d|zt jdt)j(|dzzt"j*j-|dzr#t.j0j3d|dzt"j*j-|dzr#t.j0j3d|dz|dz}t"j*j-|rjA|jsy|j>jC|_"|jDrdt"jFd<ndt"jFd<|jIst jd yd d!l%m&}|D]}t"j*j-|s#t#jN|t"jPrHt jd"|z|jjtd#|ztd$|z|jSy#t<$r"}t jd|zYd}~yd}~wwxYw)%z= initial cache opening, coherence checking, network checking ) lsb_releasez-cz-sT)stdoutuniversal_newlinesrzlsb-release: '%s'zBad upgrade: 'z' != 'z' zCan not upgradezAn upgrade from 'z' to 'z"' is not supported with this tool.rz /backportszusing backports in '%s' zhave: %sz/*.udebrzDir::Bin::dpkgz/usr/lib/apt/methodszDir::Bin::methodsz/etc/apt/apt.conf.d/01ubuntuzadding config '%s'z%pythonSymlinkCheck() failed, abortingzMYour python3 install is corrupted. Please fix the '/usr/bin/python3' symlink.zopenCache() failed: '%s'NFserverRELEASE_UPGRADE_MODEdesktopzcheckViewDepends() failed) SYSTEM_DIRSz%s not writablezCan not write to '%s'zIts not possible to write to the system directory '%s' on your system. The upgrade can not continue. Please make sure that the system directory is writable.)*rPopenPIPE communicatestriprrrrrrrrrrr~havePrerequistsryrzinfoglobr{rrrrread_config_filerrr SystemErrorrcoherence_checkneed_server_mode serverModercheckViewDependsDistUpgradeMainr accessW_OKr)rr backportsdirconfrr  systemdirs r/preparezDistUpgradeController.preparesH",!1!12K*4//6:"<Et{{ TU V HHQK <>Dww~~d# 2T9:((> '') MMA B JJ  Q01 LM N HHQK  NN zz))$**5**557 ??19BJJ- .1:BJJ- .$$& MM5 60$ Iww~~i(9bgg1N /);<   -.:"#&/ /0  ?  MM4q8 9 s#Q Q+ Q&&Q+cTtjd|z|jstjddgfSg}d}|jD]U}|jD]D}dj ||}t |tjrd}2|j||fFW||fS)aI Check if deb822 source points to downloadable archive(s). Returns a tuple (bool, list). The bool is True if any combination of URI and suite was downloadable, or False if no combination was. The list contains tuples of URI and suite that were not downloadable together. verifySourcesListEntry: %s(skipping downloadable check (no network)TFz{}/dists/{}/Release)rrrurissuitesrrr?)rentryfailed downloadableurisuite release_files r/_deb822SourceEntryDownloadablez4DistUpgradeController._deb822SourceEntryDownloadables  2U:; MMD E":  :: /C /4;;CG #L'--@#'LMM3u+.  / /f%%rRctjd|z|jstjdy|jd|jd}t |tjS)ze helper that checks if a sources.list entry points to something downloadable r!r"Tz/dists/z/Release)rrrr(distr)rr%r(s r/_sourcesListEntryDownloadablez3DistUpgradeController._sourcesListEntryDownloadablesR  2U:; MMD E(-yy%**=W]]33rRc |rtjdntjd|jjdd}|jj dddsdt j vrtjdd}d}|d k(r|jrtj|jjd d |jjd d D]U}tjd |z||jvs|j|jrt|j|jjd k(s~|j|jst|j|jjdk(s|j|jjd jdk(stjd|z t}|j|j |j#dd }tjdn|jjdd} |j,g| D cgc]} |j,d| c} z} |j*g| D cgc]} |j*d| c} z} d|_g}|j j0ddD]}d|j2vr|j4j7dr/|j4j7d rKd!|j4vsl|j4j7d"sQ|j4j7d#s6|j4j7d$s|j4j7d%r|j8|j,dk(rd&|j2vr|j:|_|j=|||j _d}i|_i}|j j0ddD ] }|j2|vrd'||j2<|j@s |jBr:|j2j7d(r9|j8|j,k(r tjd)|zd |_!|j2j7d(rtDjjGd*}t jHjK|d+tEjL|j2d,d-|j8d-d.stjd/|zd |_!ta|z|jc|j2}| xs|je|j2}|s|r d }|jBsa|jfd?k(sRd@|j2vsDdA|j,z|j8vs)dB|j,z|j8vsd!|j2vrd}|j8| vr(tjdCta|z||z}nI|j8| vr||j2d'k(r[||z}t[jZ|}|j*|_|j]|sdD||j2<nd=||j2<||j2dDk(r0d |_!d |_tjdEta|zn||z}| | ji|j8|_tjdFta|znB|jfd?k(r|r/d |_!d |_tjdGta|z|jfdk(rSdH|j2vsdI|j2vr7|jjdJvr)tjdK|jjzdL|_dM|j*zdN|j*zdA|j*zfD]}|j>jm|to|jBr4|j8|k(sD|jfdk(sT|jND]%}||vr|j>|j)|'|j8|j,k(r|j*|_dOtWdP|j*zz}tq|jTtrr%|xjT|judQz c_*n|xjT|z c_*d |_!d |_tjdRta|z|s|j8| vr#| | ji|j8|_|j8| vrdM|j*zdN|j*zdA|j*zfD]z}|j>jm|to|j8|k(s7|jfdk(sG|jND]%}||vr|j>|j)|'|tjdS|jfdO|j8dO|jNd} d}|j j)|jf| |j8|jN| |j j0ddD]1}|j@sO|jBsC|jfd?k(s4|j2j7d(s|j8|j*k(r`|j8|j>vsy|j>|j*|j>|j8z }|stj^dTta|z|jNjwty|tzUtj^dVta|z|j>|j8=4|S#t$$r}tj&d|ztjdd}gd}d} |j j)d| |j*|||j j)d| |j*dz|||j j)dd|j*dz||Yd}~ d}~wwxYwcc} wcc} w)WNz&rewriteSourcesList() with mirror_checkzrewriteSourcesList()r` ComponentsAllowThirdPartyF"RELEASE_UPGRADER_ALLOW_THIRD_PARTY,mirror check skipped, *overriden* via configTru BaseMetaPkgsChecking pkg: %srrnow)BaseMetaPkg '%s' has no candidate.originsr&z/get_distro().enable_component("main") succeededz$NoDistroTemplateException raised: %sz]get_distro().enable_component("main") failed, overwriting sources.list instead as last resortz* auto generated by ubuntu-release-upgraderr% http://archive.ubuntu.com/ubuntudeb-updatesri -securityPocketsr7z/extras.ubuntu.comzE## This software is not part of Ubuntu, but is offered by third-partyz5## developers who want to ship their latest software.z/archive.canonical.comzE## Uncomment the following two lines to add software from Canonical'sz## 'partner' repository.zK## This software is not part of Ubuntu, but is offered by Canonical and thez2## respective vendors as a service to Ubuntu userszarchive.ubuntu.com/ubuntuunknownzcdrom:z,disabled '%s' cdrom entry (dist == fromDist)zDir::State::lists/distsrReleasez:disabling cdrom source '%s' because it has no Release filez %s-commercialzhttp://archive.canonical.compartnerz transitioned commercial to '%s' z*http://landscape.canonical.com/packages/%sz&commenting landscape.canonical.com outz %s-proposed2upgrade to development release, disabling proposedz5Not for humans during development stage of release %sold-releases.ubuntu.com/z-upgrade from old-releases.ubuntu.com detectedz"http://%sarchive.ubuntu.com/ubuntuz%transition from old-release.u.c to %spassedexamining: '%s'deb-src/security.ubuntu.comz %s-securityz %s-backportsz%entry '%s' is already set to new distr&)entry '%s' was disabled (no Release file)zentry '%s' updated to new dist&entry '%s' was disabled (unknown dist)zarchive.ubuntu.comzsecurity.ubuntu.comrfz-moving %s source entry to 'ports.ubuntu.com' z%http://ports.ubuntu.com/ubuntu-ports/%s %s-updates zdisabled on upgrade to %szUTF-8(entry '%s' was disabled (unknown mirror)zAdding entry: z)fixing components inconsistency from '%s'keyzto new entry '%s')>rrrrgetWithDefaultryrrrr candidater,originsarchiver get_sourcessourcesenable_componentr exceptionaddrrsources_disabledlistr(line startswithr-rr?found_componentsinvaliddisabledrrr{ruri_to_filenamecompsr~rcommentrrcopyr.rr isMirrorisThirdPartyMirrortyper*r setdefaultr isinstancebytesencodeextendsortedr0)r mirror_checksync_componentsmain_was_missingpkgnamedistrorrbrar(pocketsx fromDiststoDistsnew_listr% foundToDistentry_uri_test_resultslistdircdist test_entry validMirrorthirdPartyMirrorvalidTodcompdisable_commentcomponent_diffs r/rewriteSourcesListz(DistUpgradeController.rewriteSourcesList)s  MMB C MM0 1++--i E KK & &y1B5 I 0BJJ > OOJ KL! 4 DOO MM$++--hG H;;..xH"  07:; DJJ.G,66G,66>>?1DZZ(22G,66>>?1DZZ(22::1=EENMM"MPW"WX2!+**4<<8//7+/( &WX$E" N++%%i :]]O07'9+,37--'C'99 ;;-,3#5'(/3kk!#<#55 %\\&&q) #E#uyy0zz$$[]zz$$KM(EJJ6 %%[] %%.0 %%ac %%HJ  y99+uyy8 44 OOE "= #>%  !#!#\\&&q){ XEyy 664=&uyy1}}yy##H-%** 2M LuTU!%%%h/!..112EFww~~'.'.'>'>uyy'I'.',zz'0 '23 OO$`ch$hi%)EN$dmm3ENN $$%CD e#![[ (k  @5HI NN $$%QTXTaTa%ab FG!%NNt||LL..$6 -; RS*T[[8  #Z![^b^i^i!ii !%NN*eii7 MN@>CSS>@ C!%5!1J%(JN&*kkJO99*E %Ls%RS$'  99,BB@H2599=  MM+/XY^/__ `-- 2K#//U43J3J5993U . NNJJ)+*eii7!DMM1UZZ?"T]]2ejj@, 9#G::(MM"ILuv{L|"|}7*KZZ9,-eii8IE#w. %)YYu%5 *.++ #AA*M@H2599=@H2599=-eii8HD)-04- &QT}DUE'EF#w. %,Y__UZZ-H%I  &FIrsxIy&yzZZ9, &*EN,0D)MM"JMvw|M}"}~ JJ%')UYY6*eii7YY&77MM"QTXT]T]"]^ GEI,&4'$++57 ?A ))44Q>!NNuzzQ e+$)KK?D#'?#: ( 11!488> ? ?"::.!%EJ"%*E(F(T"TemmU3MM_%;%;G%DDMMM_4M!%(,% HKtuzK{{|$zzY.%,Y__UZZ-H%I zz0 "T[[0*T[[8+dkk9; C--88CEB ::?uzzU/B(- C'+'>$, $ 5 5a 8 < || =O{|jAD cgc]\} }| ddk(s| |fc}} D]\} } |jAD cgc]\} }| ddk(s| |fc}} D]Z\} }d}|| d|dk(z}|| d|dk(z}|| d|dk(z}|| d|dk(z}|| d |d k(z}|sQddg|d<|| =\|jCD]}|d}|tjj |dk(rd|d<2tjjEtjj-|d }tjj ||dz}tjjG|swtjjEtjj-|d }|jIddd dz}tjj ||}tjjG|sK|jKdr^tM|}|Dcgc]}d|jOr|ndz}}ddj |z|d<t3|jCDcgc]}|d c}D]C}g}|jCDcgc] }|d|k(s |c}D]}d }|dr|d!z }|d"jQdj |dz }|d#jQdj |dz }|d$jQdj |dz }|d%jQdj |d z }|jKdr|d&jQ|dz }|jS|tU|d'5}|jWdj |dddF|jDcgc]}t|ts|c}D]e}tjjG|j&rtjX|j&|jjY|g|jj[tU|d'5}|jWd(jQtjj |ddddy#t:$ri}||d<|j$|d<|j"g|d<|j*g|d<|j.g|d<t1t3|j4|d <|d j7t8 |||<YhwxYwcc} wcc} w#t:$rYwxYwcc}} wcc}} wcc}wcc}wcc}w#1swYxYwcc}w#1swYyxYw))zF Migrate .list files to corresponding .sources files. zmigrateToDeb822Sources()rrrdzDir::Etc::trustedpartsrrFrezthird-party.sourcesrz.sourcesrarNfilepathr_typesr#r$rNr8r9Tz/ /usr/share/keyrings/ubuntu-archive-keyring.gpgz signed-byz.gpgr7rrLrV r2z Enabled: no z Types: {} z URIs: {} z Suites: {} zComponents: {} z Signed-By:{} wz"# Ubuntu sources have moved to {} ).rrryr{r|rrrrrr}rUbackuprrhrr^rfr_rrdr(splitextr-rZrrasortr0KeyErrorkeysr;rvaluesbasenamerrsplitrrKrrr?r@writeremovesave)rrsourceparts_dirtrustedparts_dirr*r% new_filepathrOrkr)kssekbbe can_combinerkeyringlineslr{stanzasstanzarHs r/migrateToDeb822Sourcesz,DistUpgradeController.migrateToDeb822Sourcess  01'',, NN # #J / NN   6 7 "..112IJ">>223KL"t||<  D334\\& Ee[1U]] zzY&5>>zz_,==+#%77<<AQ#RL$&77<<AV#WL "ww// ;A>K  UYY SC #J!#aj5;;&>"?@' ' $:;9& P&+ZZ\2ae2 E!&@A2%a@  .#2../AzU1Xg%66( uQx'99 ( ((-?(@!!H  -2KKMO5AaQqTY=N!AO "HR05 Ou!1aUO "R" r*~J?? r*~J?? r&zRZ77 r(|r(|;; r'{bk99 #()"4BwKb  " "\\^ AEZ(H277<<9IJJ%Vk"''**277+;+;H+Ea+HI'',,'769IJww~~g.!gg..rww/?/?/I!/LMG%nnS!4Q7&@G ggll+;WEG77>>'*599[3I09EFKLSA<LEL)- %0@)@E+&+ A4 ?1:?@ ,DG!&IA1Z=D3HaI 'Z=o-F-..sxx' /CDD,--chhqy.ABB.//80EFF,33CHHQwZ4HII55%.55a nEEFv& 'dC ,A '*+ , ,% ,,"&LAA{1KaL 'Eww~~ejj) %**% LL   &  ' /3 ' N1 GG9VBGGLL:JKL N N NA  ,* %* #jj\' "YYK& $zzl( !#ekk"23' ' $:;c  3@ PO@M@J , ,M N NsA_ a( a-a-A a2<b b0bb'b8 b# b1b&!b b*6b* ?b/Ba%$a%2 a?>a?b' /b8c|jj|jd|j|jgd}t |j|jdzgt |_d|jd<y)Nr9r%rrfr(r- orig_compsr:rN./usr/share/keyrings/ubuntu-archive-keyring.gpg Signed-By) rUrXrrrrlr;r$sectionrrs r/_addDefaultSourcesz(DistUpgradeController._addDefaultSourcessm LL  ..''G  4;; j(@A02!Q +rRc|jj|jd|j|jdzgd}d|j d<y)Nr9r;r%rrr)rUrXrrrrrs r/_addSecuritySourcesz)DistUpgradeController._addSecuritySources(sP LL  ..(({*G  "R +rRcrt|jjddddtjvfS)Nr`r1Fr2)anyrrPryrrs r/_allowThirdPartyz&DistUpgradeController._allowThirdParty2s7 KK & &y1B5 I 0BJJ >   rRc|jrtjdy|jrVtj|j j dd|j j ddD]}tjd|z||jvs|j|jrt|j|jjdk(s~|j|jst|j|jjdk(s|j|jjdjdk(stjd |zy y) Nr3Trur4r5rrr6r7F) rrrrrrrrrQr,rRrS)rrps r/ _mirrorCheckz"DistUpgradeController._mirrorCheck8s1  " OOJ K ?? MM$++--hG H;;..xH ! 07:; DJJ.G,66G,66>>?1DZZ(22G,66>>?1DZZ(22::1=EENMM"MPW"WX  !rRc p d}tjd|rdndz|r |js|j|j|j i}|j jddD]?}dj|j|}dj|j |}|||<Ad|_ i|_ |jDcgc]5}t|j|jt|t  fs|7}}|D]} |j"rk|j"j$rUtjdt'| j(t'|jd zgz } | sd | _t| | _t'| j,D cgc]} d | vr|  c} | _| j,sQ| j(D cgc]} | j/d s| c} r|j0g| _n|j2g| _tjd t5t7j8| z| j,D cgc]@} t|j;| |j=| | |j?fr| B} } | sDd | _d |_ tjdt5t7j8| zg}| j(D]} |jA|| |sDd | _d |_ tjdt5t7j8| zAtGtIt'|tJ| _| j,D cgc]} d| vr|  }} | j(D cgc]} | jMddddvr| }} d| jNvxr|xr|}|s|jQ| \}}|sDd | _d |_)tjdt5t7j8| z*|r6tjdt5t7j8| zbd }| j(D]-} |j|xxt'| jTzcc</|Scc}wcc} wcc} wcc} w#tB$r'| |jEvr|jA| YwxYwcc} wcc} w#tB$r%t'| jT|j|<YwxYw)z deb822-aware version of rewriteSourcesList() Return True if we found a valid dist to ugprade to, and return False otherwise. FzrewriteDeb822Sources()z with mirror_checkr2r`r<z{}-{}rBz -proposedTrCr;rErMrIrNrGr7rr)r5r4r9rHz0some Release files were not downloadable for '%s)+rrrrrrrrrrYr]rUrr^r_rhrr~rrr$sutesr#endswithrrr rcdeepcopyrdrerr?rrrlrZr;rrr+source_disabledra)rrm found_to_dist suite_mappingr:rHtrrUr% no_proposedur known_mirrors new_suites valid_uris valid_suitesvalid_tor'r&r)s r/rewriteDeb822Sourcesz*DistUpgradeController.rewriteDeb822SourcesUs  ./;+E F  1 1 3  # # % 4 kk)))Y? !Ft}}f5At{{F3A M!  !!& "||   q"344   ] HE|| : : RS!%,,/#t}}{7R6S2TT "&*EN#.EKFA!;1!D FGEJ::$||G!qzz+/FAG"&":":!;EJ"&"9"9!:EJ MM+CDMMRWDXYZ [ !::MM!$++A.$$))+ M!!%(,% H I$--X]J^ _`aJ\\ --%%mA&67 -!%(,% F I$--X]J^ _`a%d3z?&;AST &+ZZ>31<>J>',||V! xxQ/3;TTVLV +K K|H&*%H%H%O "\6!%'+$ I I$--X]J^ _`a P I$--X]J^ _`a!% "\\HEH--e4EKK8HH4Hs] H~Q 0FH, -M0022"))!,-">V0$H7:5;;7G--e4HsO:R6 R; S)SAS6S  S=% T*T ,S:9S:+T54T5c&tjdtjd_jj j jDcgc]}|jr|}}tfd|DsMjjtdtdjz}|sjjds$tjdjjtdtd jj fz}|rtjd_jd sj"rtd }td jj fz}jj||sjj%j'njjj)j*r.jj-td tdt/j1j*ycc}w)z= deb822-aware version of updateSourcesList() zupdateDeb822Sources()Trc3nK|],}d|jvxrj|jv.ywr9N)rrr$.0rrs r/ z.s/Sa5AGG#A (AASs25zNo valid source entry foundWhile scanning your repository information no entry about %s could be found. An upgrade might not succeed. Do you want to continue anyway?rmNo valid mirror foundWWhile scanning your repository information no mirror entry for the upgrade was found. This can happen if you run an internal mirror or if the mirror information is out of date. Do you want to rewrite your 'sources.list' file anyway? If you choose 'Yes' here it will update all '%s' to '%s' entries. If you select 'No' the upgrade will cancel.FGenerate default sources?zAfter scanning your 'ubuntu.sources' no valid entry for '%s' was found. Should default entries for '%s' be added? If you select 'No', the upgrade will cancel.Third party sources disabledSome third party entries in your sources.list were disabled. You can re-enable them after the upgrade with the 'software-properties' tool or your package manager.)rrrr}rUrrr^rrrrrrrrrrrrrrYr get_telemetryset_using_third_party_sources)rrrUrprimsecons` r/updateDeb822Sourcesz)DistUpgradeController.updateDeb822Sourcess  -."t||DI  D334"ll<!))1<<S7SS**--a0M.N ABEIMM RSC  ((d(; MM1 2**--a0G.H M !%)MM4;;#? @ AC*t||DQ 11u1E89D-.26 0L ME  ::66tUC ++-,,.    JJ " "1%C#D 7! " 55d6K6KL}=s &J8Jctjdtj_jj j tfdjDsMjjtdtdjz}|sjjdstjdjjtdtd jjfz}|r0tj_jd sj rtd }td jjfz}jj||sjtj"d d}gd}jj%d|j|jj%d|jdz|jj%ddjdz|njjj' t)j*}|j,j:r.jj=tdtdt?jAj:y#t.$rtjdt0j2j5drGjjtdtdt7j8ddgYy jjtdtdtjdYy wxYw)NzupdateSourcesList()rc3rK|].}|jdk(xr|jjk(0ywr)rfr-rrs r/rz:DistUpgradeController.updateSourcesList..'s.U1166U?>qvv'>>Us47z!No valid sources.list entry foundrTrrrFrzAfter scanning your 'sources.list' no valid entry for '%s' was found. Should default entries for '%s' be added? If you select 'No', the upgrade will cancel.z"Generated new default sources.listr8r%r9r:z"http://security.ubuntu.com/ubuntu/r;zAB 6$GH lSXXb\12 mchhtn45 mchhrl23rRctjd|jjd|jsyt |jj dkDrJtjd|jj|j|jt |jj dkDrq|jj }tddt |}tdd t |d j|z}|jj||yg}|jjd d D]<}||jvs|j|j s,|j#|>tjd djt%|z|jj'|_|jj+|j,|j.|j0|_t |j2dkDr|jj5dddn|jj5dddtjddjt%|j2ztjddjt%|j(zy)NdoPostInitialUpdatePostInitialUpdateFrz-packages in reqReinstall state, trying to fixzPackage in inconsistent statezPackages in inconsistent statezThe package '%s' is in an inconsistent state and needs to be reinstalled, but no archive can be found for it. Please reinstall the package manually or remove it from the system.zThe packages '%s' are in an inconsistent state and need to be reinstalled, but no archive can be found for them. Please reinstall the packages manually or remove them from the system.z, ruMetaPkgsz MetaPkgs: %srLr[ foreignPkgsr_r^ Foreign: %s Obsolete: %sT)rrrrrr,req_reinstall_pkgsrfix_req_reinstrrrr|rrrrr?rl_getObsoletesPkgs obsolete_pkgs_getForeignPkgsrrr foreign_pkgsr)r reqreinstheaderr meta_pkgsrs r/rz)DistUpgradeController.doPostInitialUpdates5  +, +,zz tzz,, - 1 OOK L JJ % %djj 1 NN  tzz,, - 1 55I=>!)n.F ?  A #9~ /2691E FG JJ  VW - ;;&&x ; &Cdjj TZZ_%A%A  % &  nsxxy0A'BBC"ZZ99; JJ66t{{DMMSWS^S^_ t  !A % KKOOImV < KKOOImW = mchhvd6G6G/H&IIJ nsxxt7I7I0J'KKLrRctjd|z|jstjdy|jjj |j j}d}||}n|jjdd}d}||kr |jj|ytjd |r2|j jtd tdd|zy#ttf$r6}t|}tjd|d |d |d z }Yd}~d}~wwxYw)Nz"running doUpdate() (showErrors=%s)zBdoUpdate() will not use the network because self.useNetwork==falseTrrprqr2z(IOError/SystemError in cache.update(): 'z'. Retrying (currentRetry: )rzdoUpdate() failed completelyzError during updatezA problem occurred during the update. This is usually some sort of network problem, please check your network connection and retry.rJF)rrrr_listrrrrrupdaterIOErrorrrr)r showErrors forceRetriesr currentRetryr error_msgrs r/doUpdatezDistUpgradeController.doUpdates) :ZGH MM^ _ '')::002  ##J++IlCJ Z'  !!(+ 45  JJ  Q45 78:> 9I  K  ) F  lmnz{|!   s$D E,E  Ec tjjdstjdygd}t fd|Dstjdyd}t d5}|D]e}|j} |j\}}}}} } |d k7r1d}d|jdvsGtjd|d d d y d d d |s/jjtdtdyjjtdtdy#t$r&} tjd |d | d Yd } ~ d } ~ wwxYw#1swYxYw)z= check that /boot/efi is a mounted partition on an EFI systemz/sys/firmware/efizNot an UEFI systemT)z shim-signedzgrub-efi-amd64z grub-efi-ia32z grub-efi-armzgrub-efi-arm64 sicherbootc3pK|]-}|jvxrj|j/ywN)rr)rblrs r/rz6DistUpgradeController._checkBootEfi..s0Z2#C 2(C(CCZs36z'UEFI system, but no UEFI grub installedFz /proc/mountszline 'z"' in /proc/mounts not understood (r Nz /boot/efirw,zFound writable ESP %sz%EFI System Partition (ESP) not usablezxYour EFI System Partition (ESP) is not mounted at /boot/efi. Please ensure that it is properly configured and try again.zzThe EFI System Partition (ESP) mounted at /boot/efi is not writable. Please mount this partition read-write and try again.) ryr{rrrrr@rsplitr+rrr) r bootloadersmountedmountsr[whatwherefsr~r-brs ` r/ _checkBootEfiz#DistUpgradeController._checkBootEfissww~~12 MM. /y ZkZZ MMC D . ! V ZZ\7;zz|4T5"gq! K'7==--MM"94@!    $ JJ  QFG JK L JJ  QFG JK L/"MMUY[\"]^   sB2E8 E E8<E8E8 E5E0+E80E55E88Fc dtd}td}td}td}td}td}td}|jjdd d rtjd y |j } |j j|y #t$r} tjjd } d} | |d|d|d|d|d|i} | jD]} | dk7r| dz } | j| vrD| |j| j| j| j| | jz } _| |j| j| j| jdz } |j j#|| Yd} ~ y d} ~ wwxYw)z: this checks if we have enough free space on /var and /usrzNot enough free disk spacezThe upgrade has aborted. The upgrade needs a total of {str_total} free space on disk '{str_dir}'. Please free at least an additional {str_needed} of disk space on '{str_dir}'. {str_remedy}zIRemove temporary packages of former installations using 'sudo apt clean'.zYou can remove old kernels using 'sudo apt autoremove' and you could also set COMPRESS=xz in /etc/initramfs-tools/initramfs.conf to reduce the size of your initramfs.zbEmpty your trash and remove temporary packages of former installations using 'sudo apt-get clean'.z!Reboot to clean up files in /tmp.r2 FreeSpace SkipCheckFz,free space check skipped via config overrideTDir::Cache::archivesz/varz/bootr>z/tmpz/usrrL) str_totalstr_dir str_needed str_remedyN)rrrPrr _is_apt_btrfs_snapshot_supportedrcheckFreeSpacer"rrfree_space_required_listdirr size_total size_neededrr)rerr_sumerr_msgremedy_archivedir remedy_boot remedy_root remedy_tmp remedy_usrwith_snapshotsr archivedirerr_longremedyreqs r/_checkFreeSpacez%DistUpgradeController._checkFreeSpaces019: FG=> 01 :; rU ;; % %k+e D OOJ K>>@  JJ % %n 543' !001GHJH "3/{;jj *F 11 >r>_X77f$QTQXQX:=//:@/!/!KKHQTQXQX:=//:<!/!>>H > JJ  Wh /1 sB.. F/7C.F**F/c (|jjtd|jj |j|j |j sy|j r0|jj|jjsy|jj}|jj|j|jj|jsy|jsy|jj|jj|_t!|jdkDr|jj#t%j&ddj)|jDcgc]}|j*c}zt%j&d|j,z|jj|Scc}w)NCalculating the changesFrz demoted: '%s'rLzfound components: %s)rrrr distUpgraderr installTasksinstalledTasks get_changesrrr@r%get_installed_demoted_packagesinstalled_demotionsr,rrrr|rr])rchangesrss r/calcDistUpgradez%DistUpgradeController.calcDistUpgradeXs{ "; <=zz%%djj$//4CWCWX ??::**4::+D+DE**((*   "    "##%!!#   "$(::#L#L#N t'' (1 ,  $ $ ) ) + MM/CHHdF^F^5_aff5_,`` a MM043H3HH I   " 6`s1Hc|j}|sy|jjtd||j|j j }|S)NFz!Do you want to start the upgrade?)rJrconfirmChangesrrHrrequired_download)rrIrs r/askDistUpgradez$DistUpgradeController.askDistUpgrade~sU&&(jj''*M(N(/(,(@(@(, (D(DF rRctj}|j|jxrtj j dS)Nz2/var/snap/canonical-livepatch/common/machine-token) distro_infoUbuntuDistroInfois_ltsrryr{isfile)rdis r/_isLivepatchEnabledz)DistUpgradeController._isLivepatchEnableds6  ) ) +yy'pBGGNN;o,pprRc4tj}jr|jjryt fd|j dDj}jjdtd|z}|S)NTc3jK|]*}|jjk(s|j,ywr)seriesrversion)rrrs r/rz5DistUpgradeController.askLivepatch..s$[a188t{{CZ [s33objectzdLivepatch security updates are not available for Ubuntu %s. If you upgrade, Livepatch will turn off.) rPrQrUrRrnextget_allraskCancelContinueQuestionr)rrTrYrs` r/ askLivepatchz"DistUpgradeController.askLivepatchs  ) ) +'')RYYt{{-C[2::h+?[]a]h]hijj224 9 :>/ 0 MM7#d>S>S:TT U HH*5 1 1rRctjjdr6tjdtj d|j yy)Nrazenabling apt cron job)ryr{rrrrcrrs r/_enableAptCronJobz'DistUpgradeController._enableAptCronJobs: 77>>/ 0 MM1 2 HH*D,A,A B 1rRc|jd}|jj}|jj ddd}|rX t j djdd}|jjj|d||jjdd }d }d}||krk tj|jj }tj"||_|jj'|j$|y |r/|jj3t5dt5dnGtj0d|jj1t5dt5dd|z|j7|j9y#tjdd}YsxYw#t(jj*$r#} tj,d d }| }Yd} ~ d} ~ wt.$r.} tj0d | d|d|dz }| }Yd} ~ d} ~ wwxYw)Nrru SlideshowUrlrgetdefaultlocaleenz#locale=rprqFz user canceledTIOError in cache.commit(): ''. Retrying (currentTry: r rzUpgrade canceledzwThe upgrade will cancel now and the original system state will be restored. You can resume the upgrade at a later time.+giving up on fetching after maximum retriesCould not download the upgradeszThe upgrade has aborted. Please check your Internet connection or installation media and try again. All files downloaded so far have been kept.rJ)rdrrrrPlocalerirrrW getHtmlViewr@rrPackageManagerr _depcacheAcquirer_fetch_archivesaptFetchCancelledExceptionrrrrrrfr) rr fprogressurllangr user_canceledrWpmrs r/doDistUpgradeFetchingz+DistUpgradeController.doDistUpgradeFetchings ! JJ113 kk((.F  ..0399#>qA JJ " " $ ) )C*F G[['' ,?   Z' ++DJJ,@,@A&y9  **4<<<  JJ " "1%7#8#$&-$. / MMG H JJ  Q@A CD"I-  /   y !!"4589944  _- $    ^_`lmn!    s1 )G A)G, G),I! H'' I!3#II!c ddl} |j}|j}t j d|z|S#t$rYywxYw#t j dYyxYw)z' check if apt-btrfs-snapshot is usable rNzfailed to check btrfs supportFz!apt btrfs snapshots supported: %s)apt_btrfs_snapshot ImportErrorAptBtrfsSnapshotsnapshots_supportedrrWr)rr~ apt_btrfsrs r/r.z6DistUpgradeController._is_apt_btrfs_snapshot_supportedsp  % *;;=I//1C  9C?@         = >sA A A  A A)c|jsyddl}|j}d|jz}|j |}t j d|d|dy)z2 create btrfs snapshot (if btrfs layout is there) Nrzrelease-upgrade-%s-zcreating snapshot 'z ' (success=r )r.r~rrcreate_btrfs_root_snapshotrr)rr~rprefixrs r/ _maybe_create_apt_btrfs_snapshotz6DistUpgradeController._maybe_create_apt_btrfs_snapshotsQ446 !&779 &4226: fcJKrRc i}tjdg|d<dtjd<tjdg|d<tjd5}|jtjd<dD]F}tjj |||dz<tjj |H |j|D],}||D]"}tjj||$.cdddS#|D],}||D]"}tjj||$.wxYw#1swYyxYw)Nzdir::bin::dpkgz /bin/truezDir::State::extended_statesapt_extended_states_)r)zdpkg::pre-invokezdpkg::pre-install-pkgszdpkg::post-invokezdpkg::post-install-pkgsz::) rrtempfileNamedTemporaryFiler value_listclear doDistUpgrader)rbackupsrHlstitems r/doDistUpgradeSimulationz-DistUpgradeController.doDistUpgradeSimulation sE%,^^4D%E$F !+6'( 3:..A^2_1`-.  ( (0F G 61<=FFGNN8 9s *&-nn&?&?&Dd #$$S) * 6))+"6C ' 6**3566 6 6#6C ' 6**3566 6 6s%A)ED1E3EEE cDd}|jj}|jj|j}|jj dd}|j s+|jjd|jd}d}||krF |jj||}tjd|z|j-ytjd|jjt/dt/d d!|z|j1y#t$r}tjd|z|}tj j#drt%d5}|j'}dddn #1swYnxYwtjd |zd d g} | D]} t)|j+| stjd |j-t/d } | dt)|zz } | t/dz } |jjt/d| |j1t/d} |j st3s| t/d|zz } |jjt/d| gd} tj4j7ddk(r| j9d|jj;j=| |j-Yd}~yd}~wt>$r.}tjd|d|d|dz }|}Yd}~d}~wt@$r}tjBd|}|jDdk(ro|j-t/d } | dt)|zz } | t/dz } |jjt/d| |j1Yd}~Gd}~wwxYw)"Nrrprq StartUpgradeFzcache.commit() returned %sz#SystemError from cache.commit(): %sz./var/run/ubuntu-release-upgrader-apt-exceptionzfound exception: '%s'z;E:Internal Error, Could not perform immediate configurationz E:Couldn't configure pre-depend z-detected preconfigure error, restorting stateError during commitz '%s' Restoring original system statezCould not install the upgradeszrThe upgrade has aborted. Your system could be in an unusable state. A recovery will run now (dpkg --configure -a).z Please report this bug in a browser at http://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+filebug and attach the files in /var/log/dist-upgrade/ to the bug report. %srrrrrkrlr rzcache.commit() TrmrnzdThe upgrade has aborted. Please check your Internet connection or installation media and try again. rJ)#rrgetInstallProgressrrrrrrrcommitrrrrryr{rr@rCrr\rfrrr#rrr?rrrrrWerrno) rrrw iprogressrrrWrrHpre_configure_errors preconf_errormsgrs r/rz#DistUpgradeController.doDistUpgrade"s JJ113 JJ11$**= [['' ,? ## KKOON +  1 1 3 Z'D !jj'' )< :S@AH  " " $  CD <=@A )+  - ].  CaGH 77>>"RSNO%STFFH%%%MM"9A"=>V:,<(*> ) q6,,];#MM*YZ 224#$$9":C:A#66C1%F#GGC JJ,,Q/O-PRUV JJL )>?++%<q"&)* "* ++    #C!DcJ:::>>"348HHJJ01 &&(--c2&&(  ^_`lmn!   !!!"23 77b=**,12C:A..C1>??CJJ$$Q'G%H#NJJL !sR4D<< PAL> F$ L>$F- )AL>,E L>> P #M33 P?BPPc tjdtjj t j jd}|jjD]l}tjj tjj|j|k(sM tj|jn|j|jj!d|j"j%t&j(|j"j+t-d|j.j1}|j.j3|j4|j6|j8}t;j<ddj?tA|zt;j<ddj?tA|z|j jCdd D]*}||vst;jDd |ztG}n|j jIdd d st;j<d y |j jCddD]`}||j.vs|j.|jJs,|jLjO|j jC|dbt;j<d|jLz|jPr||jRz }n-tG|jTDcgc]}|jVc}}|tG|jLz}|j.jY}t;j<ddj?|z|tG|z}|j jIdd d st;j<dtG}t;j<d|zt;j<d|j"j[} t]|D]\} } | j_| tatc|z dz| |jdvs>|j"jg|j.ji| ||jL|jdrt;j<d| t;j<d| jk|j.jm} t;j<ddj?| Dcgc]}|jVc}zt-d} t-dt-dg}tc| dkDr||j"jo| | gd|dr\|j"jq}|j"js|j.} |j.ju|||jj!d"|jzs|j}|jdkr|jy #t$rY*wxYwcc}wcc}w#tvtxf$rT}t;jDd|z|j"jEt-dt-d d!|zYd}~d}~wwxYw)#N POSTUPGRADEr) PostUpgradezSearching for obsolete softwarerrLrrur4zXthe BaseMetaPkg '%s' is in the obsolete list, something is wrong, ignoring the obsoletesRemoveObsoletesTzSkipping obsolete Removalrrvzforced_obsoletes: %szUnused dependencies: %sz0Skipping RemoveObsoletes as stated in the configzremove_candidates: '%s'z Start checking for obsolete pkgsgY@z:'%s' scheduled for remove but not safe to remove, skippingz!Finish checking for obsolete pkgsz1The following packages are marked for removal: %szRemove obsolete packages?_Keep_RemoverFz,cache.commit() in doPostUpgrade() failed: %srz[A problem occurred during the clean-up. Please see the below message for more information. rJ PostCleanup)Ar add_stageryr{rrrrrrabspathdestfileunlinkrrrrrsetSteprCLEANUPrrrrrrrrrrr|rlrrrrPrrrkrrrHr_getUnusedDependenciesr enumeraterfloatr,rrtryMarkObsoleteForRemovaldonerFrLrrrrrrrunPostInstallScriptsrr)rr<r now_obsolete now_foreignrremove_candidatespunused_dependenciesrrJrprIractionsrwrrs r/ doPostUpgradez#DistUpgradeController.doPostUpgrades}!!-0WW__ NN # #$: ;= LL&& Dwwrwwt}}=>*LIIdmm,    & 4<<( "C DEzz335 jj00dmmT[[Y  nsxx|0D'EEF mchhvk/B&CCD ;;&&x? Cl" x{~~"u    {{))(3DdK MM5 6;;&&x ; YCdjj TZZ_%A%A%%,,T[[-@-@EV-WX Y  ,t/D/DDE ??!-t/A/A A  !$T5M5M$NQVV$N O S!6!677#jj??A /:M1NNOS!455{{))(3DdK MML M #  /2CCD 89::002%&78 iLQ OOQuS):%;<>&) Cf LM MM;fD E X"6* &&(--vht-D X :: JJ   !  X FTUVWW Xs17D ED<<EcVtjdt|dr%|jj |j |j jtd|j j|jtjdy)z2 abort the upgrade, cleanup (as much as possible) z abort calledrUrrN) rrhasattrrUrestore_backuprrrrrrrrrs r/rzDistUpgradeController.abortsm n% 4 # LL ' '(?(? @ "C DE    rRctj|D]}tjd|z|D]}|d}|d}|d}||jvrtj d|zy|j|}t |jdd}|dk7sgtj|||d k(sy tj d |zy) z+ check if a given depends can be satisfied zchecking: '%s' rrr8z_checkDep: '%s' not in cacheFrYNTzdepends '%s' is not satisfied) r parse_dependsrrrrgetattr installed check_dep) rdepstror_groupdepdepnameveroperrinstvers r/ _checkDepzDistUpgradeController._checkDeps--f5 H MM+h6 7 a&!f1v$**,MM"@7"JK zz'*!$..)TBtO%%gd374?    5>?rRctjdd}|jjdd}|j |jj|j j jd|D]u}tjd|||j|z}|r0|j jtdtd|ztjdw|S) z check if depends are satisfied zcheckViewDepends()TrDependsz depends: '%s'z!Required depends is not installedz/The required dependency '%s' is not installed. r) rrrrrkrrrNrrrrr)rrdependsrs r/rz&DistUpgradeController.checkViewDepends2s *+++%%fY7t{{**4::+?+?+H+H+46 7 C MM/3 / 4>>#& &C   #F!G!"$136$7"89   rRc|jjdd}d}tjjdd}|jj dd}||kr|j d |j |D]3}||jvstjd |zt||j|rn@tjd tjjdd |d z }||kr||k(rtjdytjjd|y)N PreRequistsPackagesrzAcquire::http::No-CachersrprqF)rzCan not find backport '%s'z>setting a cache control header to turn off caching temporarilytruerz+pre-requists item is NOT trusted, giving upT)rrrrrrrrrrrM_allBackportsAuthenticatedrr)r backportslistrJnoCacherrps r/_verifyBackportsz&DistUpgradeController._verifyBackportsFs ++M*E ..%%&?H[['' ,? *n MMUM + NN ( =$**,MM">"HI3G<< =..}= MMZ [ NN  8 @ FA*n ? MMG H4W=rRcrtjjdddk(rtjdy |jj dd}|ry |D]I}|j|}|jsy|jjD]}|jsHyy#t $rYZwxYw)NzAPT::Get::AllowUnauthenticatedFTzIskip authentication check because of APT::Get::AllowUnauthenticated==trueruAllowUnauthenticated) rrfind_brr getbooleanrrrQrRtrusted)rrr$rprcands r/rz0DistUpgradeController._allBackportsAuthenticatedas >> !A% HD P OOg h  &&x0FGA% G**W%C== -- <<     sB** B65B6ch|jd}t|\}}}}}d|vr|jdd}|d||}|jD]`}|jd}t ||ry|jdd} |j | sHt jd|zyy) z check if uri is a known mirror r>@rz://Tz//z)found apt-cacher/apt-torrent style uri %sF)rstriprrrrrrr) rr(raw_urischemenetlocr{queryfragmentmirrormirror_host_parts r/rdzDistUpgradeController.isMirrorws**S/080A-eX &=\\#&q)F#VT2(( F]]3'F% &||D1!4 ||,- ICOP rRc|jd}|jD]!}|jd}t||s!yy)z/ check if uri is an allowed third-party mirror r>TF)rrr)rr(rs r/rez(DistUpgradeController.isThirdPartyMirrorsDjjo++ F]]3'F% rRcd}td}|jD]}|js |jr|jdk(s,|jdk(s<|j |j sXd|jvsgd|jz|jvs|j jdr|j jd rd |j d |jd }||vs||z }|S) z7 get sources.list snippet lines for the current mirror r2rVrr9Fr&rKzhttp://security.ubuntu.comzhttp://archive.ubuntu.comzdeb rLz-updates main ) rrZr^r_rfrdr(rarr-r\)rdumbrrUr%new_lines r/_getPreReqMirrorLinesz+DistUpgradeController._getPreReqMirrorLiness#.\\ &E}} e#%' eii(%++%t}}, :II(()EFII(()DE9>DMMR5(X%E &" rRcttjd|z|j|}t|d5}t|5}|D]H}t |}|j |}|j |tjd|zJ ddddddy#1swYxYw#1swYyxYw)z9 add prerequists based on template into the path outfile z*writing prerequists sources.list at: '%s' r)rzadding '%s' prerequistsNT)rrrr@rsafe_substituter) rtemplaterGr mirrorlinesoutfileinfiler[outlines r/_addPreRequistsSourcesListz0DistUpgradeController._addPreRequistsSourcesLists  BSHI006 #s^ CwX C& C#D>"22+2F g& 7'AB  C C C   C C C s$ B.AB"B."B+ 'B..B7c~tjdd}tjj tj d}tjj |stj||jjdd}d}|jjd|d|jzzr|d|jzz}|jjd|}tjj |stjd|zy tjj tjjd |}tjj tjjd |}|j!|| |j#|D]} |j(| } |j(j*j-| j.} | s/tjd| ztj0|y | j2d k(r/tjd| ztj0|y tjd| z| j5d d d } |j(j7|j8j;|j8j=|j(}|d k(rtj&d tj0||jES#t$$rW|j!||d  |j#Yy #t$$r#}tj&d |zYd }~Yy d }~wwxYwwxYw#t>$r$}tjd|zd }Yd }~d }~wt@$r$}tjd|zd }Yd }~d }~wwxYw#tB$r1}tjd|zYd }~|jESd }~wwxYw)z5 download the backports specified in DistUpgrade.cfg zgetRequiredBackports()Tr5rrrz-%szsourceslist not found '%s'Frd)rzno backport for '%s' foundNzNo candidate for '%s'zNo ver.file_list for '%s'zmarking '%s' for install) auto_instauto_fixzfetch_archives returned '%s'zinstall_archives returned '%s'z,_fetch_archives for backports returned Falsez(failed to unlink pre-requists file: '%s')#rrryr{r|rzrmkdirrr has_optionrrrrrrrrMrrrrget_candidate_ver_pkgr file_list mark_installrrrrrrrsetupRequiredBackports) rrrr conf_optionprereq_templateoutpathrrrprrs r/getRequiredBackportsz*DistUpgradeController.getRequiredBackportss[ ./ww||BIIK < ww~~l+ HH\ " ++M*E *$ ;; ! !- EDIIG**W%C**&&88BC 5?@ '"}}$ 9GCD '" MM4w> ?   uu  = >" **##DJJ$A$A$C$(JJ$A$A$**$MOC %< OOJ K J IIg **,,[)   + +OW4 + P B%%'- B ?C  J MMDqH I I**,, Jsm;M-AN'PN$"M44 N =NN$N  N$' O?0O O?O::O? P< P77P<cdtjd<tjt j ddt jdgz}|jr|jdn|jdtjdtt jd tjt jd |tjy) Nz$/usr/lib/release-upgrader-python-apt PYTHONPATHz/var/log/dist-upgrade/main.logz&/var/log/dist-upgrade/main_pre_req.logz--have-prerequistsz--with-networkz--without-networkzrestarting upgraderr) ryrrshutdownshutilrcrargvrr?rr execve)rargss r/rz,DistUpgradeController.setupRequiredBackports s$J <  4< >xx/00 ?? KK( ) KK+ , *+ 388A;' #((1+dBJJ/rRc|jjtd|jjtj |j stjdtjjdrF|jjtdtdtjddgnC|jjtdtdtjd |j|jj!d r|j"r|j"j$d k(rtj&d |j)stjjdrF|jjtd tdtjddgnC|jjtd tdtjd |j|j+s|j|j-d d|j/|j1s|j |jjtj2|jjtd|j5}|dkDr6tj&d|j7s|jn|dk(rtj&dt9|j:d|_|j<j?|j@|jC|j<jE|jGs|j|j-s|j|jjtd|j/d|jHr|jJjM|_$|jNjQ|jjSddD]E}||jJvs)|jJjU|jJ|r;tjd|z||jJvrtjd|z|jJjU|jJ|stjd|z|jjtdtd|ztjjdrtjddgntjd |jH|jjtd |jWs|j|jY|jjtjZ|jjtd!|j]s |j_|j|jjtj`|jjtd"|jcs>|jjtd#td$|j|jJjed } |jJd%jgd}r|jjtj`|jjtd"|josC|jjqtd(td)tsjtd|j/d|jJjM|_$|jNjQ|jjtd |jwsV|rD|jjqtd(td)tsjtdn|j|jjtj`|jjtd"|josS|jy|jjqtd*td+tsjtd|j{tjjd,rtj|d,|jjtj~|jjtd-tjts|jr]|jjtd.d/d015}|jd2ddd|jjn/|jjrtjd3tsjtdy#th$r.}d&tk|vrtj&d' Yd}~d}~wwxYw#tl$r|jYwxYw#1swYxYw)4NzChecking package managerzself.prepare() failedrzPreparing the upgrade failedzXPreparing the system for the upgrade failed so a bug reporting process is being started.rrzPreparing the system for the upgrade failed. To report a bug install apport and then execute 'apport-bug ubuntu-release-upgrader'.rrFzneed backportsz$Getting upgrade prerequisites failedzThe system was unable to get the prerequisites for the upgrade. The upgrade will abort now and restore the original system state. Additionally, a bug reporting process is being started.zThe system was unable to get the prerequisites for the upgrade. The upgrade will abort now and restore the original system state. To report a bug install apport and then execute 'apport-bug ubuntu-release-upgrader'.r)rrzUpdating repository informationrzAlready migrated to deb822z!Rewriting existing deb822 sourcesTr)rrur4z@No '%s' available/downloadable after sources.list rewrite+updatez'%s' was not in the cachez'%s' was not downloadablezInvalid package informationaAfter updating your package information, the essential package '%s' could not be located. This may be because you have no official mirrors listed in your software sources, or because of excessive load on the mirror you are using. See /etc/apt/sources.list for the current list of configured software sources. In the case of an overloaded mirror, you may want to try the upgrade again later.rBFetching UpgradingzUpgrade infeasiblezQThe upgrade could not be completed, there were errors during the upgrade process.libc6pkgProblemResolverz'Unable to mark libc6 alone for install.zUpgrade incompletezUThe upgrade has partially completed but there were errors during the upgrade process.Upgrade completeKThe upgrade has completed but there were errors during the upgrade process.z:/var/lib/ubuntu-release-upgrader/release-upgrade-availablezSystem upgrade is complete.z/run/launcher-commandzw+zutf-8)encodingzaction: reboot /sbin/reboot)IrrrrrPREPARErrrryr{rrr rrrr~rrrr_rrrMODIFY_SOURCESrrrr}rUrrrrrrrrr+ensure_recommends_are_installed_on_desktopsranyVersionDownloadablerN _inhibitIdleFETCHr|rfINSTALLrrrrrKeyboardInterruptrrrrrJrrrREBOOTrrr _inside_WSLadviseExitOtherWSLr@radviseRestartWSLconfirmRestart)rmigratedrlibc6_possiblerrHs r/ fullUpgradez!DistUpgradeController.fullUpgrade( sV "< => 4<<(||~ MM1 2ww~~34   #A!B!"$4"56  ,0N!OP   #A!B!"$?"@A  ,- JJL KK # #M 2 LL LL ( (E 1 MM* +,,.77>>"78JJ$$Q'M%N%&(8&9:$$l4R%STJJ$$Q'M%N%&(C&DEMM#01   " JJL Q 7 '') JJLy  JJ  t22 3 JJ # #A&G$H I,,.H!| :;//1JJLq=MM"EF#.4<>V W IIR S 4;;' "? @A! --/14'J0aGG./0 ++-**,  0 HHQKQ '3q61MM"KL !  JJL |00sJ-H.mJm3l$m8 m'#m mmmm54m58ncV|jj|jSr)rrr#rs r/rzDistUpgradeController.run0 s!   "!!rRc|jjtj|jj tj |jj tj d|_|j|jsy|jsy|jjtj|jjtd|jsy|jjtj|jjtd|j!s/|jj#tdtdy|j%s/|jj#tdtdyt&j(j+t,r0|jj/rt1j2dy|jj#tdtdy) z, partial upgrade mode, useful for repairing TFr r rrrz"The partial upgrade was completed.)rrrrhideSteprrrrrrNrrrr|rrrrryr{rREBOOT_REQUIRED_FILEr rr rs r/doPartialUpgradez&DistUpgradeController.doPartialUpgrade4 s 4<<( D//0 DKK(# '')""$ 4::& * .))+ 4<<( +/!!# JJ " "1%7#8#$&0$1 2!!# JJ " "1%7#8#$&0$1 2 77>>. /zz((*  0 JJ " "1%7#8#$%I#J LrRc0tjd ddl}|j|j |_|j j dd}|j|d}|jddtd}td }tjtj|j j#||y#t$r}tjd d d vr,Yd}~tjtjytjd t|ztd}td}Yd}~d}~wwxYw#tjtjwxYw)Nzinhibit screensaverrzorg.freedesktop.ScreenSaverz/org/freedesktop/ScreenSaver)dbus_interfacerXzUpgrading UbuntuzLock screen disabledzOYour lock screen has been disabled and will remain disabled during the upgrade.XDG_SESSION_TYPEr2)r2ttyzfailed to inhibit screensaver: zUnable to disable lock screenzIt is highly recommended that the lock screen be disabled during the upgrade to prevent later issues. Please ensure your screen lock is disabled before continuing.)rrdbus_setNonRootEUID SessionBusr get_object InterfaceInhibitrrrygetenvseteuidgetuidrrr)rr-proxy screensaverrmessagers r/rz"DistUpgradeController._inhibitIdle[ s< +, $   " !% 1D %%001N1OQE..?\.]K    9;M N./G78G JJryy{ # w0 7yy+R0K? JJryy{ # MM;c!fD E78G67G 7 JJryy{ #s6BC E)$E$<E,(7E$E,$E))E,,)Fctjdk7rytjd}|stjd}|stjdytj t |y)NrSUDO_UID PKEXEC_UIDz"failed to determine user upgrading)ryr5r3rrr4int)ruids r/r.z%DistUpgradeController._setNonRootEUID sU 99;!  ii #))L)C MM> ?  3s8rRc@tjjdS)Nz#/proc/sys/fs/binfmt_misc/WSLInterop)ryr{rrs r/rz!DistUpgradeController._inside_WSL sww~~CDDrR)NN)TF)T)TN)F);rNrOrP__doc__rrrrrrrrr+r.rrrrrrrrrrrrrr%r@rJrNrUr_rdrfr|r.rrrrrrrrrrrdrerrrrr#rr(rr.rrQrRr/rTrTsB=p!d!$FK0 9v>>GR&< 4|| !FPNd RR :BHFPcJ4(/b!H-^7t$L q 2 C HT L60dLpd"4 &(6,,. U-p0*FP"%N$1L ErRrT__main__)DistUpgradeViewText)level)QrurrArPrryrrorrrrrrc configparserrrr telemetryrrutilsrrr r r r r rrstringr urllib.parserDistUpgradeViewrDistUpgradeCacherDistUpgradeConfigParserrr aptsourcesrrDistInfoaptsources.sourceslistrrrrrrrqrrDistUpgradeGettextrrrr r!r"DistUpgradeApportr#r'r0r;rKrrMr[rTrNrA basicConfigDEBUGvdcrdrfrQrRr/rTsD.      &9+###!!%60  "(( //%8#:,(88*1   P(EFP(EfP z8Ggmm,A q !BWR%$%s-EE! E!