+
    oFj<                      R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHtHtHtH t  ^ RI!t!^ RI"t!^ RI#t!^ RI$t!^ RI%t!^ RI&t&^ RI'H(t(H)t) ^ RI*t+^ RI,H-t- RRRR	R
RRRRRRRRR/t.Rt/R R lt0R R lt1R R lt2R R lt3R R lt4R R  lt5R! R" lt6R# R$ lt7R% R& lt8R' R( lt9 ! R) R*]-4      t:]:! 4       t;R# )+zyapport.PackageInfo class implementation for python-apt and dpkg.

This is used on Debian and derivatives such as Ubuntu.
)annotationsN)IterableIteratorMappingMutableMapping)Deb822SourceEntrySourceEntry)PackageInfoamd64zx86_64-linux-gnuarm64zaarch64-linux-gnuarmhfzarm-linux-gnueabihfi386zi386-linux-gnuppc64elzpowerpc64le-linux-gnuriscv64zriscv64-linux-gnus390xzs390x-linux-gnuz^(lib/modules|usr/(include|src|[^/]+/include|lib/modules|share/(cargo/registry|doc|gimp/.../help|gocode|help|icons|libreoffice/help|locale|man|texlive)))/c               8    V ^8  d   QhRRRRRRRRR	R
RRRRRR/# )   rootdirstrpermanent_rootdirboolfetcherzapt_pkg.Acquirelast_writtenfloatlp_cachezdict[str, str | None]pkg_versionsdict[str, str]	real_pkgsset[str]return )formats   "@/usr/lib/python3/dist-packages/apport/packaging_impl/apt_dpkg.py__annotate__r#   d   sX     $ $$$ $ 	$
 $$ !$ $ $    c                   \        4       pVP                   EFa  pVP                  P                  R 4      '       g   K'  \        P
                  ! RRVP                  .4      P                  4       p	V	P                  4       P                  4       w  rV'       d5   W9  g/   \        P                  P                  VP                  4      V8  dT   VP                  V
4      V8X  d   M<W9   d   WJ,          V8w  d   M(\        P                  ! RRVP                  V .4       WV
&   \        P                  P                  VP                  4      P                  R^4      ^ ,          pW9   g   EKP  VP                  V4       EKd  	  V# )debdpkg-debz--showdpkg-x_)setitemsdestfileendswith
subprocesscheck_outputdecodestripsplitospathgetctimeget
check_callbasenameadd)r   r   r   r   r   r   r   remove_real_pkgsioutpvpkg_names   &&&&&&&      r"   _extract_downloaded_debsrA   d   s%    u]]zz""5))%%z8QZZ&HIPPRyy{  "!$ww

+l: "a' 8;!#3%%vtQZZ&IJ"#Q77##AJJ/55c1=a@    *3 4 r$   c                    V ^8  d   QhRRRR/# )r   sourcer   r   zlist[Deb822SourceEntry]r    )r!   s   "r"   r#   r#      s      # *A r$   c           
     6   . p. p\        V R R7      ;_uu_ 4       pVP                  4       P                  R4       F  pVP                  4       pV'       d;   VP	                  4       P                  R4      '       g   VP                  V4       KS  KU  V'       g   K_  VP                  \        RP                  V4      V 4      4       . pK  	  V'       d+   VP                  \        RP                  V4      V 4      4       VuuRRR4       #   + '       g   i     R# ; i)utf-8encoding
#N)	openreadr3   rstriplstrip
startswithappendr   join)rC   sectionscurrentflines   &    r"   _parse_deb822_sourcesrU      s    HG	fw	'	'1FFHNN4(D;;=D{{}//44NN4( 5  1$))G2Df MN ) OO-dii.@&IJ 
(	'	'	's   AD:D9D+DD	c                    V ^8  d   QhRRRR/# )r   apt_sources	list[str]r   zIterator[str]r    )r!   s   "r"   r#   r#      s     
 
	 
m 
r$   c              #     "   \        V 4      p\        P                  ! 4       pVR,           R2p VP                  V4       Vx  \        V4       Rj  xL
  R#   \         d     L"i ; i L5i)zGOrder APT sources files heuristically to get the primary sources first.ID.sourcesN)r+   platformfreedesktop_os_releaseremoveKeyErrorsorted)rW   sourcesinfoexpected_primarys   &   r"   _order_sourcesrd      sl     +G**,Dt*X.'( g  s4   -A-A A-A+A-A(%A-'A((A-c                    V ^8  d   QhRRRR/# )r   apt_dirr   r   z%list[Deb822SourceEntry | SourceEntry]r    )r!   s   "r"   r#   r#      s      s 'L r$   c                <   \         P                  P                  V R4      p\         P                  P                  V4      '       dM   \	        \         P
                  ! V4      4       Uu. uF"  p\         P                  P                  W4      NK$  	  ppM. p\         P                  P                  V R4      p\         P                  P                  V4      '       d   V.VR&   . pV F  pVP                  R4      '       dK   \        VRR7      ;_uu_ 4       pTP                  V Uu. uF  p\        Wv4      NK  	  up4       RRR4       Kd  VP                  R4      '       g   K}  VP                  \        V4      4       K  	  V# u upi u upi   + '       g   i     K  ; i)	zqGiven an APT configuration directory (e.g. /etc/apt/), loads up all
the source data in one easy-to-consume list.
sources.list.dsources.list:    rj   N.listrE   rF   Nr[   )r4   r5   rP   existsrd   listdirr.   rJ   extendr   rU   )rf   	sources_drS   
to_inspectsources_old_filera   r5   rT   s   &       r"   _load_all_sourcesrr      s6    W&67I	ww~~i  0>rzz)?T0U
0U1BGGLL&0U 	 

 
ww||G^<	ww~~&''+,
3G==!!dW--AFADD 7AFG .-]]:&&NN067  N%
  G .--s$   '(F F
"F6F
F

Fc               $    V ^8  d   QhRRRRRR/# )r   urir   target_archr   r    )r!   s   "r"   r#   r#      s!      S s s r$   c                    VR9   d7   \         P                  ! RV 4      pV'       d   RVP                  ^4       R2# V # \         P                  ! RV 4      pV'       d   RVP                  ^4       R2# V # )zMap the givin archive mirror URI to a valid one for the givin architecture.

The Ubuntu archive is split. The primary mirrors only has packages
for the amd64 and i386 architectures. The ports mirrors host all
remaining architectures.
z/http://([a-z.]*)ports.ubuntu.com/ubuntu-ports/?zhttp://zarchive.ubuntu.com/ubuntuz,http://([a-z.]*)archive.ubuntu.com/ubuntu/?$zports.ubuntu.com/ubuntu-ports>   r   r
   )rematchgroup)rt   ru   ports_matchprimary_matchs   &&  r"   _map_mirror_to_archr|      sx     ''hhPRUV[..q122KLL
HHKSQM,,Q/00MNNJr$   c                    V ^8  d   QhRRRR/# )r   rt   r   r   rX   r    )r!   s   "r"   r#   r#      s      3 9 r$   c                   V P                  R4      '       g   Q h\        P                  ! V R,          4      pVP                  R4      P	                  R4       Uu. uF  q"P                  4       NK  	  ppV Uu. uF6  q"'       g   K  V^ ,          R8w  g   K  VP	                  R^R7      ^ ,          NK8  	  ppV# u upi u upi )znRead an apt-transport-mirror configuration file.

Note: The metadata will be stripped for simplicity reasons.
mirror+file::   NNrE   rH   rI   	maxsplit)rN   pathlibPath	read_textr3   r2   )rt   r5   rT   linesmirrorss   &    r"   _read_mirror_filer      s    
 >>.))))<<C!D&*nnW&=&C&CD&IJ&IdZZ\&IEJ4949DT'd1gQTn'

4!
$Q''E   N	 Ks   B77	B<B<B<c                    V ^8  d   QhRRRR/# )r   pkg_list_filenamer   r   r   r    )r!   s   "r"   r#   r#      s     
 
# 
. 
r$   c                .   / p\         P                  P                  V 4      '       dZ   \        V R R7      ;_uu_ 4       pV F3  pVP	                  4       pV'       g   K  VP                  4       w  rEWQV&   K5  	  RRR4       V# V#   + '       g   i     T# ; i)rE   rF   N)r4   r5   rl   rJ   r2   r3   )r   r   rS   rT   r>   r?   s   &     r"   _read_package_version_dictr      s}    L	ww~~'((#g66!zz|zz|"#Q  7 < 76 s   :BB	c               $    V ^8  d   QhRRRRRR/# )r   r   r   r   r   r   Noner    )r!   s   "r"   r#   r#      s$     
 

*8
	
r$   c                d   \        VP                  4       4      pVP                  4        \        V R RR7      ;_uu_ 4       pV FM  pVP	                  V4       VP	                  R4       VP	                  W,          4       VP	                  R4       KO  	  RRR4       R#   + '       g   i     R# ; i)wrE   rF    rH   N)listkeyssortrJ   write)r   r   pkgsrS   r>   s   &&   r"   _write_package_version_dictr      sz     !!#$DIIK	w	7	71AGGAJGGCLGGLO$GGDM	  
8	7	7	7s    ABB/	c          
     ,    V ^8  d   QhRRRRRRRRR	R/# )
