+
    oÆFjU.  ã                   óT   € R t ^ RIt^ RIt^ RIt^ RIt^ RIt ! R R4      t]! 4       tR# )z—A partial apport.PackageInfo class implementation for RPM.

Used as a base class for Fedora, RHEL, openSUSE, SUSE Linux, and many other
distributions.
Nc                   ó~  a € ] tR t^#t o RtR&tV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR	 lt	V 3R
 lR lt
V 3R lR ltV 3R lR ltV 3R lR ltR'V 3R lR llt]V 3R lR l4       tV 3R lR ltV 3R lR ltR(V 3R lR lltV 3R lR ltV 3R lR  ltR! t]R" 4       t]R# 4       t]R$ 4       tR%tV tR# ))ÚRPMPackageInfoz_Partial apport.PackageInfo class implementation for RPM, as
found in Fedora, RHEL, CentOS, etc.c                ó   <€ V ^8„  d   QhRR/# )é   ÚreturnN© )ÚformatÚ__classdict__s   "€Ú;/usr/lib/python3/dist-packages/apport/packaging_impl/rpm.pyÚ__annotate__ÚRPMPackageInfo.__annotate__+   s   ø€ ÷ (ñ (˜$ñ (ó    c                óH   € \         P                  ! 4       V n        R V n        R # )N)ÚrpmÚTransactionSetÚtsÚ_mirror)Úselfs   &r
   Ú__init__ÚRPMPackageInfo.__init__+   s   € Ü×$Ò$Ó&ˆŒØ#'ˆŽr   c                ó&   <€ V ^8„  d   QhRS[ RS[ /# ©r   Úpackager   ©Ústr)r   r	   s   "€r
   r   r   /   s   ø€ ÷ 
3ñ 
3¡3ð 
3©3ñ 
3r   c                ó*  € V P                  V4      pVf   \        RV R24      hVR,          '       g   VR,           RVR,           2# VR,          '       d   VR,          '       g   \        RV R24      hVR,           RVR,           RVR,           2# )	z*Return the installed version of a package.zpackage z does not existÚeÚvÚ-Úrz misses version informationÚ:)Ú_get_headerÚ
ValueError©r   r   Úhdrs   && r
   Úget_versionÚRPMPackageInfo.get_version/   s–   € à×Ñ˜wÓ'ˆØŠ;Ü˜x¨ y°Ð@ÓAÐAà3xŒxØ˜#•hZ˜q  S¥ 
