f1%ddlmZddlmZddlmZmZmZddlm Z m Z m Z ddl m Z ddlmZddlmZddlmZd Zd Zeej,eej,d d gZd dgZGdde Zy))gettext) Launchpad)NotFound BadRequest Unauthorized)ShortcutHandlerShortcutExceptionInvalidShortcutException)SourcesListShortcutHandler)URIShortcutHandler)Deb822SourceEntry)urlparsez5https://ppa.launchpadcontent.net/{team}/{ppa}/ubuntu/z=https://private-ppa.launchpadcontent.net/{team}/{ppa}/ubuntu/zppa.launchpad.netzprivate-ppa.launchpad.netmain main/debugceZdZdfd ZedZedZedZedZedZ edZ dfd Z fd Z d Z d Zd Zd ZdZxZS)PPAShortcutHandlerc tt| |fddi|| |_d|_d|_d|_d|_d|_|j|sKd|_ t|j||j|fstd|z}t||j d|j"|_|j'|jr |j(|j,s|j.}|s$dg}|j(j0r t3d|j(j4rt6nt8}|j;|j |j" }t=dd }|j>g|_ |g|_!|jDg|_#||_$|jKtM|yy#t*$rttdwxYw) Ndeb822TFz%ERROR: '%s' is not a valid ppa formatz-ubuntu-zERROR: Can't find pparzDPPA publishes dbgsym, you may need to include 'main/debug' component)teamppa)'superr__init___lp_anon_signing_key_data_lp_lpteam_lpppa_is_sourceslist _match_pparany _match_uri_match_sourceslist_r teamnameppaname _filebase _set_authlpppar _source_entry componentspublish_debug_symbolsprintprivatePRIVATE_PPA_URI_FORMATPPA_URI_FORMATformatr binary_typetypesurisdistsuitescomps_set_source_entrystr) selfshortcutloginkwargsmsgr7 uri_formaturientry __class__s 8/usr/lib/python3/dist-packages/softwareproperties/ppa.pyrzPPAShortcutHandler.__init__4s  $0Q$Q&Q!  !%  $x( DK1//9;<@AHL.s33+/==$,,G     K !!OOE::33`a48::3E3E/>J##DLL#IC%dB/E++,EKEJ II;ELEK  " "3u: .#"% K.q1H/IJJ Ks  G G(c|js`|jrtj}ntj}||j d|j jdd|_|jS)N. productiondevel) service_rootversion)rrrlogin_anonymously login_with __module__rB__name__)r: login_funcs rClpzPPAShortcutHandler.lphsXxx}}&88 &11 !T__dnn>U>U"V/;*13DHxxcV|js7 |jj|j|_|jS|jS#t$r$t d|jz}t |t$r$t d|jz}t |wxYw)Nz8ERROR: user/team '%s' not found (use --login if private)z"ERROR: invalid user/team name '%s')rrOpeopler%rr$r rr:r>s rClpteamzPPAShortcutHandler.lpteamts|| -#ww~~dmm< ||t||  -STW[WdWdd',, -=>N',, -s *AAB(cp|js8 |jj|j|_|jS|jS#t$r0t d|j |jfz}t|t$r$t d|jz}t|wxYw)N)namez5ERROR: ppa '%s/%s' not found (use --login if private)zERROR: invalid ppa name '%s') rrT getPPAByNamer&rr$r%r rrSs rCr)zPPAShortcutHandler.lpppas{{ -"kk66DLL6I {{t{{ -PQ t||45',, -784<<G',, -s +AA$B5c.|jjSN)r) descriptionr:s rCrZzPPAShortcutHandler.descriptionszz%%%rPc.|jjSrY)r)web_linkr[s rCr]zPPAShortcutHandler.web_linkszz"""rPc|js|jj}|jj}|st t dned|vrt t dnL||j |vr9t d|dj|j |fz}t|||_|jS)NzHWarning: could not get PPA signing_key_fingerprint from LP, using anywayredactedzAPrivate PPA fingerprint redacted, using key anyway (LP: #1879781)z6Fingerprints do not match, not importing: '%s' != '%s',) rr)getSigningKeyDatasigning_key_fingerprintr-r$ fingerprintsjoinr )r:key fingerprintr>s rCtrustedparts_contentz'PPAShortcutHandler.trustedparts_contents%%**..0C**<#*#4#4S#9 VQ||~)g~  '% rPcV |jt|S#t$rYywxYw)NF)_match_handlerr r )r:r;s rCr"zPPAShortcutHandler._match_uris0 &&'9('CD D'  s  ((ch |jt|}d|_|S#t$rYywxYw)NFT)r~r r r)r:r;handlers rCr#z%PPAShortcutHandler._match_sourceslists@ ))*DX*NOG $(  s % 11ct|jj}|jtvry|j j j djd}t|dkry|d|_ |d|_ |j|_ |j|_|j|jj y)NFrurT)rrjr@hostnamePPA_VALID_HOSTNAMESpathstripsplitlenr%r&username _usernamepassword _passwordr8rq)r:rparsedrs rCr~z!PPAShortcutHandler._match_handlers'--/334"55{{  "((-33C8 t9q=Q Aw  )) )) w22499:rPc|js|jjsy|jr |jry |j j |j jj}|j|j}t|}|j|_|j|_y#t$r0td|j|j fz}t#|wxYw)N)archivezMCould not find PPA subscription for ppa:%s/%s, you may need to request access)rr)r.rrrOrRmerVgetArchiveSubscriptionURLrrrrr$r%r&r )r:rurlrr>s rCr(zPPAShortcutHandler._set_auths == 2 2  >>dnn  - 0B..tzz.BC c]F#__DN#__DN )deMM4<<01C#C( ( )s AC9C:)FrY)rMrL __qualname__rpropertyrOrTr)rZr]rgrjr8r r"r#r~r( __classcell__)rBs@rCrr3s2/h      &&##&&" ]( "-rPrN)rr$launchpadlib.launchpadrlazr.restfulclient.errorsrrr"softwareproperties.shortcuthandlerrr r softwareproperties.sourceslistr softwareproperties.urir aptsources.sourceslistr urllib.parserr0r/rrrprrPrCrs~.!,JJJJE54!IX ^%% #$-- <(M-M-rP