r   packagesMapping[str, str | None]r   r   	apt_cache	apt.Cacher   r   r   r    )r!   s   "r"   r#   r#     s:     (! (!&(! (! (! 	(!
 (!r$   c                *   \        4       p\        P                  ! \        4      pV EF  pW&,          P                  pVf   Q hW`9   EdU   W,          f|   VP                  V4      VP                  8X  d&   VP                  RV4       VP                  V4       Kr  VP                  RWgP                  4       W&,          P                  RR4       K  VP                  V4      W,          8w  d7   VP                  RWgP                  4       W&,          P                  RR4       K  VP                  V4      VP                  8w  d8   VP                  RWgP                  4       W&,          P                  RR4       EKQ  VP                  RV4       VP                  V4       EKw  VP                  V4      VP                  8w  d.   VP                  RV4       W&,          P                  RR4       EK  VP                  RV4       VP                  V4       EK  	  V# )zUnpack packages, weed out the ones that are already installed (for
permanent sandboxes)

Return a set of packages that are already the right version.
z.Removing %s which is already the right versionzInstalling %s version %sFzInstalling %s)
r+   logging	getLogger__name__	candidater7   versiondebugr:   mark_install)r   r   r   r   already_right_versionloggerr>   r   s   &&&&    r"   _unpack_packagesr     s     Ex(FL**	$$$={"##A&)*;*;;LL!QSTU)--a0LL!;Q@Q@QRL--eU;!!!$37<M<MN))%7!!!$	(9(997<M<MN))%7MqQ%))!,a I$5$55LL!,L%%eU3LLI1M!%%a(5 6 ! r$   c                    V ^8  d   QhRRRR/# )r   r5   r   r   
str | Noner    )r!   s   "r"   r#   r#   -  s        r$   c                    \         P                  ! RV 4      '       d
   V R,          # \         P                  ! RV 4      '       d   RV  2# R# )zDetermine /usr-merge alternative name.

With /usr-merge some binaries appear in /usr but their .list file
doesn't reflect that. Vice-versa is possible as well. So strip or
add the /usr from the path. Return None in case there is no
alternative path.
z(^/usr/(bin|lib|lib32|lib64|libx32|sbin)/:   NNz$^/(bin|lib|lib32|lib64|libx32|sbin)/z/usrN)rw   rx   )r5   s   &r"   _usr_merge_alternativer   -  s@     
xx:DAABx	xx6==dV}r$   c                     ] tR tRtRtR R ltR R ltR R ltR	 R
 ltR R lt	R R lt
R R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR R  ltR! R" ltR# R$ lt]R% R& l4       t]RwR' l4       t]R( 4       tR) R* ltR+ R, ltR- R. ltR/ R0 lt]R1 R2 l4       tR3 R4 ltRxR6 R7 llt ]]!PD                  R8 R9 l4       4       t#]]!PD                  R: R; l4       4       t$RyR< R= llt%R> R? lt&RzR@ RA llt'RB RC lt(RD RE lt)RF RG lt*R{RH RI llt+RJ RK lt,RL RM lt-RN RO lt.]RP RQ l4       t/]RR RS l4       t0]RT RU l4       t1RV RW lt2RX RY lt3RZ R[ lt4R\ R] lt5R^ R_ lt6]R` Ra l4       t7Rb Rc lt8Rd Re lt9Rf Rg lt:Rh Ri lt;]Rj Rk l4       t<Rl Rm lt=]Rn Ro l4       t>Rp Rq lt?R5t@Rr Rs ltAR5tBRt Ru ltCRvtDR5# )|_AptDpkgPackageInfoi<  zConcrete apport.packaging.PackageInfo class implementation for
python-apt and dpkg, as found on Debian and derivatives such as Ubuntu.c                   V ^8  d   QhRR/# r   r   r   r    )r!   s   "r"   r#    _AptDpkgPackageInfo.__annotate__A  s     
& 
&$ 
&r$   c                	    R V n         R V n        R V n        R V n        R V n        R V n        R V n        R V n        RV n        RV n	        R # )Nzhttps://api.launchpad.net/develF)

_apt_cache_current_release_codename_sandbox_apt_cache_sandbox_apt_cache_arch_contents_dir_mirror_virtual_mapping_obj_contents_mapping_obj_launchpad_base_contents_updateselfs   &r"   __init___AptDpkgPackageInfo.__init__A  sP    ,059&4837$)-#'@D!@D"@ %r$   c                   V ^8  d   QhRR/# r   r    )r!   s   "r"   r#   r   M  s       r$   c                	     V P                   '       d#   \        P                  ! V P                   4       R # R #   \         d     R # i ; iN)r   shutilrmtreeAttributeErrorr   s   &r"   __del___AptDpkgPackageInfo.__del__M  s<    	!!!d001 " 		s   8  8 AAc                    V ^8  d   QhRRRR/# )r   	configdirr   r   zdict[str, set[str]]r    )r!   s   "r"   r#   r   T  s     ) )# )2E )r$   c                	   V P                   e   V P                   # \        P                  P                  VR4      p \	        VR4      ;_uu_ 4       p\
        P                  ! V4      V n         R R R 4       \        V P                   \        4      '       g   Q h V P                   #   + '       g   i     L?; i  \        \        3 d    / T n          T P                   # i ; i)Nvirtual_mapping.picklerb)r   r4   r5   rP   rJ   pickleload
isinstancedictAssertionErrorFileNotFoundErrorr   r   mapping_filefps   &&  r"   _virtual_mapping$_AptDpkgPackageInfo._virtual_mappingT  s    $$0,,,ww||I/GH	+lD))R,2KKO) *d77>>>> ((( *)  12 	+(*D%(((	+s)   B6 B#,*B6 #B3	.B6 6CCc                    V ^8  d   QhRRRR/# )r   r   r   r   r   r    )r!   s   "r"   r#   r   b  s     ; ;s ;t ;r$   c                	
   \         P                  P                  VR 4      pV P                  eA   \	        VR4      ;_uu_ 4       p\
        P                  ! V P                  V4       RRR4       R# R#   + '       g   i     R# ; i)r   Nwb)r4   r5   rP   r   rJ   r   dumpr   s   &&  r"   _save_virtual_mapping)_AptDpkgPackageInfo._save_virtual_mappingb  s]    ww||I/GH$$0lD))RD55r: *) 1)))s   "A11B	c               (    V ^8  d   QhRRRRRRRR/# )r   r   r   releasearchr   dict[bytes, bytes]r    )r!   s   "r"   r#   r   h  s,     * **'**25*	*r$   c                	l   V P                   '       dY   V P                   R ,          VP                  4       8X  d3   V P                   R,          VP                  4       8X  d   V P                   # \        P                  P	                  VRV RV R24      p\        P                  P                  V4      '       d<   \        P                  ! V4      P                  ^ 8X  d   \        P                  ! V4        \        VR4      ;_uu_ 4       p\        P                  ! V4      V n         RRR4       \        V P                   \        4      '       g   Q h V P                   #   + '       g   i     L?; i  \        \        3 d6    R TP                  4       RTP                  4       /T n          T P                   # i ; i)s   releases   archcontents_mapping--.pickler   N)r   encoder4   r5   rP   rl   statst_sizer^   rJ   r   r   r   r   r   r   r   r   r   r   r   r   s   &&&&  r"   _contents_mapping%_AptDpkgPackageInfo._contents_mappingh  sK    &&&**:6'..:JJ**73t{{}D---ww||*7)1TF'B
 77>>,''BGGL,A,I,IQ,NIIl#	lD))R-3[[_* *d88$???? ))) *)  12 	GNN,*D&
 )))	s*   3E- E#*E- E*	%E- -8F32F3c               (    V ^8  d   QhRRRRRRRR/# )r   r   r   r   r   r   r   r    )r!   s   "r"   r#   r     s)       c  QU r$   c                	>   \         P                  P                  VR V RV R24      pV P                  eB    \	        VR4      ;_uu_ 4       p\
        P                  ! V P                  V4       RRR4       R# R#   + '       g   i     R# ; i  \         d     R# i ; i)r   r   r   Nr   )r4   r5   rP   r   rJ   r   r   MemoryErrorr   s   &&&&  r"   _save_contents_mapping*_AptDpkgPackageInfo._save_contents_mapping  s    ww||*7)1TF'B
 %%1,--KK : :B? .- 2---  s/   B "A9-B 9B
	B 
B BBc                   V ^8  d   QhRR/# r   r    )r!   s   "r"   r#   r     s     ' '$ 'r$   c                	    \         P                  P                  R 4       \         P                  ! 4        \         P                  ! 4        RV n        RV n        R# )DirN)apt_pkgconfigclearinit_configinit_systemr   r   r   s   &r"   _clear_apt_cache$_AptDpkgPackageInfo._clear_apt_cache  s;    U#"&r$   c                   V ^8  d   QhRR/# )r   r   r   r    )r!   s   "r"   r#   r     s      	 r$   c                    V P                   '       gU   V P                  4        \        P                  P                  P                  4       p\        P                  ! VR7      V n         V P                   # )z(Return apt.Cache() (initialized lazily).)progress)r   r   aptr   base
OpProgressCache)r   r   s   & r"   _cache_AptDpkgPackageInfo._cache  sI    !!#||((335H!ii:DOr$   c               8    V ^8  d   QhRRRRRRRRRRRR	R
RRR/# )r   aptrootr   rf   fetch_progress!apt.progress.base.AcquireProgressdistro_namerelease_codenameoriginsIterable[str] | Noner   r   r   r    )r!   s   "r"   r#   r     sZ     ' '' ' :	'
 ' ' &' ' 
'r$   c                V   V P                   '       d   WpP                  8w  d   V P                  4        V P                  WWEV4       \        P
                  P                  V4      p\        P                  ! VR7      V n         Wpn         V P                   P                  V4       T P                   P                  4        T P                   # V P                   P                  4        V P                   #   \        P                  P                   d   p	\        \        T	4      4      T	hRp	?	ii ; i)zyBuild apt sandbox and return apt.Cache(rootdir=) (initialized
lazily).

Clear the package selection on subsequent calls.
r   N)r   r   r   _build_apt_sandboxr4   r5   abspathr   r  updatecacheFetchFailedExceptionSystemErrorr   rJ   r   )
r   r  rf   r  r
  r  r  r   r   errors
   &&&&&&&&  r"   _sandbox_cache"_AptDpkgPackageInfo._sandbox_cache  s     &&&$2N2N*N!!###+ ggoog.G&)ii&@D#+/(9''..~> ##((* &&& ##))+&&& 9911 9!#e*-589s   C/ /D(D##D(c                    V ^8  d   QhRRRR/# )r   packager   r   zapt.Packager    )r!   s   "r"   r#   r     s     L L L Lr$   c                p     V P                  4       V,          #   \         d    \        RT R24      Rhi ; i)zeReturn apt.Cache()[package] (initialized lazily).

