+
    oÆFj–5  ã                   ó:   € R t ^ RIt^ RIt^ RIHt  ! R R4      tR# )ú$Abstraction of packaging operations.N)ÚIterablec                   ó  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V 3R lR ltV 3R lR ltR7V 3R lR llt]V 3R lR l4       t]V 3R lR l4       tR8V 3R lR lltV 3R  lR! ltR9V 3R" lR# l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tV 3R. lR/ ltV 3R0 lR1 ltRt]V 3R2 lR3 l4       tV 3R4 lR5 lt R6t!V t"R# );ÚPackageInfor   z/etc/default/apportc                ó&   <€ V ^8„  d   QhRS[ RS[ /# ©é   ÚpackageÚreturn©Ústr)ÚformatÚ__classdict__s   "€Ú5/usr/lib/python3/dist-packages/apport/package_info.pyÚ__annotate__ÚPackageInfo.__annotate__   s   ø€ ÷ 
ñ 
¡3ð 
©3ñ 
ó    c                ó   € \        R4      h)zXReturn the installed version of a package.

Throw ValueError if package does not exist.
ú6this method must be implemented by a concrete subclass©ÚNotImplementedError©Úselfr	   s   &&r   Úget_versionÚPackageInfo.get_version   ó   € ô
 "ØDó
ð 	
r   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)z_Return the latest available version of a package.