Ð+Ð+Ø3xŒx˜s 3ŸxœxÜ˜x¨ yÐ0KÐLÓMÐMØc•(˜1˜S X˜J a¨¨C­ zÐ2Ð2r   c                ó&   <€ V ^8„  d   QhRS[ RS[ /# r   r   )r   r	   s   "€r
   r   r   ;   s   ø€ ÷ 
ñ 
©Sð 
±Sñ 
r   c                ó   € \        R4      h)z1Return the latest available version of a package.úEmethod must be implemented by distro-specific RPMPackageInfo subclass©ÚNotImplementedError)r   r   s   &&r
   Úget_available_versionÚ$RPMPackageInfo.get_available_version;   s   € ô "ØSó
ð 	
r   c                ó6   <€ V ^8„  d   QhRS[ RS[S[ ,          /# r   ©r   Úlist)r   r	   s   "€r
   r   r   B   s   ø€ ÷ ñ ©ð ±±Sµ	ñ r   c                óx  € V P                  V4      p. pVR,           F™  pVP                  R4      '       g   VP                  R4      '       d   K3  V^ ,          R8X  d   V P                  RV4      pMV P                  RV4      pV F-  pV P                  V4      pWs9  g   K  VP	                  V4       K/  	  K›  	  V# )z/Return a list of packages a package depends on.ÚrequiresÚrpmlibzuname(Ú/Ú	basenamesÚprovides)r!   Ú
startswithÚ_get_headers_by_tagÚ_make_envra_from_headerÚappend)r   r   r$   Úreqsr   Ú	req_headsÚrhÚrh_envras   &&      r
   Úget_dependenciesÚRPMPackageInfo.get_dependenciesB   s©   € à×Ñ˜wÓ'ˆàˆØZ—ˆAØ|‰|˜H×%Ò%¨¯©°h×)?Ò)?ÙØtsŒ{Ø ×4Ñ4°[À!ÓD‘	à ×4Ñ4°ZÀÓC	ÛØ×7Ñ7¸Ó;ØÖ'Ø—K‘K Ö)ó  ñ !ð ˆr   c                ó&   <€ V ^8„  d   QhRS[ RS[ /# r   r   )r   r	   s   "€r
   r   r   T   s   ø€ ÷  ñ  ¡#ð  ©#ñ  r   c                ó6   € V P                  V4      pVR,          # )z-Return the source package name for a package.Ú	sourcerpm©r!   r#   s   && r
   Ú
get_sourceÚRPMPackageInfo.get_sourceT   s   € à×Ñ˜wÓ'ˆØ;ÕÐr   c                ó&   <€ V ^8„  d   QhRS[ RS[ /# r   r   )r   r	   s   "€r
   r   r   Y   s   ø€ ÷ 	ñ 	©ð 	±ñ 	r   c                ó6   € V P                  V4      pVR,          # )z‰Return the architecture of a package.

This might differ on multiarch architectures (e. g.  an i386 Firefox
package on a x86_64 system).
ÚarchrD   r#   s   && r
   Úget_architectureÚRPMPackageInfo.get_architectureY   s   € ð ×Ñ˜wÓ'ˆØ6{Ðr   c                ó6   <€ V ^8„  d   QhRS[ RS[S[ ,          /# r   r/   )r   r	   s   "€r
   r   r   d   s   ø€ ÷ ñ ¡ð ©©c­ñ r   c                óÐ   € V P                  V4      p. p\        VR,          VR,          4       F4  w  rE\        P                  ! V4      '       d   K#  VP	                  V4       K6  	  V# )z*Return list of files shipped by a package.Ú	filenamesÚ	filemodes)r!   ÚzipÚstatÚS_ISDIRr:   )r   r   r$   ÚfilesÚfÚmodes   &&    r
   Ú	get_filesÚRPMPackageInfo.get_filesd   sU   € à×Ñ˜wÓ'ˆØˆÜ˜3˜{Õ+¨S°Õ-=Ö>‰GˆAÜ—<’< ×%Ô%Ø—‘˜Q–ñ ?ð ˆr   c                ó6   <€ V ^8„  d   QhRS[ RS[S[ ,          /# r   r/   )r   r	   s   "€r
   r   r   m   s   ø€ ÷ ñ ©#ð ±$±sµ)ñ r   c                ó  € V P                  V4      pVR,          pVR,          pVR,          p. p\        V4       FÊ  w  rxWW,          '       g   K  \        P                  ! V\        P                  4      '       g   KB  \        P
                  ! V4      p	\
        P                  ! V	P                  4      '       g   K€  WG,          V	P                  8X  d   K™  V P                  W…V,          4      '       d   K¹  VP                  V4       KÌ  	  V# )z/Return list of all modified files of a package.rN   Ú
filemtimesÚfilemd5s)r!   Ú	enumerateÚosÚaccessÚR_OKrQ   ÚS_ISREGÚst_modeÚst_mtimeÚ	_checkmd5r:   )
r   r   r$   rS   ÚmtimesÚmd5sÚmodifiedÚiÚfilenameÚss
   &&        r
   Úget_modified_filesÚ!RPMPackageInfo.get_modified_filesm   sÂ   € à×Ñ˜wÓ'ˆàKÕ ˆØ\Õ"ˆØ:ˆàˆÜ$ UÖ+‰KˆAà—7”7Ùä—9’9˜X¤r§w¡w×/Ò/Ùä—’˜Ó!ˆAÜ—<’< §	¡	×*Ò*Ùày˜AŸJ™JÔ&Ùà—>‘> (°­G×4Ô4Ø—‘ Ö)ñ! ,ð$ ˆr   Nc                óv   <€ V ^8„  d   QhRS[ RS[RS[ R,          RS[ R,          RS[ R,          RS[ R,          /# )r   ÚfileÚuninstalledÚmap_cachedirNÚreleaserI   r   ©r   Úbool)r   r	   s   "€r
   r   r   Š   sW   ø€ ÷ 
ñ 
áð
ñ ð
ñ ˜D•jð	
ñ
 t•ð
ñ Djð
ñ 
ˆtñ
r   c                ó   € \        R4      h)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.
r)   r*   )r   rm   rn   ro   rp   rI   s   &&&&&&r
   Úget_file_packageÚRPMPackageInfo.get_file_packageŠ   s   € ô, "ØSó