Throw a ValueError if the package does not exist.
package  does not existN)r  r_   
ValueError)r   r  s   &&r"   _apt_pkg_AptDpkgPackageInfo._apt_pkg  s@    
	L;;=)) 	Lxy@AtK	Ls    5c                    V ^8  d   QhRRRR/# r   r  r   r   r    )r!   s   "r"   r#   r     s      3 3 r$   c                    V P                  V4      pVP                  pV'       g   \        RV R24      hVP                  # )z*Return the installed version of a package.r  r  )r  	installedr  r   )r   r  pkginsts   &&  r"   get_version_AptDpkgPackageInfo.get_version  s:    mmG$}}xy@AA||r$   c                    V ^8  d   QhRRRR/# r"  r    )r!   s   "r"   r#   r     s     ! !S !S !r$   c                \    V P                  V4      P                  pVf   Q hVP                  # )z1Return the latest available version of a package.)r  r   r   )r   r  r   s   && r"   get_available_version)_AptDpkgPackageInfo.get_available_version  s.    MM'*44	$$$   r$   c                    V ^8  d   QhRRRR/# r   r  r   r   rX   r    )r!   s   "r"   r#   r     s     	
 	
 	
	 	
r$   c                    V P                  V4      P                  pV'       g   . # VP                  RRR4       Uu. uF  pV^ ,          P                  NK  	  up# u upi )z/Return a list of packages a package depends on.Depends
PreDepends
Recommends)r  r$  get_dependenciesname)r   r  cur_verds   &&  r"   r3  $_AptDpkgPackageInfo.get_dependencies  s\    --(22I --i|T
T aDIIT
 	
 
s   Ac                    V ^8  d   QhRRRR/# r"  r    )r!   s   "r"   r#   r     s     > ># ># >r$   c                    V P                  V4      pVP                  '       d   VP                  P                  # VP                  '       d   VP                  P                  # \	        RV R24      h)z-Return the source package name for a package.r  r  )r  r$  source_namer   r  r   r  r%  s   && r"   
get_source_AptDpkgPackageInfo.get_source  sV    mmG$=====,,,=====,,,8G9O<==r$   c                    V ^8  d   QhRRRR/# )r   r  r   r   r   r    )r!   s   "r"   r#   r     s      # * r$   c                    V P                  V4      P                  pV'       g   \        R4      hVP                   F#  pVP                  '       g   K  VP                  u # 	  R# )zReturn package origin.

Return the repository name from which a package was installed, or None
if it cannot be determined.

Throw ValueError if package is not installed.
zpackage is not installedN)r  r$  r  r  origin)r   r  r%  r@  s   &&  r"   get_package_origin&_AptDpkgPackageInfo.get_package_origin  sM     mmG$..788kkF}}}}}$ " r$   c                    V ^8  d   QhRRRR/# r   r  r   r   r   r    )r!   s   "r"   r#   r      s        r$   c                   V P                  V4      pVP                  '       d   VP                  P                  f   R# VP                  '       g   R# VP                  P                   Uu0 uF  q3P
                  kK  	  ppV P                  4       ^ ,          pWT9   d   R# VR08X  d(   \        P                  P                  R4      '       d   R# R# u upi )zCheck if a package is a genuine distro package.

Return True for a native distro package, False if it comes from a
third-party source.
FT z/etc/system-image/channel.ini)
r  r$  r   r   r  r@  get_os_versionr4   r5   rl   )r   r  r%  or  r
  s   &&    r"   is_distro_package%_AptDpkgPackageInfo.is_distro_package   s     mmG$===S]]22:}}}%(]]%:%:;%:88%:;))+A.! rd?rww~~.MNN <s   *Cc                    V ^8  d   QhRRRR/# rD  r    )r!   s   "r"   r#   r     s        r$   c                n   V P                  V4      pVP                  '       d   VP                  P                  f   R# . p\        P                  ! R4       FV  p \	        VRR7      ;_uu_ 4       pV F.  pVP                  4       pV'       g   K  VP                  V4       K0  	  RRR4       KX  	  VP                  '       dN   VP                  P                  '       d2   VP                  P                   F  pVP                  V9   g   K   R# 	  R#   + '       g   i     K  ; i  \         d     K  i ; i)zCheck if a package originated from a native location.