Throw ValueError if package does not exist.
r   r   r   s   &&r   Úget_available_versionÚ!PackageInfo.get_available_version    r   r   c                ó6   <€ V ^8„  d   QhRS[ RS[S[ ,          /# r   ©r   Úlist)r   r   s   "€r   r   r   )   s   ø€ ÷ 
ñ 
©ð 
±±Sµ	ñ 
r   c                ó   € \        R4      h)z/Return a list of packages a package depends on.r   r   r   s   &&r   Úget_dependenciesÚPackageInfo.get_dependencies)   ó   € ä!ØDó
ð 	
r   c                ó&   <€ V ^8„  d   QhRS[ RS[ /# r   r   )r   r   s   "€r   r   r   /   s   ø€ ÷ 
ñ 
¡#ð 
©#ñ 
r   c                ó   € \        R4      h)z[Return the source package name for a package.

Throw ValueError if package does not exist.
r   r   r   s   &&r   Ú
get_sourceÚPackageInfo.get_source/   r   r   c                ó4   <€ V ^8„  d   QhRS[ RS[ R,          /# )r   r	   r
   Nr   )r   r   s   "€r   r   r   8   s   ø€ ÷ 

ñ 

©#ð 

±#¸µ*ñ 

r   c                ó   € \        R4      h)zªReturn 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.
r   r   r   s   &&r   Úget_package_originÚPackageInfo.get_package_origin8   ó   € ô "ØDó
ð 	
r   c                ó&   <€ V ^8„  d   QhRS[ RS[/# r   ©r   Úbool)r   r   s   "€r   r   r   D   s   ø€ ÷ 

ñ 

©ð 

±ñ 

r   c                ó   € \        R4      h)z¬Check package origin.

Return True if the package is a genuine distro package, or False if it
comes from a third-party source.

Throw ValueError if package does not exist.
r   r   r   s   &&r   Úis_distro_packageÚPackageInfo.is_distro_packageD   r/   r   c                ó&   <€ V ^8„  d   QhRS[ RS[ /# r   r   )r   r   s   "€r   r   r   P   s   ø€ ÷ 
ñ 
©ð 
±ñ 
r   c                ó   € \        R4      h)z‡Return the architecture of a package.

This might differ on multiarch architectures (e. g. an i386 Firefox
package on a x86_64 system)
r   r   r   s   &&r   Úget_architectureÚPackageInfo.get_architectureP   ó   € ô "ØDó
ð 	
r   c                ó6   <€ V ^8„  d   QhRS[ RS[S[ ,          /# r   r!   )r   r   s   "€r   r   r   Z   s   ø€ ÷ 
ñ 
¡ð 
©©c­ñ 
r   c                ó   € \        R4      h)zXReturn list of files shipped by a package.

Throw ValueError if package does not exist.
r   r   r   s   &&r   Ú	get_filesÚPackageInfo.get_filesZ   r   r   c                ó6   <€ V ^8„  d   QhRS[ RS[S[ ,          /# r   r!   )r   r   s   "€r   r   r   c   ó   ø€ ÷ 
ñ 
©#ð 
±$±sµ)ñ 
r   c                ó   € \        R4      h)z/Return list of all modified files of a package.r   r   r   s   &&r   Úget_modified_filesÚPackageInfo.get_modified_filesc   r&   r   c                óL   <€ V ^8„  d   QhRS[ RS[S[ S[S[ ,          3,          /# r   )r   ÚdictÚbytes)r   r   s   "€r   r   r   i   s)   ø€ ÷ 
ñ 
©cð 
±d¹3ÁÉÅÐ;KÕ6Lñ 
r   c                ó   € / # )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.
© r   s   &&r   Úget_modified_conffilesÚ"PackageInfo.get_modified_conffilesi   s	   € ð ˆ	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ÚreleaseÚarchr
   r1   )r   r   s   "€r   r   r   u   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   rL   rM   rN   rO   rP   s   &&&&&&r   Úget_file_packageÚPackageInfo.get_file_packageu   s   € ô( "ØDó
ð 	
r   c                ó    <€ V ^8„  d   QhRS[ /# ©r   r
   r   )r   r   s   "€r   r   r   Ž   s   ø€ ÷ 
ñ 
¡Sñ 
r   c                 ó   € \        R4      h)zeReturn the architecture of the system.

This should use the notation of the particular distribution.
r   r   rH   r   r   Úget_system_architectureÚ#PackageInfo.get_system_architecture   r:   r   c                ó    <€ V ^8„  d   QhRS[ /# rU   r   )r   r   s   "€r   r   r   ˜   s   ø€ ÷ 
ñ 
©#ñ 
r   c                 ó   € \        R4      h)zvReturn the GNU multiarch triplet for of the system architecture, if
applicable, raises NotImplementedError otherwise.
zDthis method must be implemented by a concrete subclass if applicabler   rH   r   r   Úget_native_multiarch_tripletÚ(PackageInfo.get_native_multiarch_triplet—   s   € ô
 "ØRó
ð 	
r   c                ó4   <€ V ^8„  d   QhRS[ R,          RS[ /# )r   ÚarchitectureNr
   r   )r   r   s   "€r   r   r       s   ø€ ÷ 
ñ 
©c°D­jð 
ÁCñ 
r   c                ó   € R# )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.
z/lib:/usr/librH   )r   r^   s   &&r   Úget_library_pathsÚPackageInfo.get_library_paths    s   € ñ 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                ó   € \        R4      h)zÚExplicitly set a distribution mirror URL.

This might be called for operations that need to fetch distribution
files/packages from the network.

By default, the mirror will be read from the system configuration
files.
r   r   )r   rc   s   &&r   Ú
set_mirrorÚPackageInfo.set_mirror¬   s   € ô "ØDó
ð 	
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   rh   ri   rj   rk   s   &&&&&r   Úget_source_treeÚPackageInfo.get_source_tree¹   s   € ô. "ØDó
ð 	
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   rp   rq   s   &&&r   Úcompare_versionsÚPackageInfo.compare_versionsÔ   r   r   c                ó    <€ V ^8„  d   QhRS[ /# rU   )r2   )r   r   s   "€r   r   r   Ý   s   ø€ ÷ Iñ I™ñ Ir   c                ó  €  \        V P                  RR7      ;_uu_ 4       pVP                  4       pRRR4       \        P
                  ! RX\        P                  4      RJ #   + '       g   i     L8; i  \         d     R# i ; i)a›  Return whether Apport should generate crash reports.

Signal crashes are controlled by /proc/sys/kernel/core_pattern, but
some init script needs to set that value based on a configuration file.
This also determines whether Apport generates reports for Python,
package, or kernel crashes.

Implementations should parse the configuration file which controls
Apport (such as /etc/default/apport in Debian/Ubuntu).
zutf-8)ÚencodingNTz^\s*enabled\s*=\s*0\s*$)ÚopenÚconfigurationÚreadÚOSErrorÚreÚsearchÚM)r   Úconfig_fileÚconfs   &  r   ÚenabledÚPackageInfo.enabledÝ   sh   € ð	Üd×(Ñ(°7×;Õ;¸{Ø"×'Ñ'Ó)÷ <ô yŠyÐ3°T¼2¿4¹4Ó@ÀDÐHÐH÷ <×;ûäô 	âð	ús-   ‚A5 ¡A"²A5 Á"A2	Á-A5 Á2A5 Á5BÂBc                ó    <€ V ^8„  d   QhRS[ /# rU   r   )r   r   s   "€r   r   r   ñ   s   ø€ ÷ 
ñ 
¡Cñ 
r   c                ó   € \        R4      h)ztReturn the actual Linux kernel package name.

This is used when the user reports a bug against the "linux" package.
r   r   )r   s   &r   Úget_kernel_packageÚPackageInfo.get_kernel_packageñ   r   r   c                óÞ   <€ V ^8„  d   QhRS[ RS[ R,          RS[ RS[S[S[ S[ R,          3,          ,          RS[RS[ R,          RS[R	S[ R,          R
S[S[ ,          R,          RS[RS[RS[ /# )r   ÚrootdirÚ	configdirNrO   ÚpackagesÚverboseÚ	cache_dirÚpermanent_rootdirr^   ÚoriginsÚinstall_dbgÚinstall_depsr
   )r   r"   Útupler2   r   )r   r   s   "€r   r   r   û   sª   ø€ ÷ 9
ñ 9
áð9
ñ ˜•:ð9
ñ ð	9
ñ
 ‘u™S¡#¨¥*˜_Õ-Õ.ð9
ñ ð9
ñ ˜•:ð9
ñ  ð9
ñ ˜D•jð9
ñ ™#• Õ%ð9
ñ ð9
ñ ð9
ñ 
ñ9
r   c                ó   € \        R4      h)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 None 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.
r   r   )r   r‰   rŠ   rO   r‹   rŒ   r   rŽ   r^   r   r   r‘   s   &&&&&&&&&&&&r   Úinstall_packagesÚPackageInfo.install_packagesû   s   € ôn "ØDó
ð 	
r   c                ó6   <€ V ^8„  d   QhRS[ RS[S[ ,          /# )r   Únameglobr
   r!   )r   r   s   "€r   r   r   6  r@   r   c                ó   € \        R4      h)z2Return known package names which match given glob.r   r   )r   r—   s   &&r   Úpackage_name_globÚPackageInfo.package_name_glob6  r&   r   c                ó&   <€ V ^8„  d   QhRS[ RS[/# r   r1   )r   r   s   "€r   r   r   <  s   ø€ ÷ 	ñ 	±ð 	¹ñ 	r   c                ó   € R# )z¾Check if a package is one which has been allow listed.

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.
FrH   r   s   &&r   Úis_native_origin_packageÚ$PackageInfo.is_native_origin_package<  s   € ñ r   c                ó    <€ V ^8„  d   QhRS[ /# rU   r   )r   r   s   "€r   r   r   G  s   ø€ ÷ ñ ©ñ r   c                ó¾   € V P                  R4       F.  pV P                  V4      '       g   K   V P                  V4       K0  	  \        h  \         d    Tu u # i ; i)a  Return a valid package name which is not installed.

Raises a ValueError in case no uninstalled package was found.

This is only used in the test suite. The default implementation should
work, but might be slow for your backend, so you might want to
reimplement this.
Ú*)r™   r4   r   Ú
ValueErrorr   s   & r   Úget_uninstalled_packageÚ#PackageInfo.get_uninstalled_packageG  sa   € ð ×-Ñ-¨cÖ2ˆGØ×)Ñ)¨'×2Ò2ÙðØ× Ñ  Ô)Ùñ 3ô Ðøô ô Ø”ðús   ¯A
Á
AÁAc                ó&   <€ V ^8„  d   QhRS[ RS[ /# )r   Únamer
   r   )r   r   s   "€r   r   r   ]  s   ø€ ÷ ñ ©cð ±cñ r   c                óf   € V P                  R 4      '       d   V P                  ^R7      ^ ,          p V # )z
 GNU/Linux)Úmaxsplit)ÚendswithÚrsplit)r¦   s   &r   Ú_sanitize_operating_system_nameÚ+PackageInfo._sanitize_operating_system_name\  s-   € ð =‰=˜×&Ò&Ø—;‘;¨;Ó*¨1Õ-ˆDØˆr   c                ó6   <€ V ^8„  d   QhRS[ S[S[3,          /# rU   )r’   r   )r   r   s   "€r   r   r   c  s   ø€ ÷  ñ  ¡¡c©3 h¥ñ  r   c                óä   € V P                   '       d   V P                   # \        P                  ! 4       pV P                  VR,          4      pVP	                  RR4      pW#3V n         V P                   # )zFReturn (osname, osversion) tuple.

This is read from /etc/os-release.
ÚNAMEÚ
VERSION_IDzn/a)Ú_os_versionÚplatformÚfreedesktop_os_releaser«   Úget)r   Úinfor¦   rj   s   &   r   Úget_os_versionÚPackageInfo.get_os_versionc  sd   € ð
 ××ÐØ×#Ñ#Ð#ä×.Ò.Ó0ˆØ×3Ñ3°D¸µLÓAˆØ—(‘(˜<¨Ó/ˆØ ˜?ˆÔØ×ÑÐr   )r±   )FNNN)N)NN)FNFNNTF)#Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rz   r   r   r$   r)   r-   r4   r8   r=   rB   rI   rR   ÚstaticmethodrW   r[   r`   re   rm   rt   r‚   r†   r”   r™   r   r£   r±   r«   r¶   Ú__static_attributes__Ú__classdictcell__)r   s   @r   r   r      s/  ø‡ € Ù.ð *€M÷
ð 
÷
ð 
÷
ð 
÷
ð 
÷

ð 

÷

ð 

÷
ð 
÷
ð 
÷
ð 
÷
ð 
÷
ò 
ð0 ÷
ó ð
ð ÷
ó ð
÷
ò 
÷
ð 
÷
ò 
÷6
ð 
÷Ið I÷(
ð 
÷9
ò 9
÷v
ð 
÷	ð 	÷ð ð& €Kà÷ó ð÷ ö  r   r   )r¼   r²   r}   Úcollections.abcr   r   rH   r   r   Ú<module>rÁ      s   ðÙ *ó Û 	Ý $÷^ ó ^ r   