ð 	
r   c                ó    <€ V ^8„  d   QhRS[ /# )r   r   r   )r   r	   s   "€r
   r   r   ¥   s   ø€ ÷ 
ñ 
¡Sñ 
r   c                 óŽ   € \         P                  ! . ROR\         P                  RR7      p V P                  P	                  4       pV# )z[Return the architecture of the system, in the notation used by the
particular distribution.T)ÚcheckÚstdoutÚtext)r   z--evalz%_target_cpu)Ú
subprocessÚrunÚPIPEry   Ústrip)ÚrpmarchrI   s     r
   Úget_system_architectureÚ&RPMPackageInfo.get_system_architecture¤   s;   € ô —.’.Ú-ØÜ—?‘?Øô	
ˆð ~‰~×#Ñ#Ó%ˆØˆr   c                ó&   <€ V ^8„  d   QhRS[ RS[/# r   rq   )r   r	   s   "€r
   r   r   ±   s   ø€ ÷ ñ ©ð ±ñ r   c                óö   € V P                   '       g   \        R4      hV P                  V4      pV'       g   R# VR,          '       d2   VR,          R,          P                  R4      pW0P                   9   d   R# R# )zYCheck if a package is a genuine distro package (True) or comes from
a third-party source.z0Subclass the RPM implementation for your distro!FÚsiggpg:é   é   NÚhexT)Úofficial_keylistr+   r!   Úencode)r   r   r$   Úkeyids   &&  r
   Úis_distro_packageÚ RPMPackageInfo.is_distro_package±   sn   € ð ×$×$Ð$Ü%ØBóð ð ×Ñ˜wÓ'ˆßÙð ˆx=Œ=à˜•M %Õ(×/Ñ/°Ó6ˆEØ×-Ñ-Ô-ÙÙr   c                ó$   <€ V ^8„  d   QhRS[ RR/# )r   Úurlr   Nr   )r   r	   s   "€r
   r   r   Å   s   ø€ ÷ ñ ™cð  dñ r   c                ó   € Wn         R# )zÃExplicitly 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Ž   s   &&r
   Ú