Return True for a package which came from an origin which is listed in
native-origins.d, False if it comes from a third-party source.
NFz/etc/apport/native-origins.d/*rE   rF   T)r  r$  r   globrJ   r2   rO   OSErrorr   r  r@  )r   r  r%  native_originsrS   fdrT   rH  s   &&      r"   is_native_origin_package,_AptDpkgPackageInfo.is_native_origin_package  s     mmG$===S]]22:;<A!g.." "#zz|4*11$7 !# /. = ===S]]222]]**88~- +  /..
  s6   D%/DD$D%D"D%"D%%D43D4c          
     ,    V ^8  d   QhRRRRRRRRRR/# )	r   r   r   r  r   r   r   r   ztuple[str | None, str | None]r    )r!   s   "r"   r#   r   7  s4     )' )')'")'-7)'?B)'	&)'r$   c                   \         P                  P                  RR4       ^ RIHp VP                  RRRR7      pVP                  R,          pVP                  V P                  4       R,          R	7      pVP                  VR
7      pVP                  RR7      p	V	P                  VVVRRR7      p
V
'       g   R# / pV
 Fq  pVP                  R8X  d   K  VP                  '       g   VP                  RR7      p M9VP                  P!                  V4      '       g   K_  VP                  RR7      p M	  V'       g   R# \#        \%        V4      4      pVR,          VR,          3# )zDGet Launchpad URL and SHA1 sum for the given binary package version.zAPT::Get::AllowUnauthenticatedTrue	Launchpadapport-retrace
productiondevelr   ubuntu)name_or_version)archtagprimaryr4  FT)binary_namer   distro_arch_seriesorderedexact_matchDeleted)include_metaurlsha1NN)r   r   r+   launchpadlib.launchpadrW  login_anonymouslydistributions	getSeriesr3   getDistroArchSeries
getArchivegetPublishedBinariesstatusarchitecture_specificbinaryFileUrlsdistro_arch_series_linkr.   nextiter)r   r  r   r   rW  	launchpadr\  seriesdasr_  bpphbf_urlsbpbfs   &&&&          r"   get_lp_binary_package)_AptDpkgPackageInfo.get_lp_binary_package6  sX    	;VD4//lG 0 
	 ((2!!'--/"2E!F(((6###3++" , 
 ByyI%++++++>))22488+++>   $w- 5	2f:&&r$   c                    \         P                  P                  V 4      ;_uu_ 4       pVP                  4       pRRR4       \        X\        4      '       d   TP                  R4      pT'       d   \        P                   ! T4      R,          # \        P                   ! T4      #   + '       g   i     Lr; i  \         P                  P
                   dB    \        P                  P                  R\         P                  P                  T 4      4        R# \         dB    \        P                  P                  R\         P                  P                  T 4      4        R# i ; i)zOpen, read and parse the JSON of a URL.

Set entries to True when the json data returned by Launchpad
has a dictionary with an entries key which contains the data
desired.
Nzcannot connect to: %szfailure reading data at: %srE   entries)urllibrequesturlopenrK   r  URLErrorapportr   warningparseunquoterN  r   bytesr1   jsonloads)rg  r  responsecontents   &&  r"   json_request _AptDpkgPackageInfo.json_requestb  s    
	'',,"--/ - gu%%nnW-G::g&y11zz'"" -,||$$ 	NN""#:FLL<P<PQT<UV 	NN""-v||/C/CC/H 		s:   'B7 B$B7 $B4	/B7 4B7 7AE!E!>E! E!c                f   ^ RI Hp VP                  RRRR7      pVP                  R,          pVP	                  RR7      pVP                  WR	R
7      pV'       g   R# RpV F&  pVP                  R8X  d   K  VP                  4       p M	  V'       g   R# . p	V F  p
V	P                  V
4       K  	  V	# )z>Get files from Launchpad for the given source package version.rV  rX  rY  rZ  r[  r\  r_  r`  T)r:  r   rd  NrF  re  )	rk  rW  rl  rm  rp  getPublishedSourcesrr  sourceFileUrlsrO   )r  r   rW  rx  r\  r_  psssfuspssource_filessfus   &&         r"   get_lp_source_package)_AptDpkgPackageInfo.get_lp_source_package{  s     	5//lG 0 
	 ((2###3))d * 
 ByyI%$$&D  C$ r$   c                    V ^8  d   QhRRRR/# r"  r    )r!   s   "r"   r#   r     s     > > > >r$   c                
   V P                  V4      pVP                  '       d!   VP                  P                  ;'       g    R# VP                  '       d!   VP                  P                  ;'       g    R# \	        RV R24      h)zReturn the architecture of a package.

This might differ on multiarch architectures (e. g. an i386 Firefox
package on a x86_64 system)
unknownr  r  )r  r$  architecturer   r  r;  s   && r"   get_architecture$_AptDpkgPackageInfo.get_architecture  sh     mmG$=====--:::=====--:::8G9O<==r$   c                    V ^8  d   QhRRRR/# r.  r    )r!   s   "r"   r#   r     s     P P P Pr$   c                    V P                  RV.4      pVP                  4        Uu. uF  q3P                  R4      '       d   K  VNK  	  up# u upi )z*Return list of files shipped by a package.z-Ldiverted)
_call_dpkg
splitlinesrN   )r   r  outputrS   s   &&  r"   	get_files_AptDpkgPackageInfo.get_files  sB    $1!,,.O.all:6N.OOOs   AAc                    V ^8  d   QhRRRR/# r.  r    )r!   s   "r"   r#   r     s     2 2# 2) 2r$   c           	        RV RV P                  4        R2p\        P                  P                  V4      '       g   RV R2p \        P                  ! V4      p\        P
                  ! VP                  4      '       g   \        h\        VP                  VP                  4      pRpRT RT P                  4        R2p\        P                  P                  T4      '       g.   RT R2p\        P                  P                  T4      '       g   . # \        TR4      ;_uu_ 4       pT F  p RT9   d#   \        P                  P                  RT4       K-  TP                  4       p	T	'       g#   \        P                  P                  R	T4       Kg  \        P                  ! R
T	R,          P!                  R4       2P#                  R4      4      p\        TP                  TP                  4      T8:  d   K   YX,          pK  	  RRR4       T'       d   T P%                  T4      # . #   \         d    . u # i ; i  \         d     LOi ; i  + '       g   i     LO; i)z/Return list of all modified files of a package.z/var/lib/dpkg/info/:rk   r$   z.md5sumsr       z(%s contains NUL character, ignoring linez%%s contains empty line, ignoring line/UTF-8Nri  )get_system_architecturer4   r5   rl   r   S_ISREGst_moderN  maxst_mtimest_ctimerJ   r  r   r  r3   r1   r   _check_files_md5)
r   r  listfilesmax_timesumssumfilerP  rT   wordss
   &&        r"   get_modified_files&_AptDpkgPackageInfo.get_modified_files  s    )	43O3O3Q2RRWXww~~h'',WIU;H	!A<<		**1::qzz2H
 !'!D,H,H,J+K8T 	 ww~~g&&+G9H=G77>>'**	'4  B}..F ! JJLE ..CW !!E"I$4$4W$=#> ? F Fw OPA1::qzz2h>  ?
 )  !. ((..	O  	I	@  % ! sg   ;H$  &H$ %I,'H7IH7- H7IA#H72I$H43H47I	II	II	c                    V ^8  d   QhRRRR/# )r   r  r   r   zdict[str, bytes | str]r    )r!   s   "r"   r#   r     s     ( (c (6L (r$   c                   \         P                  ! RRRRV.R\         P                  R7      pVP                  ^ 8w  d   / # / pVP                  P                  4       P                  4        F  pV'       g   K  VP                  4       P                  4       R,          w  rV\        P                  P                  V4      '       ds    \        VR4      ;_uu_ 4       pVP                  4       pR	R	R	4       \        P                  ! 4       p	V	P!                  X4       V	P#                  4       p
W8w  d   WV&   K  K  RW5&   K  	  V#   + '       g   i     L^; i  \$         d   pR
\'        T4       R2Y5&    R	p?EK  R	p?ii ; i)a  Return modified configuration files of a package.

Return a file name -> file contents map of all configuration files of
package. Please note that apport.hookutils.attach_conffiles() is the
official user-facing API for this, which will ask for confirmation and
allows filtering.
z
dpkg-queryz-Wz--showformat=${Conffiles}--Fcheckstdout:Nr   Nr   Nz[inaccessible: ]z	[deleted])r/   runPIPE
returncoder  r1   r  r2   r3   r4   r5   rl   rJ   rK   hashlibmd5r  	hexdigestrN  r   )r   r  r(   modifiedrT   r5   default_md5sumrP  contentsmcalculated_md5sumr  s   &&          r"   get_modified_conffiles*_AptDpkgPackageInfo.get_modified_conffiles  s6    ~~4!<dGL??
 ??aI+-KK&&(335D $(::<#5#5#7#; Dww~~d##
EdD))R#%779 *AHHX&()%(:)1 ;
 "-) 6,  *)  E'6s5zl!%DHNNEs1   ED?)AE?E
EE:E55E:c               $    V ^8  d   QhRRRRRR/# )r   patternr   	file_listrX   r   r   r    )r!   s   "r"   r#   r     s!      s y Z r$   c                `   Rp^dp^ pV'       g   V\        V4      8  d   \        P                  ! RRRRV .WWC,            ,           R\        P                  \        P                  \        P                  R7      pVP                  ^ 8X  d   VP
                  P                  R4      pWC,          pK  V# )	zkCall fgrep for a pattern on given file list and return the first
matching file, or None if no file matches.Nfgrepz-lxm1r  F)r  stdinr  stderrr  )lenr/   r  r  r  r  r1   )r  r  rx   
slice_sizer<   r  s   &&    r"   __fgrep_files!_AptDpkgPackageInfo.__fgrep_files  s     
AI.NN&#tW5	q~8WW oo!!E 1$++G4OAr$   c               (    V ^8  d   QhRRRRRRRR/# )r   r5   r   likely_listsrX   	all_listsr   r   r    )r!   s   "r"   r#   r   !  s,      '0=F	r$   c                	    V P                  W4      pV'       g   V P                  W4      pV'       g>   \        V4      pV'       d+   V P                  WR4      pV'       g   V P                  WS4      pV# r   ) _AptDpkgPackageInfo__fgrep_filesr   )r   r5   r  r  rx   usrmerge_paths   &&&&  r"   __fgrep_list_for_path)_AptDpkgPackageInfo.__fgrep_list_for_path!  s_     ""46&&t7E248M**=G ..}HEr$   Nc               0    V ^8  d   QhRRRRRRRRRRR	R/# )
r   filer   uninstalledr   map_cachedirr   r   r   r   r    )r!   s   "r"   r#   r   0  sF     3 33 3 !	3
 3 3 
3r$   c                L   V'       d   V P                  WWE4      # \        P                  ! RRV.R\        P                  \        P                  R7      pVP                  P                  R4      pVP                  ^ 8X  d)   V'       d!   VP                  4       R
,          pVR8w  d   V# \        P                  P                  \        P                  P                  V4      4      ^ ,          P                  4       p	. p
. p\        P                  ! R4       F  p\        P                  P                  \        P                  P                  V4      4      ^ ,          P                  4       P                  R4      ^ ,          pW9   g   W9   d   VP                  V4       K  V
P                  V4       K  	  V P                  WV
4      pV'       dZ   \        P                  P                  \        P                  P                  V4      4      ^ ,          P                  R4      ^ ,          # R	# )a(  Return the package a file belongs to.

Return None if the file is not shipped by any package.

If uninstalled is True, this will also find files of uninstalled
packages; this is very expensive, though, and needs network access and
lots of CPU and I/O resources. In this case, map_cachedir can be set to
an existing directory which will be used to permanently store the
downloaded maps. If it is not set, a temporary directory will be used.
Also, release and arch can be set to a foreign release/architecture
instead of the one from the current system.
zdpkg-divertz--listFr  r  r  r  zhardening-wrapperz/var/lib/dpkg/info/*.listr  Nri  )_search_contentsr/   r  r  r  r1   r  r3   r4   r5   splitextr9   lowerrM  rO   (_AptDpkgPackageInfo__fgrep_list_for_path)r   r  r  r  r   r   r(   r=   r%  fnamer  r  rS   r>   rx   s   &&&&&&         r"   get_file_package$_AptDpkgPackageInfo.get_file_package0  s   ( ((WKK ~~Hd+????	
 kk  )??aC))+b/C))
  !1!1$!78;AAC	67A  !1!1!!45a8>>@FFsKANAzUZ##A&  # 8 **4yI77##BGG$4$4U$;<Q?EEcJ1MMr$   c                   V ^8  d   QhRR/# r   r   r   r    )r!   s   "r"   r#   r   g  s      S r$   c                     \         P                  ! RR.R\         P                  R7      p V P                  P	                  4       P                  4       pV'       g   Q hV# )z[Return the architecture of the system, in the notation used by the
particular distribution.r(   z--print-architectureTr  r/   r  r  r  r1   r2   )r(   r   s     r"   r  +_AptDpkgPackageInfo.get_system_architecturee  sL    
 ~~+,D
 {{!!#))+tr$   c                   V ^8  d   QhRR/# r  r    )r!   s   "r"   r#   r   s  s     # ## #r$   c                     \         P                  ! RR.RR\         P                  R7      p V P                  P	                  4       # )z8Return the multiarch triplet for the system architecturezdpkg-architecturez-qDEB_HOST_MULTIARCHT)r  textr  )r/   r  r  r  r2   )r(   s    r"   get_native_multiarch_triplet0_AptDpkgPackageInfo.get_native_multiarch_tripletq  s=     ~~ "89??	
 {{  ""r$   c                    V ^8  d   QhRRRR/# )r   r  r   r   r   r    )r!   s   "r"   r#   r   }  s     V Vj VC Vr$   c                    Vf   V P                  4       p\        P                  V4      pVf   \        RV 24      hRV RV R2# )a  Return a list of default library search paths for the architecture.

If architecture is not specified, the system archictecture is used.

The entries should be separated with a colon ':', like for
$LD_LIBRARY_PATH. This needs to take any multiarch directories into
account.
z8Missing multi-arch triplet information for architecture z/lib/z
:/usr/lib/z:/lib:/usr/lib)r  _ARCH_MULTIARCH_TRIPLET_MAPPINGr7   NotImplementedError)r   r  multiarch_triplets   && r"   get_library_paths%_AptDpkgPackageInfo.get_library_paths}  sf     779L;??M$%%%1N4  ()4E3FnUUr$   c                    V ^8  d   QhRRRR/# )r   rg  r   r   r   r    )r!   s   "r"   r#   r     s      c d r$   c                    Wn          V P                  '       d*   \        P                  ! V P                  4       RV n        R# R#   \         d     R# i ; i)zExplicitly set a distribution mirror URL for operations that need to
fetch distribution files/packages from the network.

By default, the mirror will be read from the system configuration
files.
N)r   r   r   r   r   )r   rg  s   &&r"   
set_mirror_AptDpkgPackageInfo.set_mirror  sM     	!!!d001%)" "  		s   9A AAc          
     ,    V ^8  d   QhRRRRRRRRRR/# )r   
srcpackager   
output_dirr   r   sandboxr   r    )r!   s   "r"   r#   r     sC     b bb b 	b
 b 
br$   c           	        \         P                  P                  4       pV'       dK   \        P                  ! R4      pVP                  RV R24       VP                  4        VP                  VR&   V'       d:   \        P                  ! V R24      '       g   \        P                  ! . ROVR7       RRR	R
V.pV'       d   VR;;,          RV 2,          uu&    \        P                  ! WrVR7      ^ 8w  Ed   V'       g   R# V P                  W4      pV'       d   \        P                  P                  P                  4       p	\         P"                  ! V	4      p
. pV F*  pVP%                  \         P&                  ! WVR7      4       K,  	  V
P)                  4       pWP*                  8w  d   R# \        P                  ! \         P,                  P/                  VR4      4       F.  p\        P                  ! RRRV.\        P0                  VR7       K0  	  MR#  Rp\        P                  ! \         P,                  P/                  W! R24      4       F,  p\         P,                  P5                  V4      '       g   K*  TpK.  	  V'       g   Q R4       h \        P                  ! RRVR7       V#   \2         d     R# i ; i  \2         d     T# i ; i)a  Download source package and unpack it into output_dir.

This also has to care about applying patches etc., so that output_dir
will eventually contain the actually compiled source. output_dir needs
to exist and should be empty.

If version is given, this particular version will be retrieved.
Otherwise this will fetch the latest available version.

If sandbox is given, it calls apt-get source in that sandbox, otherwise
it uses the system apt configuration.

If apt_update is True, it will call apt-get update before apt-get
source. This is mostly necessary for freshly created sandboxes.

Return the directory that contains the actual source root directory
(which might be a subdirectory of output_dir). Return None if the
source is not available.
zw+zDir "zG";
Dir::State::Status "/var/lib/dpkg/status";
Debug::NoLocking "true";

APT_CONFIGz/var/lib/apt/lists/*Sourcesapt-get-qq)envz--assume-yesrC   =)cwdr  N)destdirz*.dsczdpkg-sourcez-snr)   )r  r  z-*z.could not determine source tree root directoryz(debian/rules patch || debian/rules apply-patches || debian/rules apply-dpatches || debian/rules unpack || debian/rules patch-stamp || debian/rules setup) >/dev/null 2>&1T)shellr  )r  r  r  ri  )r4   environcopytempfileNamedTemporaryFiler   flushr4  rM  r/   callr  r   r   r  AcquireProgressr   AcquirerO   AcquireFiler  RESULT_CONTINUEr5   rP   r  rN  isdir)r   r
  r  r   r  r  rS   argvsf_urlsr  r   af_queuesfresultdscrootr6  s   &&&&&            r"   get_source_tree#_AptDpkgPackageInfo.get_source_tree  sG   : jjoo++D1AGGy !- .
 GGI !C499y0K%LMMOO8cB 5.(JGH!G9%H	t=B44ZI%(\\%6%6%F%F%HN%oon=G!H% #// 'Z & %[[]F!8!88##yyj')JK"*E4=#-?? *  L  3 C< 277<<
l"4EFGAww}}Q H EEEt
	OO6  /  		(  		s2   %J* B)J* -A&J* J< *J98J9<K
Kc                   V ^8  d   QhRR/# r  r    )r!   s   "r"   r#   r     s     . .C .r$   c                @    R\         P                  ! 4       ^,           2# )ztReturn the actual Linux kernel package name.

This is used when the user reports a bug against the "linux" package.
zlinux-image-)r4   unamer   s   &r"   get_kernel_package&_AptDpkgPackageInfo.get_kernel_package  s     bhhjm_--r$   c               (    V ^8  d   QhRRRRRRRR/# )r   r  r   	cache_dirzpathlib.Path | strr   r   r    )r!   s   "r"   r#   r     s2     E EE,>EILE	Er$   c                v    WP                  4       8w  d   TpMRp\        P                  P                  W#VR4      # )zDetermine APT cache root directory.

release is the value of the report's 'DistroRelease' field or
"system" in case the current system configuration should be used.
rF  r   )r  r4   r5   rP   )r   r  r0  r   aptroot_archs   &&&& r"   _apt_cache_root_dir'_AptDpkgPackageInfo._apt_cache_root_dir  s4     7799'LLww||IeDDr$   c               4    V ^8  d   QhRRRRRRRRRRR	R
RR/# )r   r  r   r  r   r   r   apt.package.Version
archivedirr   r   r   r   r    )r!   s   "r"   r#   r     sY     C! C!C! C! 	C!
 'C! C! %C! 
C!r$   c                	F   V P                  V4      pVP                   F,  pVP                  V\        4       4      P	                  V4       K.  	  . p	R VP
                  9   d/   V	\        P                  ! VP
                  R ,          4      ,          p	RVP
                  9   d/   V	\        P                  ! VP
                  R,          4      ,          p	V	 EF  p
V
^ ,          ^ ,          VP                  P                  8X  d   K/  V
^ ,          w  rpVP                  V4      '       d    W{,          pT F  pYP                  P                  8X  d   K  \        P                  P                  YX R24      p\        P                  ! T4       FI  pT P!                  T4      p\        P"                  ! TY4      '       g   K3  \        P$                  ! T4       KK  	   Yh K  	  ?EK  \        P                  P                  W[ R24      p\        P                  ! V4       FL  pV P!                  V4      p\        P"                  ! VW4      '       g   K3  \        P$                  ! V4        Wk KN  	  EK  	  R#   \         d     EK  i ; i  \         d     EK`  i ; i  \         d     K  i ; i)	ConflictsReplacesz_*.debN)r   provides
setdefaultr+   r:   recordr   parse_dependsr  r4  is_virtual_packager_   r4   r5   rP   rM  _deb_version	check_depunlink)r   r  r  r   r   r7  r   virtual_mappingr>   	conflictsconflictconflict_pkgconflict_verconflict_comptype	providersdebsr5   vers   &&&&&&&           r"   _remove_conflicting_packages0_AptDpkgPackageInfo._remove_conflicting_packages  s,    //8
 ##A&&q#%044W= $	)***..y/?/?/LMMI)))..y/?/?
/KLLI!H {1~!2!2!7!77
 =EQK9L(9++L99 / =I #A
 --222 77<<
cLAD $		$"//5",,S2CRRIIdO !0(O #  ww||J.0GH IIdOD++D1C((.?NN		$! , : ,K "    	& $   ( ! !s6   #I+I>J+I;:I;>JJJ J c               H    V ^8  d   QhRRRRRRRRRR	R
RRR	RRRRRR	RR	RR/# )r   r   r   r   r   r   r   zlist[tuple[str, str | None]]verboser   r0  r   r  r  r  install_dbginstall_depsr   r    )r!   s   "r"   r#   r   b  s     \! \!\! \! 	\!
 /\! \! \!  \! !\! &\! \! \! 
\!r$   c                	   V'       g   V P                  4       pV'       g   RpV P                  4       V n        EM{\        P                  P                  W#4      pWP                  4       8w  d   \        P                  P                  W#V4      p\        P                  P                  VR4      p\        P                  P                  VR4      p\        P                  P                  V4      '       gB   \        P                  P                  V4      '       d   \        P                  ! V4      '       d   Tp V P                  V P                  V4      4       \        \        P                  P                  W#R4      RR7      ;_uu_ 4       pVP!                  4       P#                  4       V n        RRR4       V'       d[   R	pT P%                  YV'       d   TMR
4      p\        P                  P'                  V4      '       g   \        P(                  ! V4       MRp\*        P,                  ! 4       p\.        P0                  P3                  RV4       \.        P0                  P5                  R4       \.        P0                  P3                  RV4       \.        P0                  P3                  RR4       V'       g*   \6        P8                  P:                  P=                  4       pM(\6        P8                  P>                  P=                  4       pV'       g1   V PA                  VVVV PC                  4       V P                  V	V4      pMV PE                  VVV PC                  4       V P                  V	4       \6        PF                  ! \        P                  PI                  V4      R7      p VPK                  V4       TP                  4        V PQ                  VV\R        PT                  ! V4      VVVV
VVVV4      pV'       d   \V        PX                  ! V4       V'       d   V P[                  V4       RP                  V4      #   \         d5   p\        P                  P                  R\        T4      4        Rp?ELRp?ii ; i  + '       g   i     EL; i  \6        PL                  PN                   d   p\        \        T4      4      ThRp?ii ; i)a  Install packages into a sandbox (for apport-retrace).

In order to work without any special permissions and without touching
the running system, this should only download and unpack packages into
the given root directory, not install them into the system.

configdir points to a directory with by-release configuration files for
the packaging system; this is completely dependent on the backend
implementation, the only assumption is that this looks into
configdir/release/, so that you can use retracing for multiple
DistroReleases. As a special case, if configdir is None, it uses the
current system configuration, and "release" is ignored.

release is the value of the report's 'DistroRelease' field.

packages is a list of ('packagename', 'version') tuples. If the version
is None, it should install the most current available version.

If cache_dir is given, then the downloaded packages will be stored
there, to speed up subsequent retraces.

If permanent_rootdir is True, then the sandbox created from the
downloaded packages will be reused, to speed up subsequent retraces.

If architecture is given, the sandbox will be created with packages of
the given architecture (as specified in a report's "Architecture"
field). If not given it defaults to the host system's architecture.

If origins is given, the sandbox will be created with apt data sources
for foreign origins.

If install_deps is True, then the dependencies of packages will also
be installed.

Return a string with outdated packages, or an empty string if all
packages were installed.

If something is wrong with the environment (invalid configuration,
package servers down, etc.), this should raise a SystemError with a
meaningful error message.
/etc/aptri   rh   zcannot determine mirror: %sNcodenamerE   rF   FsystemTzAPT::ArchitecturezAPT::ArchitectureszAPT::Architectures::zAcquire::Languagesnoner  rF  ).r  get_distro_codenamer   r4   r5   rP   rl   rm   r  $_get_primary_mirror_from_apt_sourcesr  r  r   r  r   rJ   rK   r2   r3  r   makedirsr  mkdtempr   r   r+   r   r   r   r  r  r  r  get_distro_namer  r  r  r  r  r  _install_packagescollectionsOrderedDictr   r   r   )r   r   r   r   r   rO  r0  r   r  r  rP  rQ  rf   arch_apt_dirarch_old_sourcesarch_sources_dirr  rS   tmp_aptrootr  r  r   obsoletes   &&&&&&&&&&&&           r"   install_packages$_AptDpkgPackageInfo.install_packagesb  s   t 779L G-1-E-E-GD* ggll96G;;==!ww||IM#%77<<n#M #%77<<>N#O 77>>"233GGNN#344DT9U9U*GR I I' RS
 Y<w 121A. K..I8G 77==))G$K&&(G.= 	121<@/8 \\..>>@N \\..>>@N++$$&..I ##$$&.. 		"''//'*BCI9  0 NN))##H-
 MM'"&&w/wwx  ]  R&&'Dc%jQQR  d 9911 9!#e*-589s<   6 P8 	$Q: R 8Q7)Q22Q7:R	S-SSc               H    V ^8  d   QhRRRRRRRRRRR	RR
RRRRRRRRRRR/# )r   r   r   r   r   zMutableMapping[str, str | None]rO  r   r   r  rP  rQ  r   r   r  r  r	  r   rX   r    )r!   s   "r"   r#   r     s     ` `` ` 2	`
 `  ` ` ` ` ` ` :` 
`r$   c                		  a aaa	aaa a!a"a#a$ \         P                  P                  R 4      o. o#\         P                  ! 4       p\        P
                  P                  VR4      p\        V4      p\        4       o$/ o"\         P                  ! V4      o . oV'       d%   S P                  W>S	S#4      pVP                  V4       R VVVV V"VV 3R llo!RR V	V!V#V$3R lllpR V	3R	 llpVP                  4        F  w  pp S	V,          p T'       d   TP&                  T,          Tn        TP(                  pTf   Q hS$P-                  T4       T'       d   S P/                  TT
S	TST4       TP0                  R8w  g   K  T'       g   K   T! T R2TTTRR7      pK  	  S$P?                  \A        W>S	S$4      4       \B        PB                  ! 4       p S	PE                  S R7       V'       d   \U        R4       S$P?                  \W        VVS VS"VS$4      4       \Y        W4       S$'       d   Q RRP                  S$4       24       hS##   \         dP    R
TP                  RR4       R2pS#P                  T R24       \         P"                  P%                  RT4        EK  i ; i  \         dh    S!! TT4      '       gU   TP(                  f   Q hS#P                  T RT RTP(                  P*                   R24       TP(                  P*                  p ELi ; i  \         Edj    TP3                  4        TP5                  TP6                  4      '       d   TP8                   Uu. uF7  pTP;                  R4      '       g   K  TS	9   g   K%  T! T4      '       d   K5  TNK9  	  Mu upi ppT'       dK   T FD  pS	T,          P(                  pT'       g   K   TP*                  T8w  g   K3  TP=                  T4       KF  	  M. pT'       d!   T F  pTS$9   d   K  T! TTT4      pK  	   EK(  Rp T! T R2TTT4      p EK=    \         dE    T'       d   S!! T R2T4      '       d   RpT'       g   S#P                  RT R24         EK    EK  i ; ii ; i  \F        PH                  PJ                   dK   p\         P"                  PM                  R\O        T4      4       \P        PR                  ! ^4        Rp?ELRp?ii ; i)zDir::Cache::archiveszpackages.txtc               $    V ^8  d   QhRRRRRR/# )r   r%  r   rK  r   r   r   r    )r!   s   "r"   r#   ;_AptDpkgPackageInfo._install_packages.<locals>.__annotate__)  s!     	  	 C 	 j 	 T 	 r$   c           	        < S
P                  S	WS4      w  r#V'       d2   SP                  \        P                  ! SVRV 2SR7      4       VSV &   \	        V4      # )a  Try to get binary package from Launchpad and stage download.

Try to get Launchpad URL and SHA1 sum for the given binary package
version. In case of success add the package to acquire_queue
for a download later.

Return True in case the binary package was found on Launchpad.
zsha1:)hashr  )r  rO   r   r  r   )r%  rK  lp_urlsha1sumacquire_queuer  r7  r   r   r   r   s   &&  r"   get_package_from_launchpadI_AptDpkgPackageInfo._install_packages.<locals>.get_package_from_launchpad)  sd     #88<OF $$''gY.?
 !$<r$   NFc               0    V ^8  d   QhRRRRRRRRRR	R
R	/# )r   r%  r   rK  r   r   r6  base_pkgraise_if_missingr   r   r    )r!   s   "r"   r#   ri  >  sD     !	 !	!	!	 +!	 !	!	
 #!	 !	r$   c                  < SV ,          pR pV'       d    VP                   V,          Vn        RpV'       g$    VP                   VP                  ,          Vn        S
P                  V 4       V#   \         d    S! Y4      '       d   Rp L[T'       d   h  Lfi ; i  \         d[    T'       dP   TP                  f   Q hS	P	                  RT RT RTP                   RT  RTP                  P                   R24        Li ; i)FTz"outdated debug symbol package for z: package version z or r   	 version rH   )versionsr   r_   r   rO   r:   )r%  rK  r   rr  rs  r  	pkg_foundr   ro  rc  r   s   &&&&&  r"   get_package:_AptDpkgPackageInfo._install_packages.<locals>.get_package>  s     nGI	(/(8(8(=G% $I 	(/(8(89J9J(KG% MM#'   1#;;$(	 * *   &00<<< @
 K003uD9J9J8KuIg.?.?.G.G-HLs5   A. "B .BBBBC?-AC?>C?c                    V ^8  d   QhRRRR/# rD  r    )r!   s   "r"   r#   ri  a  s     	U 	US 	UT 	Ur$   c                `   < SV ,          P                   pVRJ;'       d    RVP                  9   # )zyChecks if the package has "transitional" in the description.

Returns False in case no candidate version could be found.
Ntransitional)r   description)r  r   r   s   & r"   is_transitional_packageF_AptDpkgPackageInfo._install_packages.<locals>.is_transitional_packagea  s3    
 "'*44ID(TT^y?T?T-TTr$   r  %%% does not exist, ignoringrH   %sru  z required, but z is available
allz-dbgT)rs  z-dbgsymz"no debug symbol package found for )r   z+Package download error, try again later: %szExtracting downloaded debs...z*apt fetcher did not fetch these packages: r   )NF)-r   r   find_dirSourceRecordsr4   r5   rP   r   r+   r  _collect_dependenciesr  r,   r_   replacerO   r  r   r  rv  r   r   r:   rL  r  restartlookupr:  binariesr.   r^   difference_updater   timefetch_archivesr   r  r  r  r   sysexitprintrA   r   )%r   r   r   r   rO  r   r  rP  rQ  r   r  r  src_recordspkg_listr   depsrx  r~  r%  rK  	cache_pkgr  r   rw  r>   dbgsdbgdbg_candidater   r  rn  r7  r   ro  r   rc  r   s%   f&f&&&f&&f&&                  @@@@@@@r"   r\  %_AptDpkgPackageInfo._install_packages  s   " ^^,,-CD
 ++- 77<<81(; E	//.1--	8D OOD!	  	 *!	 !	F	U 	U !(HC%cN	
6*3*<*<S*AI' "++I(((MM# 11)Y
L %%.;;2" +%tc9cD!IC )h 	##XY	J	
 yy{	$$W$5 12##$!
	
 	$H; 	N78K7LM	N k  s{{3566OP1#R)&&tQ/	  61#s;;$..:::OO%y .  ) 3 3 ; ;<OM $--55C6.   ."  '')")))*?*?@@ &1%9%9 %9 zz&1  !"Y  %<A$>	 A%9    '+09#0H0H#0=]5J5Jc5Q$(KK$4 (,
  "!%A  !I~ ((3AsI(FI "& %*	"(3#&%wi)I  ( ""#=Wos#S#S04I#, (&HR$P!" !" $-	"O."p yy-- 	NN  =s5z HHQKK		s   :	H<JJL	R <AJJL3AL
L<RRN7N NN-RRR;RRP00Q?Q?	Q?Q?4R9R>Q??RS/%?S**S/c                    V ^8  d   QhRRRR/# )r   nameglobr   r   rX   r    )r!   s   "r"   r#   r     s     > ># >) >r$   c                h    \         P                  ! V P                  4       P                  4       V4      # )z2Return known package names which match given glob.)fnmatchfilterr  r   )r   r  s   &&r"   package_name_glob%_AptDpkgPackageInfo.package_name_glob  s"    ~~dkkm002H==r$   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r   r   r   r   r   r   r   rc  rX   r   z!collections.OrderedDict[str, str]r    )r!   s   "r"   r#   r     s<     / /*/ %/ 	/
 / 
