
    si	                        S r SSKJr  SSKrSSKJr  SSKJr  SSKJ	r	  SSK
Jr  SS	KJr  S
SKJr  S
SKJr  \	(       a  SSKJr  \" \5      r      SS jr\S 5       rg)z9Package extractor plugin for .conda and .tar.bz2 formats.    )annotationsN)	getLogger)join)TYPE_CHECKING   )on_linux)path_is_clean   )hookimpl)CondaPackageExtractor)PathTypec                *   SSK n[        R                  " U 5      n [        R                  " U5      n[        R	                  SX5        [        U5      (       d  [        R	                  SU5        UR                  R                  XS9  [        UR                  S5      (       a  g[        (       ag  [        R                  " 5       S:X  aM  [        R                  " U5       H2  u  p4nU H&  n[        X65      n[        R                  " USS5        M(     M4     ggg)z
Extract a .conda or .tar.bz2 package to the specified destination.

:param tarball_full_path: Path to the package archive.
:param destination_directory: Directory to extract the package contents to.
r   Nzextracting %s
  to %sz9package folder %s was not empty, but we're writing there.)dest_dirTHREADSAFE_EXTRACT)conda_package_handling.apiosfspathlogdebugr	   apiextracthasattrr   getuidwalkr   lchown)tarball_full_pathdestination_directoryconda_package_handlingrootdirsfilesfnps           Flib/python3.13/site-packages/conda/plugins/package_extractors/conda.pyextract_conda_or_tarballr%      s     & 		"34II&;<II&(9Q .//		G!	

 && '  %))+?@@xBIIK1$ "$)>!?DN		!Q"  "@	 %x    c               #  2   #    [        SSS/[        S9v   g 7f)Nzconda-packagez.tar.bz2z.conda)name
extensionsr   )r   r%    r&   r$   conda_package_extractorsr+   E   s      
)( s   )r   r   r   r   returnNone)__doc__
__future__r   r   loggingr   os.pathr   typingr   common.compatr   gateways.disk.deleter	   hookspecr   typesr   common.pathr   __name__r   r%   r+   r*   r&   r$   <module>r9      sj    @ " 	     % 1  )'*#*##*# 
*#Z 
 
r&   