set_mirrorÚRPMPackageInfo.set_mirrorÅ   s	   € ð Žr   c                ób   <€ V ^8„  d   QhRS[ RS[ RS[ R,          RS[ R,          RS[ R,          /# )r   Ú
srcpackageÚ
output_dirÚversionNÚsandboxr   r   )r   r	   s   "€r
   r   r   Ï   sI   ø€ ÷ 
ñ 
áð
ñ ð
ñ t•ð	
ñ
 t•ð
ñ 
ˆtñ
r   c                ó   € \        R4      h)as  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, that sandbox is used to download the source
package, otherwise it uses the system configuration.

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.
r)   r*   )r   r“   r”   r•   r–   s   &&&&&r
   Úget_source_treeÚRPMPackageInfo.get_source_treeÏ   s   € ô0 "ØSó
ð 	
r   c                ó,   <€ V ^8„  d   QhRS[ RS[ RS[/# )r   Úver1Úver2r   )r   Úint)r   r	   s   "€r
   r   r   ë   s"   ø€ ÷ 
ñ 
¡Sð 
±ð 
¹ñ 
r   c                ó   € \        R4      h)zdCompare two package versions.

Return -1 for ver < ver2, 0 for ver1 == ver2, and 1 for ver1 > ver2.
r)   r*   )r   r›   rœ   s   &&&r
   Úcompare_versionsÚRPMPackageInfo.compare_versionsë   s   € ô "ØSó
ð 	
r   c                ó6   <€ V ^8„  d   QhRS[ RS[S[ ,          /# )r   Únameglobr   r/   )r   r	   s   "€r
   r   r   ù   s   ø€ ÷ *ñ *©#ð *±$±sµ)ñ *r   c                ó   € \        R4      h)z2Return known package names which match given glob.ÚTODOr*   )r   r¢   s   &&r
   Úpackage_name_globÚ RPMPackageInfo.package_name_globù   s   € ä! &Ó)Ð)r   c                óˆ   € V P                   P                  W4      pVP                  4       ^ 8X  d   \        RV RV 24      hV# )zIGet a list of RPM headers by doing dbMatch on the given tag and
argument.zCould not find package with z: )r   ÚdbMatchÚcountr"   )r   ÚtagÚargÚmatchess   &&& r
   r8   Ú"RPMPackageInfo._get_headers_by_tag  sB   € ð —'‘'—/‘/ #Ó+ˆØ=‰=‹?˜aÔÜÐ;¸C¸5ÀÀ3À%ÐHÓIÐIØˆr   c                ó"  € T p\        V 4      pV^ 8”  df   \        P                  P                  RV4      p\	        V4      p\        V4      ^ 8”  d   V^ ,          pM V^ \        V4      ^,
           pV^,
          pKl  V^ 8X  d   \        RV  24      hX# )z0Get the RPM header that matches the given ENVRA.Únamez!No headers found for this envra: )ÚlenÚimplr   r¨   r0   r"   )ÚenvraÚquerystrÚqlenÚmiÚhdrsÚhs   &     r
   r!   ÚRPMPackageInfo._get_header
  sŽ   € ð ˆÜ5‹zˆØQŒhÜ—‘—‘ ¨Ó2ˆBÜ˜“8ˆDÜ4‹y˜1Œ}ð
 ˜•GØð   ¤C¨£M°AÕ$5Ð6ˆHØ˜!•8ŠDà1Œ9ÜÐ@ÀÀÐHÓIÐIØˆr   c                óš   € V R,           RV R,           RV R,           RV R,           2pV R,          '       d   V R,           RV 2pV# TpV# )	z,Generate an ENVRA string from an rpm header.Únr   r   r   Ú.rI   r   r    r   )r·   Únvrar²   s   &  r
   r9   Ú&RPMPackageInfo._make_envra_from_header"  s`   € ð C•&˜˜1˜S6˜( ! A c¥F 8¨1¨Q¨v­Y¨KÐ8ˆØˆS6Œ6Ø˜•vh˜a ˜vÐ&ˆEð ˆð ˆEØˆr   c                óô   € \         P                  ! 4       p\        V RR7      ;_uu_ 4       pVP                  4       pRRR4       VP	                  X4       WP                  4       8H  #   + '       g   i     L3; i)zCheck a file's md5sum.zutf-8)ÚencodingN)ÚhashlibÚmd5ÚopenÚreadÚupdateÚ	hexdigest)rh   Úfilemd5ÚmÚmd5_fileÚdatas   &&   r
   rc   ÚRPMPackageInfo._checkmd5,  sQ   € ô KŠK‹MˆÜ( W×-Õ-°Ø—=‘=“?ˆD÷ .à	‰ŒØŸ+™+›-Ñ'Ð'÷ .×-ús   «A'Á'A7	)r   r   r   )FNNN)NN)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rˆ   r   r%   r,   r?   rE   rJ   rV   rj   rt   Ústaticmethodr€   r‹   r   r˜   rŸ   r¥   r8   r!   r9   rc   Ú__static_attributes__Ú__classdictcell__)r	   s   @r
   r   r   #   só   ø‡ € ñ+ð
 Ð÷(ð (÷
3ð 
3÷
ð 
÷ð ÷$ ð  ÷
	ð 	÷ð ÷ð ÷:
ò 
ð4 ÷
ó ð
÷ð ÷(ð ÷
ò 
÷8
ð 
÷*ð *òð ñó ðð. ñó ðð ñ(ó ö(r   r   )rÏ   rÀ   r]   rQ   r{   r   r   r±   r   r   r
   Ú<module>rÓ      s4   ðñó0 Û 	Û Û ó ÷P(ñ P(ñf Ó‚r   