+/r$   c                	   \        VP                  4       4      p\        P                  ! 4       pV F  p W7,          pTP                  p
T
f   Q hT
P                   F  pT^ ,          P                  pY9  d#   TP                  T4      ^ ,          P                  pY<,          P                  pTf   Q hTP                  pY9   d   Kj  Y9   d)   Y,,          pT P                  Y4      R8  d   YT&   M	YT&   MYT&   Y9  g   K  TP                  T4       K  	  K  	  V#   \         dP    R TP                  RR4       R2p	TP                  T	 R24       \        P                  P                  RT	4        EKB  i ; i)r  r  r  r  rH   r  ri  )r   r   r]  r^  r_   r  rO   r  r   r  r   dependenciesr4  get_providing_packagesr   compare_versions)r   r   r   r   rc  packages_to_checkr  r%  r  r  r   depr4  dep_candidatedep_pkg_versinst_versions   &&&&&           r"   r  )_AptDpkgPackageInfo._collect_dependencies  sk    !1&&($C%N	 "++I((( --1v{{($;;DA!DIID !* 9 9$000,44 ,
 '#/#5L,,\H2M%1T
%1T
!-J0%,,T27 . %L G  s{{3566OP1#R)&&tQ/	s   DAE43E4c                    V ^8  d   QhRRRR/# )r   argsrX   r   r   r    )r!   s   "r"   r#   r     s     3 3 3s 3r$   c                    \         P                  ! R.V ,           R\         P                  \         P                  R7      pVP                  ^ 8X  d   VP                  P                  R4      # \        R4      h)zJCall dpkg with given arguments and return output, or return None on
error.r(   Fr  r  zpackage does not exist)r/   r  r  r  r  r1   r  )r  r(   s   & r"   r  _AptDpkgPackageInfo._call_dpkg  sX     ~~HtO5
 ??a;;%%g..122r$   c                    V ^8  d   QhRRRR/# )r   r  r  r   rX   r    )r!   s   "r"   r#   r   )  s      % I r$   c           
        / p\         P                  ! RR.RV \         P                  \         P                  RVR7      pVP                  ^ 8X  d   . # VP                  P                  RRR7      p. pVP                  4        FD  pVP                  R	4      '       g   K  VP                  VP                  R
^4      ^ ,          4       KF  	  V# )z]Call md5sum.

This is separate from get_modified_files so that it is automatically
testable.
z/usr/bin/md5sumz-cFr  )r  inputr  r  r  r  r  r  )errorsFAILEDr  )
r/   r  r  r  r  r1   r  r.   rO   rsplit)r  r  md5sumr=   
mismatchesrT   s   &     r"   r  $_AptDpkgPackageInfo._check_files_md5(  s     !%????
 !Imm""79"=
NN$D}}X&&!!$++c1"5a"89 % r$   c                    V ^8  d   QhRRRR/# )r   rf   r   r   r    )r!   s   "r"   r#   r   G  s     
 
c 
c 
r$   c                   Rp\        V 4      pV F  pVP                  '       g   VP                  '       d   K)  \        V\        4      '       d)   VP
                  R8X  d   VP                  ;'       g    RpM$RVP                  9   d   VP                  ^ ,          pVf   K  VP                  R4      '       d!   \        V4      pV'       g   Q hV^ ,          u # Vu # 	  \        RV  24      h)z@Heuristically determine primary mirror from an apt sources.list.Nr&   rF  r   z\cannot determine default mirror: couldn't find configured source contains the `deb` type in )rr   disabledinvalidr   r   typert   typesurisrN   r   r  )rf   rt   ra   rC   r   s   &    r"   rX  8_AptDpkgPackageInfo._get_primary_mirror_from_apt_sourcesF  s     #G,F&... &+..;;%' ****C&,,&kk!n>>.11/4G"N7"1:%
# & KKR)U
 	
r$   c                    V ^8  d   QhRRRR/# )r   r   r   r   r    )r!   s   "r"   r#   r   c  s     7 7 7 7r$   c                ~    V P                   '       g   V P                  R4      V n         \        V P                   V4      # )zpReturn the distribution mirror URL.

If it has not been set yet, it will be read from the system
configuration.
rS  )r   rX  r|   )r   r   s   &&r"   _get_mirror_AptDpkgPackageInfo._get_mirrorc  s0     |||DDZPDL"4<<66r$   c               (    V ^8  d   QhRRRRRRRR/# )r   userr   distroppa_namer   r    )r!   s   "r"   r#   r   m  s.     N NS N# N N Nr$   c                	0    V P                    R V RV RV 2# )z/~z
/+archive/r  )r   )r   r  r  r  s   &&&&r"   _ppa_archive_url$_AptDpkgPackageInfo._ppa_archive_urlm  s&    &&'r$z&8*MMr$   c                    V ^8  d   QhRRRR/# )r   r   r   r   r    )r!   s   "r"   r#   r   p  s     

 

3 

3 

r$   c                T    V P                   e   V P                   # \        RV R24      h)z8Map a DistroRelease: field value to a release code name.zCannot map DistroRelease 'z+' to a code name without install_packages())r   r  )r   r   s   &&r"   _distro_release_to_codename/_AptDpkgPackageInfo._distro_release_to_codenamep  s:     ))5111!(	 2* *
 	
r$   c          
     ,    V ^8  d   QhRRRRRRRRRR/# )	r   contents_filenamer   mtimezfloat | Nonedistr   r   r   r    )r!   s   "r"   r#   r   |  s4     ' '!$'-9'AD'LO'	'r$   c           	     d   V P                  V4       RV RV R2pV'       Ed   \        P                  P                  VRR7      p\        P
                  ! \        4      ;_uu_ 4        \        P                  P                  V4      ;_uu_ 4       pVP                  RR4      pV'       dX   \        P                  P                  VR4      p	V	\        P                  P                  V4      8:  d    RRR4       RRR4       R	# RRR4       XP                  R
R4      R8X  d    RRR4       R	#  RRR4       R	V n         \        P                  P                  V4      p
\        TR4      ;_uu_ 4       p T
P                  R4      pT'       g   MTP                  T4       K.  RRR4       T
P!                  4        \"        P$                  P'                  T4      '       g   Q hR	#   + '       g   i     L; i  + '       g   i     L; i  \         d    RT9  d   h  R# i ; i  + '       g   i     L; i)z=Returns True on success (including when no update is needed)./dists/z
/Contents-.gzHEAD)methodzlast-modifiedNz%a, %d %b %Y %H:%M:%S %ZTzcontent-length40r   Fr   i@B )r  r  r  Request
contextlibsuppressrN  r  	getheaderdatetimestrptimefromtimestampr   rJ   rK   r   closer4   r5   rl   )r   r  r  r  r   rg  reqresmodified_strr  srcrS   datas   &&&&&        r"   _fetch_contents_file(_AptDpkgPackageInfo._fetch_contents_file|  s    !!$'(vZvSI5..((V(<C$$W--^^++C00C#&==$#GL##+#4#4#=#=(*D$ $x'8'8'F'Fu'MM#' 1 .-0 ==!148D@ .- A . !%	..((-C #T**axx( + 			ww~~/0000? 10 .-"  	 $	 +*sO   '(G2A G	/G2 G2<H /H
HG/*G22H	HHH/	c               (    V ^8  d   QhRRRRRRRR/# )r   r  r   r  r   r   r   r    )r!   s   "r"   r#   r     s(     ! !s !# !S !Z !r$   c                	P   \         P                  P                  W R V R24      p \         P                  ! V4      P                  p\        \        P                  ! 4       V,
          4      pVe   VR8  d   V P                  WEW#4      '       g   R# V#   \         d    RpRp L8i ; i)z
-Contents-r  NiQ )	r4   r5   rP   r   r  intr  rN  r  )r   r  r  r   r  r  ages   &&&&   r"   _get_contents_file&_AptDpkgPackageInfo._get_contents_file  s    GGLLz$s7ST	GG-.77EdiikE)*C
 ;#,,,->tRR    	EC	s   AB B%$B%c               (    V ^8  d   QhRRRRRRRR/# )r   file2pkgr   r  r   r  r   r   r    )r!   s   "r"   r#   r     s,     ) )$)9<)DG)	)r$   c                	   \         P                  ! \        P                  4       4      p\        P
                  ! VR 4      ;_uu_ 4       pVR9   d   \        ^ 4       F  p\        V4       K  	  V Fw  pVP                  V4      '       d   K  VP                  ^R7      w  rxVP                  R4      ^ ,          P                  R4      R,          p	Wp9   d   WV,          8X  d   Ks  WV&   Ky  	  RRR4       R#   + '       g   i     R# ; i)r   r      ,   /N>   trustyxenialri  )rw   compile_EXCLUDED_PATHSr   gziprJ   rangerv  rx   r  r3   )
r  r  r  path_exclude_patternr  r*   rT   r5   column2r  s
   &&&       r"   _update_given_file2pkg_mapping2_AptDpkgPackageInfo._update_given_file2pkg_mapping  s      "zz/*@*@*BCYY($//8++ rAN # !'--d33 $Q 7!---a066t<R@#4.0  ") ! 0///s   B"C44D	c               (    V ^8  d   QhRRRRRRRR/# )r   r  r   r   r   r   r   r    )r!   s   "r"   r#   r     s,      *-58	r$   c                	   R Fx  pV V 2pV P                  WV4      pVf   K!  V P                  WV4      pV'       d   \        V4      ^8X  d   RV n        V P                  '       g   Kf  V P	                  WvV4       Kz  	  X# )	-proposedT)r   rF  z	-securityz-updates)r  r   r  r   r  )r   r  r   r   pocketr  r  r  s   &&&&    r"   _get_file2pkg_mapping)_AptDpkgPackageInfo._get_file2pkg_mapping  s     AFYvh'D $ 7 7D Q (--lTJHs8}1(,% $$$33HQUV A r$   c          
     ,    V ^8  d   QhRRRRRRRRRR/# )r   r  r   r  r   r   r   r   r    )r!   s   "r"   r#   r     s4     # ##'1#<F#NX#	#r$   c                   V'       g9   V P                   '       g   \        P                  ! 4       V n         V P                   pVf   V P                  4       pVf   V P	                  4       pMV P                  V4      pV P                  W#V4      pV P                  '       d   V P                  W#V4       RV n        V^ ,          R8w  d   RV 2pVR,          P                  4       .p\        V4      pV'       d'   VP                  VR,          P                  4       4       V F  p WX,          P                  4       p	V	u # 	  R#   \         d     K0  i ; i)zSearch file in Contents.gz.NFr  :   NN)r   r  rZ  r  rW  r  r  r   r   r   r   rO   r1   r_   )
r   r  r  r   r   contents_mappingfilesusrmerge_filefilenamer%  s
   &&&&&     r"   r  $_AptDpkgPackageInfo._search_contents  s*    %%%%-%5%5%7"--L<//1D?..0G66w?G55lTR   ''tD$)D!7c>tf:Db"#.t4LLr*1134H&0779
    s   "E  EEc               $    V ^8  d   QhRRRRRR/# )r   r@  r   r  r   ztuple[str, str] | Noner    )r!   s   "r"   r#   r   
  s$     & &&#&&	&r$   c           
     	    VP                  R 4      '       g   R# VP                  R4      R,          pRp\        V4      ^8X  d   VP                  R4       Rp^pV\        V4      8  d   \        P                  RVRV 4      p\        P                  RW5R 4      p \        P                  ! \        P                  P                  V P                  WbVR7      4      4      ;_uu_ 4       pVP                  4        Wg3uuRRR4       # R#   + '       g   i     K  ; i  \        P                  P                   dD    T^,          pT\        T4      8X  d&   T'       d   TP                  R4       Rp^p EK   EK   EK#  i ; i)LP-PPA-Nr   :r   NNTppaFr  r  r  )rN   r3   r  rO   r   rP   r  closingr  r  r  r  rK   r  r  )	r   r@  r  
componentstry_ppaindexr  r  r  s	   &&&      r"   _analyze_ppa_origin_string._AptDpkgPackageInfo._analyze_ppa_origin_string
  sX      ++\\#&r*
 z?ae$Gc*o% 88CFU!34DxxZ%78H"''NN**--!%x .   MMO>   !   <<(( "
C
O+"))%0"' !  ,"s7   AD 'D:
D D	D D ?E=E=<E=c               (    V ^8  d   QhRRRRRRRR/# )r   r@  r   r  r  r   z,list[Deb822SourceEntry | SourceEntry] | Noner    )r!   s   "r"   r#   r   2  s,     &  & & #&& :=& 	5& r$   c           	     Z   V P                  W4      pV'       g   R# Vw  rVRV RV RV RV R2	p\        RR4      pRV RV RV 2.Vn        RR.Vn        R	.Vn        V.Vn         \        P                  ! \        P                  P                  V4      4      ;_uu_ 4       p	V	P                  4        RRR4       \        RR4      p
RV RV RV 2.V
n        R.V
n        R
.V
n        V.V
n        W.#   + '       g   i     LH; i  \        P                  P                   d    T.u # i ; i)aJ  For an origin from a Launchpad PPA create sources.list content.

distro is the distribution for which content is being created e.g.
ubuntu.

release_codename is the codename of the release for which content is
being created e.g. trusty.

Returns None if the origin is not a Launchpad PPA, a list of source
entry objects otherwise.Nzhttp://ppa.launchpad.net/r  r  z/main/debugrF  r&   zdeb-srcmainz
main/debug)r  r   r  r  compssuitesr  r  r  r  r  rK   r  r  )r   r@  r  r  ppa_datar  r  	debug_url
main_entryr  debug_entrys   &&&&       r"   create_ppa_source_from_origin1_AptDpkgPackageInfo.create_ppa_source_from_origin2  sJ    226B!'vQxj&&'{4 	
 'tR0
6tfAhZqQR
!9-
"8
-.

	 ##FNN$:$:9$EFF( G+D"5K";D68*AfX VWK!&K!-K"2!3K,, GF ||$$ 	 <	 s*   &;D !C22?D 2D	=D "D*)D*c               $    V ^8  d   QhRRRRRR/# )r   r@  r   
src_list_dr   r   r    )r!   s   "r"   r#   r   [  s!      c s z r$   c                   \         P                  P                  V4      '       d   \         P                  P                  W R24      \         P                  P                  W R24      .pRV 9   d]   V P	                  R4      pV\         P                  P                  V R24      \         P                  P                  V R24      .,          pV F,  p\         P                  P                  V4      '       g   K*  Vu # 	  R# )zUFind a possible source file matching the Origin field of a
given package (i.e. a PPA)z.sourcerk   zLP-PPAr  N)r4   r5   r   rP   r2   rl   )r@  r#  
candidatesstrippedr5   s   &&   r"   _find_source_file_from_origin1_AptDpkgPackageInfo._find_source_file_from_originZ  s     77==$$
 Z87);<Z85)9:J 6!!<<	2GGLLH:W!56GGLLH:U!34 

 #77>>$''K # r$   c               0    V ^8  d   QhRRRRRRRRRRRR	/# )
r   apt_rootr   rf   r
  r  r  r  r   r   r    )r!   s   "r"   r#   r   r  sN     t? t?t? t? 	t?
 t? &t? 
t?r$   c                	(   \         P                  P                  \         P                  P                  VR RR4      4      '       Eg   \         P                  ! \         P                  P                  VR RRRR4      4       \         P                  ! \         P                  P                  VR RRRR4      4       \         P                  ! \         P                  P                  VR RR4      4       \         P                  ! \         P                  P                  VRRR	4      4       \         P                  ! \         P                  P                  VRRR
4      4       \         P                  P                  VR4      p\         P                  P                  VRRR4      p\         P                  P                  V4      '       d   \
        P                  ! V4       \         P                  P                  V4      '       d   \
        P                  ! Wg4       M\         P                  ! V4       \         P                  P                  VR4      p\         P                  P                  V4      '       d}   \        VRR7      ;_uu_ 4       p	\        \         P                  P                  VRRR4      RRR7      ;_uu_ 4       p
V
P                  V	P                  4       4       RRR4       RRR4       \         P                  P                  VR4      p\         P                  P                  V4      '       d8   \
        P                  ! V\         P                  P                  VRR4      4       M[\         P                  P                  R4      '       d7   \
        P                  ! R\         P                  P                  VRR4      4       \         P                  P                  VRRR4      p\         P                  P                  V4      '       d   \
        P                  ! V4       \         P                  P                  V R24      '       d   \
        P                  ! V R2V4       MS\         P                  P                  R4      '       d   \
        P                  ! RV4       M\         P                  ! V4       V'       Ed}   / pV EF  pVR8X  d   K  V P                  W4      pRpV'       g   V P                  WV4      pM]VP                  R4      '       d<   Rp\        VRR7      ;_uu_ 4       p	V	 Uu. uF  p\!        V4      NK  	  ppRRR4       M\#        V4      pX'       d   \        \         P                  P                  VRRRVV,           4      RRR7      ;_uu_ 4       p
T
P                  RP                  V Uu. uF  pV R2NK
  	  up4      4       RRR4       V Fr  pVP$                  '       d   RVP$                  9  d   K(  VP$                  P'                  R4      ^,          pVP$                  P'                  R4      ^,          pVV3W&   Kt  	  EK  \(        P*                  P-                  RV4       EK  	  VP/                  4        F  w  pw  ppV P1                  \2        P4                  P7                  V4      V\2        P4                  P7                  V4      R7      pV P9                  V R24      pV'       g   Ku  \:        P<                  ! V4      V R 2,          pVP?                  VRR7       K  	  R# R#   + '       g   i     ELj; i  + '       g   i     ELv; iu upi   + '       g   i     EL ; iu upi   + '       g   i     EL; i)!varlibr   listspartialr  archivesr(   etcz
apt.conf.dzpreferences.drh   ri   rE   rF   r   Nztrusted.gpgz/etc/apt/trusted.gpgztrusted.gpg.dz.dz/etc/apt/trusted.gpg.dr  r[   rk   arH   zppa.launchpad.netr  z-Could not find or create source config for %sr  z?ws.op=getSigningKeyDataz.asc) r4   r5   rl   rP   rY  r   r   r   copytreerJ   r   rK   r  r'  r   r.   r   rU   rt   r3   r  r   r  r,   r  r  r  quoter  r   r   
write_text)r   r*  rf   r
  r  r  r#  
dst_list_dold_sourcesr  desttrusted_gpg	trusted_dorigin_datar@  origin_path	extensionsource_list_contentrT   entryr  r  ppa_userr  ppa_archive_urlppa_keykey_files   &&&&&&                     r"   r  &_AptDpkgPackageInfo._build_apt_sandboxr  sg    ww~~bggll8UE5IJJKKXueUGYWXKKXuguj)T KKXueVDEKKXue\JKKKXue_MN WW\\'+;<
WW\\(E5:JK
77>>*%%MM*%77==$$OOJ3KK
#ggll7N;77>>+&&kG44GGLL5%H$  JJsxxz* 5 ggll7M:77>>+&&KKRWW\\(E5%IJWW^^233KK.Xue0TUGGLL5%I	77>>)$$MM)$77>>[M,--OO{m2.	:WW^^455OO4i@KK	"7K! Y&"@@T&	"*.*L*L-=+' !))'22 'IkG<<MP.QST{4/@S+.Q =< +@*L'&$eU4DfyFX !(  

 IIAT&UAT%|AT&UV "5$yyy,?uyy,P$$yys3A6#iiooc215/3Sk+ "5 NN**GG "P 1<0A0A0C,,8"&"7"7++H5&#\\//9 #8 #
 ++&''?@ "<<	2xt_D##Gg#> 1DW 5   544X /R =<< 'V  s`   7]9 \:	])]'.]"
]'^ 9];^ :]	]]	"]'']8;^  ^c                    V ^8  d   QhRRRR/# )r   r%  r   r   r    )r!   s   "r"   r#   r     s      # # r$   c                    \         P                  ! RRV R.R\         P                  R7      pVP                  P	                  R4      P                  4       pV'       g   Q hV# )z"Return the version of a .deb file.r'   z-fVersionTr  r  r  )r%  r(   r=   s   &  r"   r@   _AptDpkgPackageInfo._deb_version  sQ     ~~sI.d:??
 kk  )//1
s
r$   c               $    V ^8  d   QhRRRRRR/# )r   ver1r   ver2r   r  r    )r!   s   "r"   r#   r     s!     3 3S 3 3 3r$   c                .    \         P                  ! W4      # )zdCompare two package versions.

Return -1 for ver < ver2, 0 for ver1 == ver2, and 1 for ver1 > ver2.
)r   version_compare)r   rJ  rK  s   &&&r"   r  $_AptDpkgPackageInfo.compare_versions  s    
 &&t22r$   c                   V ^8  d   QhRR/# r  r    )r!   s   "r"   r#   r     s     % %S %r$   c                l   V P                   f1    \        P                  ! 4       pVR,          V n         V P                   # V P                   #   \        \        3 dX    \
        P                  ! RR.R\
        P                  RR7      pTP                  P                  4       T n          T P                   # i ; i)z(Get "lsb_release -sc", cache the result.VERSION_CODENAMElsb_releasez-scT)r  r  r  )
_distro_codenamer\   r]   r_   rN  r/   r  r  r  r2   )r   rb   rR  s   &  r"   rW  '_AptDpkgPackageInfo.get_distro_codename  s      (C668(,-?(@% $$$t$$$ g& C(nn"E*%??	 )4(:(:(@(@(B%$$$Cs   #A AB32B3c                   V ^8  d   QhRR/# r  r    )r!   s   "r"   r#   r     s     	! 	! 	!r$   c                    V P                   f]   V P                  4       ^ ,          P                  4       V n         RV P                   9   d"   V P                   P                  RR4      V n         V P                   # )zjGet osname from /etc/os-release, or if that doesn't exist,
'lsb_release -sir' output and cache the result.r   r   )_distro_namerG  r  r  r   s   &r"   r[  #_AptDpkgPackageInfo.get_distro_name  sd     $ $ 3 3 5a 8 > > @Dd'''$($5$5$=$=c3$G!   r$   )r   r   r   r   r   rS  rW  r   r   r   r   r   )F)FNNNr   rj  )FNFNNTF)Er   
__module____qualname____firstlineno____doc__r   r   r   r   r   r   r   r  r  r  r'  r+  r3  r<  rA  rI  rQ  staticmethodr  r  r  r  r  r  r  r  r  r  	functoolsr  r  r  r  r  r(  r-  r3  rL  rd  r\  r  r  r  r  rX  r  r  r  r  r  r  r  r  r  r   r'  r  r@  r  rS  rW  rW  r[  __static_attributes__r    r$   r"   r   r   <  s#   O
&);*6''BL!	
> 48 )' )'V # #0  :>P2h(T  *3j __   __#  #V&"bH.EC!L\!~`D>/b 3 3  : 
 
87N

'R!" ) )0,#J&P& P  .t?l  3 %$ L	! 	!r$   r   )<r\  
__future__r   r]  r  r  r  r^  rM  r  r  r  r   r4   r   r   r\   rw   r   r   r/   r  r  r  urllib.errorr  urllib.parseurllib.requestcollections.abcr   r   r   r   r   	apt.cacheapt.packageapt.progress.baseapt.progress.textr   aptsources.sourceslistr   r   apport.loggingr  apport.package_infor	   r   r  rA   rU   rd   rr   r|   r   r   r   r   r   r   implr    r$   r"   <module>rm     s  ( #           	    	    
      G G 
      A  +  "
&"# B5 $N(
6&

(!V\!+ \!~6 r$   