+
    :1jn                       R t ^ RIHt ^ RIt^ RIt^ RIt^ RIHtHt ^ RI	H
t
 ^ RIHt ^ RIHtHtHtHtHtHtHt ^ RIHt ^ RIHt ^R	IHtHt ^R
IHt ^RIHtH t  ^RI!H"t" ^RI#H$t$ ^RI%H&t& ^RI'H(t( ^RI)H*t*H+t+H,t,H-t-H.t.H/t/H0t0H1t1 ^RI2H3t3 ^RI4H5t5H6t6 ^RI7H8t8H9t9H:t:H;t;H<t< ^RI=H>t> ^RI?H@t@HAtAHBtBHCtCHDtDHEtEHFtFHGtG ^RIHHItI ^RIJHKtK ^RILHMtMHNtNHOtOHPtP ^RIQHRtRHStS ^RITHUtU ^RIVHWtW ^RIXHYtYHZtZH[t[ ^RI\H]t] ^RI^H_t_H`t`HataHbtbHctcHdtd ^RIeHftfHgtgHhth ^R IiHjtjHktk ^R!IlHmtm ]'       d   ^ R"InHoto  ]p ]! ]s4      tt]P                  ! R#]P                  4      twRNtx ! R$ R%]4      ty ! R& R']y4      tz ! R( R)]y4      t{ ! R* R+]z4      t| ! R, R-]|4      t} ! R. R/]}4      t~ ! R0 R1]~4      t ! R2 R3]}4      t ! R4 R5]{4      t ! R6 R7]4      t ! R8 R9]}4      t ! R: R;]}4      t ! R< R=]}4      t ! R> R?]z4      t ! R@ RA]|4      t ! RB RC]4      t ! RD RE]4      t ! RF RG]4      t ! RH RI]z4      t ! RJ RK]z4      t ! RL RM]z4      tR#   ]q d    ]rtp ELi ; i)OzJAtomic actions that make up a package installation or removal transaction.)annotationsN)ABCabstractmethod)chain)	getLogger)basenamedirnamegetsizeisdirisfilejoinnormpath)TYPE_CHECKING)uuid4)CONDA_PACKAGE_ROOT
CondaError)dals)CONDA_TEMP_EXTENSIONWINDOWS_LAUNCHER_STUB_PATH)context)on_win)TRACE)dashlist)BIN_DIRECTORYget_leaf_directoriesget_python_noarch_target_pathget_python_short_pathparse_entry_point_defpyc_pathurl_to_pathwin_path_ok)json)has_platformpath_to_url)CondaUpgradeErrorCondaVerificationErrorNotWritableErrorPaddingErrorSafetyError)download)compile_multiple_pyccopycreate_hard_link_or_copycreate_linkcreate_python_entry_point	make_menumkdir_pwrite_as_json_to_file)rm_rf)make_writable)compute_sumislinklexistsread_index_json)backoff_renametouch)History)Channel)LinkType
NoarchTypePathEnum)	MatchSpec)LinkPackageCacheRecordPackageRecord
PathDataV1	PathsDataPrefixRecord)get_user_environments_txt_fileregister_envunregister_env)_PaddingErrorupdate_prefix)
PrefixData)Iterablez^menu/.*\.json$c                      ] tR t^\tRtRtRR R llt]R R l4       t]R R	 l4       t	]R
 R l4       t
]R R l4       t]R 4       tR tRtR# )Actiona  Base class for path manipulation actions, including linking, unlinking, and others.

Pre and post-transaction plugins should inherit this class to implement their
own verification, execution, reversing, and cleanup steps. These methods are
guaranteed to be called in the following order:

    1. ``verify``
    2. ``execute``
    3. ``reverse`` (only if ``execute`` raises an exception)
    4. ``cleanup``


:param transaction_context: Mapping between target prefixes and PrefixActionGroup
    instances
:param target_prefix: Target prefix for the action
:param unlink_precs: Package records to be unlinked
:param link_precs: Package records to link
:param remove_specs: Specs to be removed
:param update_specs: Specs to be updated
:param neutered_specs: Specs to be neutered
FNc               4    V ^8  d   QhRRRRRRRRRR	R
R	RR	/# )   transaction_contextzdict[str, str] | Nonetarget_prefixz
str | Noneunlink_precszIterable[PackageRecord] | None
link_precsremove_specszIterable[MatchSpec] | Noneupdate_specsneutered_specs )formats   "7lib/python3.14/site-packages/conda/core/path_actions.py__annotate__Action.__annotate__u   sP     - -2- "- 5	-
 3- 1- 1- 3-    c                	Z    Wn         W n        W0n        W@n        WPn        W`n        Wpn        R # N)rQ   rR   rS   rT   rU   rV   rW   )selfrQ   rR   rS   rT   rU   rV   rW   s   &&&&&&&&rZ   __init__Action.__init__u   s-     $7 *($((,r]   c                   V ^8  d   QhRR/# )rP   returnzException | NonerX   )rY   s   "rZ   r[   r\      s      ( r]   c                    R# )a  Carry out any pre-execution verification.

Should set self._verified = True upon success.

:return: On failure, this function should return (not raise!) an exception
object. At the end of the verification run, all errors will be raised as a
CondaMultiError.
NrX   r`   s   &rZ   verifyAction.verify       r]   c                   V ^8  d   QhRR/# rP   rd   NonerX   )rY   s   "rZ   r[   r\      s       r]   c                    R# )z~Execute the action.

Called after ``self.verify()``. If this function raises an exception,
``self.reverse()`` will be called.
NrX   rf   s   &rZ   executeAction.execute   ri   r]   c                   V ^8  d   QhRR/# rk   rX   )rY   s   "rZ   r[   r\      s       r]   c                    R# )zZReverse what was done in execute.

Called only if ``self.execute()`` raises an exception.
NrX   rf   s   &rZ   reverseAction.reverse   s     	r]   c                   V ^8  d   QhRR/# rk   rX   )rY   s   "rZ   r[   r\      s       r]   c                    R# )z#Carry out any post-execution tasks.NrX   rf   s   &rZ   cleanupAction.cleanup   s     	r]   c                	    V P                   # r_   	_verifiedrf   s   &rZ   verifiedAction.verified   s    ~~r]   c                	    R  \        V 4      P                  4        4       pRP                  V P                  P                  RP                  V4      4      # )c              3  P   "   T F  w  rV\         9  g   K  V R V: 2x  K  	  R# 5i)=N)REPR_IGNORE_KWARGS).0keyvalues   &  rZ   	<genexpr>"Action.__repr__.<locals>.<genexpr>   s/      
0
,, se1UI0s   &&z{}({})z, )varsitemsrY   	__class____name__r   )r`   argss   & rZ   __repr__Action.__repr__   sC    
"4j..0

 t~~66		$HHr]   )rT   rW   rU   rR   rQ   rS   rV   )NNNNNNN)r   
__module____qualname____firstlineno____doc__rz   ra   r   rg   rn   rr   rv   propertyr{   r   __static_attributes__rX   r]   rZ   rN   rN   \   s}    , I-$          Ir]   rN   c                  0    ] tR t^t]]R 4       4       tRtR# )
PathActionc                	    \        4       hr_   NotImplementedErrorrf   s   &rZ   target_full_pathPathAction.target_full_path        "##r]   rX   N)r   r   r   r   r   r   r   r   rX   r]   rZ   r   r          $  $r]   r   c                  0    ] tR t^t]]R 4       4       tRtR# )MultiPathActionc                	    \        4       hr_   r   rf   s   &rZ   target_full_paths!MultiPathAction.target_full_paths   r   r]   rX   N)r   r   r   r   r   r   r   r   rX   r]   rZ   r   r      r   r]   r   c                  <    ] tR t^tR t]R 4       t]R 4       tRtR# )PrefixPathActionc                	*    Wn         W n        W0n        R # r_   )rQ   rR   target_short_path)r`   rQ   rR   r   s   &&&&rZ   ra   PrefixPathAction.__init__   s    #6 *!2r]   c                	    V P                   3# r_   r   rf   s   &rZ   target_short_paths#PrefixPathAction.target_short_paths   s    &&((r]   c                	n    V P                   V P                  r!Ve   Ve   \        V\        V4      4      # R # r_   )rR   r   r   r    )r`   trgtshrt_pths   &  rZ   r   !PrefixPathAction.target_full_path   s5    ++T-C-Ch 4k(344r]   )rR   r   rQ   N)	r   r   r   r   ra   r   r   r   r   rX   r]   rZ   r   r      s/    3
 ) )  r]   r   c                  D   a  ] tR t^tV 3R ltR tR t]R 4       tRt	V ;t
# )CreateInPrefixPathActionc                	L   < \         SV `  WV4       W n        W0n        W@n        R # r_   )superra   package_infosource_prefixsource_short_path)r`   rQ   r   r   r   rR   r   r   s   &&&&&&&rZ   ra   !CreateInPrefixPathAction.__init__   s(     	,=NO(*!2r]   c                	    R V n         R# TNry   rf   s   &rZ   rg   CreateInPrefixPathAction.verify   	    r]   c                	    R # r_   rX   rf   s   &rZ   rv    CreateInPrefixPathAction.cleanup       r]   c                	~    V P                   V P                  r!V'       d   V'       d   \        V\        V4      4      # R # r_   )r   r   r   r    )r`   prfxr   s   &  rZ   source_full_path)CreateInPrefixPathAction.source_full_path   s0    ++T-C-Ch48XtD+h/0O4Or]   )rz   r   r   r   )r   r   r   r   ra   rg   rv   r   r   r   __classcell__r   s   @rZ   r   r      s(    3 P Pr]   r   c                  j   a  ] tR t^t]R 4       t]R 4       t]R 4       tV 3R ltR t	R t
R tRtV ;t# )	LinkPathActionc                	   aaaaaa V3R  loVVVVV3R lo\         ;QJ d+    . V3R lSP                  P                   4       F  NK  	  5# ! V3R lSP                  P                   4       4      # )c                >  < V P                   \        P                  8X  d   \        P                  pR Rr2MfV P
                  '       d*   \        P                  pV P
                  pV P                  pM+V P                  '       d   \        P                  pR Rr2MSpR Rr2WV3# ) N)	path_typer>   softlinkr<   r+   prefix_placeholder	file_modeno_link)source_path_data	link_typeprefix_placehoderr   requested_link_types   &   rZ   get_prefix_replaceCLinkPathAction.create_file_link_actions.<locals>.get_prefix_replace   s    ))X->->>$MM	/149!444$MM	$4$G$G!,66	!)))$MM	/149/	/149::r]   c                d  < SP                   P                  pVf5   SP                  e'   SP                  P                  pVe   VP                  pV\        P
                  8X  d3   SR,          pVf   \        RS
 24      h\        V P                  V4      pM:Ve   V\        P                  8X  d   V P                  pM\        \        R4      4      hS! V 4      w  rEpV'       d)   \        SSSP                  V P                  S
VS	VVV 4
      # \        SSSP                  V P                  S
VVV 4      # )Ntarget_site_packages_short_pathzgUnable to determine python site-packages dir in target_prefix!
Please make sure python is installed in zv
                The current version of conda is too old to install this package.
                Please update conda.)repodata_recordnoarchpackage_metadatatyper=   pythonr   r   pathgenericr$   r   PrefixReplaceLinkActionextracted_package_dirr   )r   r   sp_dirr   r   placeholderfmoder   r   r   rR   rQ   s   &      rZ   make_file_link_actionFLinkPathAction.create_file_link_actions.<locals>.make_file_link_action  sQ   !1188F~,"?"?"K%66==%#[[F***,-NO>$22?B 
 %B$))6%! 6Z-?-?#?$4$9$9!'(  -??O,P)IE.'  66$))!%'$  &'  66$))!%$	 	r]   c              3  4   <"   T F  pS! V4      x  K  	  R # 5ir_   rX   )r   spir   s   & rZ   r   :LinkPathAction.create_file_link_actions.<locals>.<genexpr>H  s      
2O3!#&&2Os   )tuple
paths_datapaths)clsrQ   r   rR   r   r   r   s   &ffff@@rZ   create_file_link_actions'LinkPathAction.create_file_link_actions   s_    	;"7	 7	r u 
2>2I2I2O2O
u 	
u 
2>2I2I2O2O
 
 	
r]   c                	   a aaa \        R  V 4       4      p\        ;QJ d    . V VVV3R lV 4       F  NK  	  5# ! V VVV3R lV 4       4      # )c              3  8   "   T F  qP                   x  K  	  R # 5ir_   r   )r   axns   & rZ   r   :LinkPathAction.create_directory_actions.<locals>.<genexpr>U  s      0
->c!!->s   c              3  ^   <"   T F"  pS! SSR R SV\         P                  R 4      x  K$  	  R # 5ir_   )r<   	directory)r   directory_short_pathr   r   rR   rQ   s   & rZ   r   r   X  sE      
 )9$ #$""	 	 )9s   *-)r   r   )r   rQ   r   rR   r   file_link_actionsleaf_directoriess   ffff&& rZ   create_directory_actions'LinkPathAction.create_directory_actionsL  sU     0 0
->0
 
 u 
 )9
u 	
u 
 )9
 
 	
r]   c           
     	   \         P                  \        9  d/   \        R \         P                  : R\	        \        4       R24      h\
        p\        \         P                  ,          p\        V4      w  p p	RV R2p
\        V
4      P                  R\        P                  ,           4      '       g   \        RV
,           4      h\        V
\        P                  R7      pV ! VVVVVV
VV4      # )z2Windows entry point stub not available for subdir z. Supported: .zScripts/z.exeScriptsz*target_short_path must point to Scripts/: _pathr   )r   subdirr   r   r   r   r   r   
startswithossep
ValueErrorrC   r>   windows_python_entry_point_exe)r   rQ   r   rR   r   entry_point_defsource_directoryr   command_r   r   s   &&&&&&      rZ   ,create_python_entry_point_windows_exe_action;LinkPathAction.create_python_entry_point_windows_exe_actionf  s     >>!;;%DW^^DV W&'ABC1F  .6w~~F-o>A&wit4)*55i"&&6HII<?PP  &#==
 	
 		
r]   c	                	d   < \         S	V `  VVVVVV4       Wpn        R V n        Wn        RV n        R# FN)r   ra   r   _execute_successfulr   prefix_path_data)
r`   rQ   r   r   r   rR   r   r   r   r   s
   &&&&&&&&&rZ   ra   LinkPathAction.__init__  sA     	!	
 ##(  0 $r]   c                	   V P                   \        P                  8w  dv   \        V P                  4      '       g[   \        \        R V P                  P                  P                   RV P                  P                   RV P                   R24      4      # V P                  p VP                  pV\        P                   9   d   RpV P                   \        P                  8X  d
   RV n        EMV P                   \        P$                  8X  dB   \&        P(                  ! V P                  T;'       g    \        P$                  R7      V n        EMNV P                   \        P*                  8X  da   VP                  \        P$                  8X  dB   \&        P(                  ! V P                  T;'       g    \        P$                  R7      V n        EMVP                  \        P,                  8X  Ed    VP.                  p^ pV'       d|   \1        V P                  4      pW48w  da   \3        \        RV P                  P                  P                   RV P                  P                   RV P                   RV R	V R
24      4      #  VP4                  pV'       d   W48X  d   \6        P8                  '       d   \;        V P                  R4      pV'       dg   WV8w  da   \3        \        RV P                  P                  P                   RV P                  P                   RV P                   RV RV R24      4      # \&        P(                  ! TTTT;'       g    \        P,                  R7      V n        M0VP                  \        P<                  8X  d   Wn        M
\?        4       hRV n         R#   \         d    Rp ELi ; i  \         d    Rp ELi ; i  \         d    Rp ELQi ; i)z
            The package for z located at z0
            appears to be corrupted. The path 'zM'
            specified in the package manifest cannot be found.
            N)r   z%
                    The package for z8
                    appears to be corrupted. The path 'zR'
                    has an incorrect size.
                      reported size: z* bytes
                      actual size: z bytes
                    sha256zR'
                    has a sha256 mismatch.
                    reported sha256: z$
                    actual sha256: z
                    )r  sha256_in_prefixr   T)!r   r<   r   r6   r   r%   r   r   r   namer   r   r   r   AttributeErrorr>   basic_typesr  r   rC   from_objectsr+   hardlinksize_in_bytesr	   r(   r  r   extra_safety_checksr4   r  r   rz   )r`   r   source_path_typereported_size_in_bytessource_size_in_bytesreported_sha256source_sha256s   &      rZ   rg   LinkPathAction.verify  s   >>X///!!9
 9
 *!..>>CCDLQUQbQbQxQxPy z0040F0F/G H   00	$/99 x333#>>X///$(D!^^x000$.$;$;%%*??h.?.?%D!
 NNhmm+ **h.?.??$.$;$;%%*??h.?.?%D!
 ''8+<+<<.)9)G)G& $% %'.t/D/D'E$)A&!%%)%6%6%F%F%K%K$LLY]YjYj  ZA  ZA  YB B88<8N8N7O P&&<%= >$$8#9 :
 
'"2"9"9
 %*B/// +D,A,A8 L"'G&!%%)%6%6%F%F%K%K$LLY]YjYj  ZA  ZA  YB B88<8N8N7O P&&5%6 7$$1? 3
 
 %/$;$; &!0*??h.?.?	%D! ''8+R+RR$4!%'']  	$#	$2 " .)-&.( " '"&'s6   "N$ -N8 ?O $N54N58O	O	OOc                	    \         P                  \        R V P                  V P                  4       \	        V P                  V P                  V P
                  \        P                  R7       RV n        R# )linking %s => %sforceTN)	logr   r   r   r-   r   r   r   r
  rf   s   &rZ   rn   LinkPathAction.execute  sS    )4+@+@$BWBWX!!!!NN--		
 $( r]   c                	    V P                   '       d\   \        P                  \        R V P                  4       \	        V P
                  4      '       g   \        V P
                  RR7       R# R# R# )zreversing link creation %sTclean_empty_parentsN)r
  r!  r   rR   r
   r   r2   rf   s   &rZ   rr   LinkPathAction.reverse  sP    ###GGE79K9KL..//d++F 0 $r]   )r
  rz   r   r  r   )r   r   r   r   classmethodr   r   r  ra   rg   rn   rr   r   r   r   s   @rZ   r   r      s^    O
 O
b 
 
2 "
 "
H%0_B(G Gr]   r   c                  :   a  ] tR tRtV 3R ltV 3R ltR tRtV ;t# )r   i  c           
     	   < V\         P                  8X  d   \         P                  M\         P                  p\        SV `  VVVVVVVV
4       Wn        Wn        R V n        R # r_   )r<   r+   r  r   ra   r   r   intermediate_path)r`   rQ   r   r   r   rR   r   r   r   r   r   r   s   &&&&&&&&&&&rZ   ra    PrefixReplaceLinkAction.__init__  s[     &/(--%?HMMXEVEV	!		
 #5"!%r]   c                	  < \         SV `  4       pV'       d   V# \        V P                  4      '       d>   \        P	                  \
        R V P                  4       \        RV P                   24      h\        V P                  R,          4       \        V P                  R,          \        \        4       4      4      V n        \        P	                  \
        RV P                  V P                  4       \        V P                  V P                  \        P                  4       \!        V P                  4        \        P	                  \
        RV P"                  4       \%        V P                  \&        P(                  ;'       g    V P*                  V P,                  V P.                  V P0                  P2                  P4                  R7       \=        T P                  R4      p\>        P@                  ! T PB                  T P.                  \D        PF                  T P,                  TR7      T n!        RT n$        R	#   \6         d6    \9        T P"                  T P,                  \;        T P,                  4      4      hi ; i)
z6ignoring prefix update for symlink with source path %sz4Ignoring prefix update for symlink with source path temp_dirzcopying %s => %szrewriting prefixes in %s)r   r  )r   r   r   r  TN)%r   rg   r5   r   r!  r   RuntimeErrorr0   rQ   r   strr   r*  r-   r<   r+   r3   r   rJ   r   target_prefix_overriderR   r   r   r   r   r   rI   r'   lenr4   rC   r  r  r>   r  rz   )r`   validation_errorr  r   s   &  rZ   rg   PrefixReplaceLinkAction.verify3  s    7>+##$''((GGH%% FtG\G\F]^  	((45!%$$Z0#eg,"
 	%t'<'<d>T>T	
 	D))4+A+A8==Qd,,-	GGE5t7L7LM&&..DD$2D2D''((88?? 't'='=xH * 7 7!!nn''#66-!
 #  	%%''D++, 	s   6BH4 4A I4c                	"   V P                   '       g   V P                  4        V P                  ;'       g    V P                  p\        P	                  \
        R WP                  4       \        WP                  V P                  4       RV n	        R# )r  TN)
rz   rg   r*  r   r!  r   r   r-   r   r
  )r`   source_paths   & rZ   rn   PrefixReplaceLinkAction.executej  s`    ~~~KKM,,EE0E0E);8M8MNK!6!6G#' r]   )r
  rz   r   r*  r  r   )	r   r   r   r   ra   rg   rn   r   r   r   s   @rZ   r   r     s    &:5n( (r]   r   c                  D   a  ] tR tRt]R 4       tV 3R ltR tR tRt	V ;t
# )MakeMenuActionis  c                	  a aaa \         P                  ;'       g    R Uu. uF  qUP                  4       NK  	  pp\         P                  '       d   \         P                  '       d(   V'       d   SP                  P                  4       V9   da   \
        ;QJ d.    . V VVV3R  lSP                  P                   4       F  NK  	  5# ! V VVV3R  lSP                  P                   4       4      # R# u upi )c              3     <"   T FJ  p\        \        P                  VP                  4      4      '       g   K3  S! SSSVP                  4      x  KL  	  R # 5ir_   )bool_MENU_REmatchr   )r   r   r   r   rR   rQ   s   & rZ   r   0MakeMenuAction.create_actions.<locals>.<genexpr>}  sC      8Csxx01 P'}chhOO8s
   0AArX   )r   shortcuts_onlylower	shortcutsr  r   r   r   )r   rQ   r   rR   r   r  shorcuts_lowers   ffff&  rZ   create_actionsMakeMenuAction.create_actionst  s     5<4J4J4P4Pb4PR4P4**,4PR&&&<#4#4#:#:#<#N5 '22885 5 '2288   I Ss   C0c                	>   < \         SV `  VVR R VV4       RV n        R # NF)r   ra   r
  )r`   rQ   r   rR   r   r   s   &&&&&rZ   ra   MakeMenuAction.__init__  s.     		
 $) r]   c                	    \         P                  \        R V P                  4       \        V P                  V P
                  RR7       RV n        R# )zmaking menu for %sFremoveTN)r!  r   r   r/   rR   r   r
  rf   s   &rZ   rn   MakeMenuAction.execute  s9    +T-B-BC$$$d&<&<UK#' r]   c                	    V P                   '       dJ   \        P                  \        R V P                  4       \	        V P
                  V P                  RR7       R# R# )zremoving menu for %sTrI  N)r
  r!  r   r   r/   rR   r   rf   s   &rZ   rr   MakeMenuAction.reverse  sB    ###GGE143H3HId(($*@*@N $r]   )r
  r   r   r   r   r'  rC  ra   rn   rr   r   r   r   s   @rZ   r8  r8  s  s+      )(
O Or]   r8  c                  d    ] tR tRt]R 4       tR t]R 4       t]R 4       t	R t
R tR tR	 tR
tR# )CompileMultiPycActioni  c                	  a	a
 VP                   ;'       d    VP                   P                  pVe   VP                  \        P                  8X  d   \
        P                  ! R4      o	VR,          o
\        ;QJ d    . V	3R lV 4       F  NK  	  5M! V	3R lV 4       4      p\        ;QJ d    . V
3R lV 4       F  NK  	  5M! V
3R lV 4       4      pV ! VVVVV4      3# R# )Nz&^site-packages[/\\][^\t\n\r\f\v]+\.py$target_python_versionc              3     <"   T FH  p\        VR 4      '       g   K  SP                  VP                  4      '       g   K:  VP                  x  KJ  	  R# 5i)r   N)getattrr=  r   r   )r   r   noarch_py_file_res   & rZ   r   7CompileMultiPycAction.create_actions.<locals>.<genexpr>  sF      ,C3 34 & &++C,A,AB &%%,s   AAAc              3  <   <"   T F  p\        VS4      x  K  	  R # 5ir_   )r   )r   pfpy_vers   & rZ   r   rV    s     FXrhr622Xs   rX   )r   r   r   r=   r   recompiler   )r   rQ   r   rR   r   r   r   py_files	pyc_filesrU  rY  s   &&&&&&   @@rZ   rC  $CompileMultiPycAction.create_actions  s     ..WW<3P3P3W3W&++1B1B"B "

+T U()@AFu ,uu , H FXFFXFFI' !  Ir]   c                	    Wn         W n        W0n        W@n        WPn        R V n        V P                   Uu. uF  p\        V\        P                  R7      NK   	  upV n	        RV n
        R # u upi Nr   F)rQ   r   rR   source_short_pathsr   r  rC   r>   pyc_fileprefix_paths_datar
  )r`   rQ   r   rR   ra  r   ps   &&&&&& rZ   ra   CompileMultiPycAction.__init__  sv     $7 (*"4"4 $ ,,"

 -	 "++ -"
 $) "
s   $A)c                	:   a a R  oVV 3R lS P                    4       # )c                @    V e   Vf   R # \        V \        V4      4      # r_   r   r    prefix
short_paths   &&rZ   join_or_none=CompileMultiPycAction.target_full_paths.<locals>.join_or_none  !    ~!3FK
$;<<r]   c              3  J   <"   T F  pS! SP                   V4      x  K  	  R # 5ir_   rR   r   rd  rl  r`   s   & rZ   r   :CompileMultiPycAction.target_full_paths.<locals>.<genexpr>  #     U=TT//33=T    #)r   r`   rl  s   f@rZ   r   'CompileMultiPycAction.target_full_paths      	= VT=T=TUUr]   c                	:   a a R  oVV 3R lS P                    4       # )c                @    V e   Vf   R # \        V \        V4      4      # r_   rh  ri  s   &&rZ   rl  =CompileMultiPycAction.source_full_paths.<locals>.join_or_none  rn  r]   c              3  J   <"   T F  pS! SP                   V4      x  K  	  R # 5ir_   rp  rq  s   & rZ   r   :CompileMultiPycAction.source_full_paths.<locals>.<genexpr>  rs  rt  )ra  ru  s   f@rZ   source_full_paths'CompileMultiPycAction.source_full_paths  rw  r]   c                	    R V n         R# r   ry   rf   s   &rZ   rg   CompileMultiPycAction.verify  r   r]   c                	    R # r_   rX   rf   s   &rZ   rv   CompileMultiPycAction.cleanup  r   r]   c                	f   \         P                  \        R RP                  V P                  4      4       V P                  R,          p\        V4      p\        V P                  \        V4      4      p\        VV P                  V P                  V P                  V P                  R,          4       RV n
        V P                   F=  p\        V P                  \        VP                  4      4      p \        V4      Vn        K?  	  R#   \         d     \         P                  \        RT4        Kl  i ; i)zcompiling %s rR  Tcould not get size for %sN)r!  r   r   r   rQ   r   rR   r    r*   r}  r
  rc  r   r	   r  OSError)r`   rR  python_short_pathpython_full_path	path_datapyc_full_paths   &     rZ   rn   CompileMultiPycAction.execute  s    
 	~sxx0F0F'GH $ 8 89P Q12GH 2 2K@Q4RS""""$$%<=	
 $(  //I !3!3[5QRMK*1-*@	' 0  K:MJKs   0D&D0/D0c                	    V P                   '       dU   \        P                  \        R RP                  V P                  4      4       V P                   F  p\        V4       K  	  R# R# )zreversing pyc creation %sr  N)r
  r!  r   r   r   r2   )r`   r   s   & rZ   rr   CompileMultiPycAction.reverse  sR    ###GG2CHHT=S=S4T %)$:$: &' %;	 $r]   )	r
  rz   r   r  rc  ra  rR   r   rQ   N)r   r   r   r   r'  rC  ra   r   r   r}  rg   rv   rn   rr   r   rX   r]   rZ   rP  rP    sZ     >). V V V VK:(r]   rP  c                  8   a  ] tR tRtRtV 3R ltV 3R ltRtV ;t# )AggregateCompileMultiPycActioni  zBunch up all of our compile actions, so that they all get carried out at once.
This avoids clobbering and is faster when we have several individual packages requiring
compilation.
c                	R  < Wn         V^ ,          P                  pV^ ,          P                  pV^ ,          P                  p\	        4       p\	        4       pV F9  pVP                  VP                  4       VP                  VP                  4       K;  	  \        S	V `%  VVVVV4       R# )    N)
_individualsrQ   r   rR   setupdatera  r   r   ra   )
r`   individualskwrQ   r   rR   ra  r   
individualr   s
   &*,      rZ   ra   'AggregateCompileMultiPycAction.__init__  s    ')!n@@"1~22#A44 U U%J%%j&C&CD%%j&C&CD & 		
r]   c                	>  < \         SV `  4        V P                   FP  pVP                   F=  p\	        V P
                  \        VP                  4      4      p \        V4      Vn	        K?  	  KR  	  R#   \         d     \        P                  \        R T4        Kp  i ; i)r  N)r   rn   r  rc  r   rR   r    r   r	   r  r  r!  r   )r`   r  r  r  r   s   &   rZ   rn   &AggregateCompileMultiPycAction.execute0  s     ++J'99	 $T%7%7Y__9U VO.5m.DI+ : ,
  OGGE#>NOs   A22&BB)r  )	r   r   r   r   r   ra   rn   r   r   r   s   @rZ   r  r    s    

&
O 
Or]   r  c                  D   a  ] tR tRt]R 4       tV 3R ltR tR tRt	V ;t
# )CreatePythonEntryPointActioni=  c                	`  a aaaaa SP                   ;'       d    SP                   P                  pVe   VP                  \        P                  8X  d   R o\
        ;QJ d/    . V VVVV3R lVP                  ;'       g    R 4       F  NK  	  5M(! V VVVV3R lVP                  ;'       g    R 4       4      p\        '       dh   T\
        ;QJ d.    . VVVV3R lVP                  ;'       g    R 4       F  NK  	  5M'! VVVV3R lVP                  ;'       g    R 4       4      ,          pV# R# )Nc                   \        V 4      w  rp\         R V 2p\        V4      P                  \        \        P
                  ,           4      '       g   \        R\         RV: 24      h\        '       d
   VR,          pWBV3# )/z target_short_path must point to z: z
-script.py)r   r   r   r   r   r   r   r   )r  r  modulefuncr   s   &    rZ   this_tripletACreatePythonEntryPointAction.create_actions.<locals>.this_tripletE  s~    (=o(N%'4oQwi$@! 12==mbff>TUU$:=/L]K`a  6%5%($66r]   c              3  H   <"   T F  pS! SSS.S! V4      O5!  x  K  	  R # 5ir_   rX   )r   ep_defr   r   rR   r  rQ   s   & rZ   r   >CreatePythonEntryPointAction.create_actions.<locals>.<genexpr>P  s>       8F ' ! "&)	  8s   "c              3  V   <"   T F  p\         P                  SSSSV4      x  K   	  R # 5ir_   )r   r  )r   r  r   r   rR   rQ   s   & rZ   r   r  [  s;      	! #< #OO+$%+  #<s   &)rX   )r   r   r   r=   r   r   entry_pointsr   )r   rQ   r   rR   r   r   actionsr  s   fffff  @rZ   rC  +CreatePythonEntryPointAction.create_actions>  s    ..WW<3P3P3W3W&++1B1B"B	7 e   %1177R7ee   %1177R7 G v55 	! #)"5"5";";";	!55 	! #)"5"5";";";	! 	 	 NIr]   c                	   < \         SV `  VVR R VV4       WPn        W`n        \        '       d   \
        P                  pM\
        P                  p\        V P                  VR7      V n
        RV n        R # r`  )r   ra   r  r  r   r>   !windows_python_entry_point_scriptunix_python_entry_pointrC   r   r  r
  )	r`   rQ   r   rR   r   r  r  r   r   s	   &&&&&&& rZ   ra   %CreatePythonEntryPointAction.__init__j  sn     		
 	6 BBI 88I *((!

 $) r]   c                	2   \         P                  \        R V P                  4       \        '       d   RpMUV P                  R,          p\        V4      p\        \        P                  ;'       g    V P                  \        V4      4      p\        V P                  WP                  V P                  4        \        V P                  4      V P                  n        RV n        R#   \"         d)    \         P                  \        RT P                  4        L;i ; i)zcreating python entry point %sNrR  r  T)r!  r   r   r   rQ   r   r   r   r0  rR   r    r.   r  r  r	   r  r  r  r
  )r`   r  rR  r  s   &   rZ   rn   $CreatePythonEntryPointAction.execute  s    79N9NO6#$($<$<=T$U! 56K L#..DD$2D2D-. 
 	"!!#3[[$))	
	O29$:O:O2PD!!/ $(   	OGGE68M8MN	Os   6$C# #0DDc                	    V P                   '       d=   \        P                  \        R V P                  4       \	        V P                  4       R# R# )z(reversing python entry point creation %sN)r
  r!  r   r   r2   rf   s   &rZ   rr   $CreatePythonEntryPointAction.reverse  s=    ###GGA4CXCX $''(	 $r]   )r
  r  r  r  rN  r   s   @rZ   r  r  =  s*    ) )V)>(*) )r]   r  c                  P   a  ] tR tRt]R R l4       tR V 3R lltR tR tRt	V ;t
# )	CreatePrefixRecordActioni  c                   V ^8  d   QhRR/# rP   requested_speczMatchSpec | list[MatchSpec]rX   )rY   s   "rZ   r[   %CreatePrefixRecordAction.__annotate__  s     
 
 4
r]   c           	     	V    VP                   pR \        V4       R2pV ! VVVVVVV4      3# )zconda-meta/z.json)r   r   )	r   rQ   r   rR   r   r  all_link_path_actionsr   r   s	   &&&&&&&  rZ   rC  'CreatePrefixRecordAction.create_actions  sM     !- B B)(3H*I)J%P#!#%

 
	
r]   c                   V ^8  d   QhRR/# r  rX   )rY   s   "rZ   r[   r    s     ) ) 4)r]   c                	v   < \         SV `  VVR R VV4       WPn        W`n        \	        V4      V n        RV n        R # rF  )r   ra   r   r  listr  r
  )	r`   rQ   r   rR   r   r   r  r  r   s	   &&&&&&&&rZ   ra   !CreatePrefixRecordAction.__init__  sH     		
 $7 ,%)*?%@"#( r]   c                	r  a	a
 \        V P                  P                  V P                  R 7      pV P                  P                  pV P                  P                  pR o	R o
\        \        P                  ! V	3R lV P                   4       4      4      p\        ^\        P                  ! V
3R lV P                   4       4      R7      pV P                  '       d   \        V P                  \        \
        ,          4      '       dV   V P                   Uu. uF  p\        V4      NK  	  pp\        \        P                  ! V P                  4      ^ ,          4      pM\        V P                  4      pV3pMRpR
p\         P"                  ! V P                  P$                  V P                  P&                  VVVVVV P                  P(                  VVR7
      V n        \,        P-                  \.        RV P0                  4       \3        V P4                  4      P7                  V P*                  4       R	V n        R# u upi ))sourcer   c                    \        V \        4      '       d   V P                  # \        V \        4      '       d?   \	        V R 4      '       d    V P
                  \        P                  8w  d   V P                  3# R# )r   rX   )	
isinstancerP  r   r   hasattrr   r<   r   r   link_path_actions   &rZ   files_from_action;CreatePrefixRecordAction.execute.<locals>.files_from_action  sm    *,ABB'::: ""24LMM#$4kBB+559K9KK	 &779 r]   c                    \        V \        4      '       d   V P                  # \        V R 4      '       d   V P                  f   R# V P                  3# )r  rX   )r  rP  rc  r  r  r  s   &rZ   paths_from_action;CreatePrefixRecordAction.execute.<locals>.paths_from_action  sN    *,ABB'999   02DEE'88@I,==??r]   c              3  F   <"   T F  q'       g   K  S! V4      x  K  	  R # 5ir_   rX   )r   xr  s   & rZ   r   3CreatePrefixRecordAction.execute.<locals>.<genexpr>  s#       .HA$!!$$.H   	!!c              3  F   <"   T F  q'       g   K  S! V4      x  K  	  R # 5ir_   rX   )r   r  r  s   & rZ   r   r    s#      &.HA$!!$$.Hr  )paths_versionr   N)r  requested_specsr   fileslinkurlr   package_tarball_full_pathz!creating linked package record %sTrX   )r@   r   r   r   r  r  r   from_iterabler  rD   r  r  r   r/  r?   mergerE   r  r   r   r  prefix_recordr!  r   r   rK   rR   insertr
  )r`   r  r   r  r  r   specr  requested_spec_strr  r  s   &        @@rZ   rn    CreatePrefixRecordAction.execute  s   $$::))
 !% 1 1 G G$($5$5$O$O!	
	@   .2.H.H  

 %% &.2.H.H& 

 $--ut|<<9=9L9L"M9L3t99L"M%(9L9L)Ma)P%Q"%()<)<%="#5"7!% O)66--..-+!!!%%"7&?
 	:D<Q<QR4%%&--d.@.@A#' 3 #Ns   H4c                	    \         P                  \        R V P                  4       V P                  '       dE   \	        V P
                  4      P                  V P                  P                  P                  4       R# R# )z+reversing linked package record creation %sN)
r!  r   r   r
  rK   rR   rJ  r   r   r  rf   s   &rZ   rr    CreatePrefixRecordAction.reverse#  s]    @$BWBW	
 ###t))*11!!1166 $r]   )r
  r  r  r   r  rN  r   s   @rZ   r  r    s2     
 
.) ).I(V r]   r  c                  J   a  ] tR tRt]R 4       tV 3R ltR tR tR t	Rt
V ;t# )UpdateHistoryActioni-  c                	6    \        R R4      pV ! VVVVVV4      3# )z
conda-metahistory)r   )r   rQ   rR   rU   rV   rW   r   s   &&&&&& rZ   rC  "UpdateHistoryAction.create_actions.  s5     !y9#!	
 		
r]   c                	   < \         SV `  VR R R W#4       W@n        WPn        W`n        V P
                  \        ,           V n        R # r_   )r   ra   rU   rV   rW   r   r   	hold_path)r`   rQ   rR   r   rU   rV   rW   r   s   &&&&&&&rZ   ra   UpdateHistoryAction.__init__C  sD     	tT=	
 )(,..1EEr]   c                	   \         P                  \        R V P                  4       \        V P                  4      '       d!   \	        V P                  V P
                  4       \        V P                  4      p\        VP                  4      '       g$   \        V P                  4      P                  4        VP                  4        VP                  V P                  V P                  V P                   4       R# )zupdating environment history %sN)r!  r   r   r6   r+   r  r:   rR   r   r   rK   set_creation_timer  write_specsrU   rV   rW   )r`   hs   & rZ   rn   UpdateHistoryAction.executeU  s    8$:O:OP4(())&&7D&&'aff~~t))*<<>	
	d''):):D<O<OPr]   c                	Z   \        V P                  4      '       dS   \        P                  \        R V P                  V P                  4       \        V P                  V P                  RR7       \        \        V P                  4      P                  ;p4      '       d   \        V4       R# R# moving %s => %sTr  N)r6   r  r!  r   r   r8   r   r:   rR   r   r2   )r`   hpaths   & rZ   rr   UpdateHistoryAction.reversea  sq    4>>""GGE,dnnd>S>ST4>>4+@+@M74#5#56;;;%<<%L =r]   c                	0    \        V P                  4       R # r_   r2   r  rf   s   &rZ   rv   UpdateHistoryAction.cleanuph      dnnr]   )r  rW   rU   rV   r   r   r   r   r'  rC  ra   rn   rr   rv   r   r   r   s   @rZ   r  r  -  s0    
 
(F$
Q r]   r  c                  D    ] tR tRtR tR tR tR tR t]	R 4       t
RtR	# )
!RegisterEnvironmentLocationActionil  c                	,    Wn         W n        R V n        R# r	  rQ   rR   r
  r`   rQ   rR   s   &&&rZ   ra   *RegisterEnvironmentLocationAction.__init__m      #6 *#( r]   c                	    \        4       p \        VR R R7       R V n        R#   \         d    \        P                  RT4        R# i ; i)T)mkdir	sudo_safezRUnable to create environments file. Path not writable.
  environment location: %s
N)rF   r9   rz   r&   r!  warning)r`   user_environments_txt_files   & rZ   rg   (RegisterEnvironmentLocationAction.verifys  sG    %C%E"	,DDI!DN 	KK/*	s   # !AAc                	    \         P                  \        R V P                  4       \        V P                  4       RV n        R# )z%registering environment in catalog %sTN)r!  r   rR   rG   r
  rf   s   &rZ   rn   )RegisterEnvironmentLocationAction.execute  s/    >@R@RST''(#' r]   c                	    R # r_   rX   rf   s   &rZ   rr   )RegisterEnvironmentLocationAction.reverse      r]   c                	    R # r_   rX   rf   s   &rZ   rv   )RegisterEnvironmentLocationAction.cleanup  r  r]   c                	    \        4       hr_   r   rf   s   &rZ   r   2RegisterEnvironmentLocationAction.target_full_path      !##r]   r
  rz   rR   rQ   Nr   r   r   r   ra   rg   rn   rr   rv   r   r   r   rX   r]   rZ   r  r  l  s/    )
( $ $r]   r  c                  .   a  ] tR tRtV 3R ltR tRtV ;t# )RemoveFromPrefixPathActioni  c                	4   < \         SV `  WV4       W n        R # r_   )r   ra   linked_package_datar`   rQ   r  rR   r   r   s   &&&&&rZ   ra   #RemoveFromPrefixPathAction.__init__  s     	,=NO#6 r]   c                	    R V n         R# r   ry   rf   s   &rZ   rg   !RemoveFromPrefixPathAction.verify  s     r]   )rz   r  )r   r   r   r   ra   rg   r   r   r   s   @rZ   r  r    s    7 r]   r  c                  T   a  ] tR tRt]P
                  3V 3R lltR tR tR t	Rt
V ;t# )UnlinkPathActioni  c                	   < \         SV `  WW44       V P                  \        ,           V n        V P
                  \        ,           V n        WPn        R # r_   )r   ra   r   r   holding_short_pathr   holding_full_pathr   )r`   rQ   r  rR   r   r   r   s   &&&&&&rZ   ra   UnlinkPathAction.__init__  sF     	m	
 #'"8"8;O"O!%!6!69M!M"r]   c                	    V P                   \        P                  8w  dU   \        P                  \        R V P
                  V P                  4       \        V P                  V P                  RR7       R# R# )zrenaming %s => %sTr  N)
r   r<   r   r!  r   r   r  r8   r   r  rf   s   &rZ   rn   UnlinkPathAction.execute  sX    >>X///GG#&&''	 400$2H2HPTU 0r]   c                	&   V P                   \        P                  8w  dr   \        V P                  4      '       dU   \
        P                  \        R V P                  V P                  4       \        V P                  V P                  RR7       R# R# R# )zreversing rename %s => %sTr  N)r   r<   r   r6   r  r!  r   r  r   r8   r   rf   s   &rZ   rr   UnlinkPathAction.reverse  sl    >>X///GD<R<R4S4SGG+''&&	 41143H3HPTU 5T/r]   c                	n    \        V P                  4      '       g   \        V P                  R R7       R# R# )Tr$  N)r
   r  r2   rf   s   &rZ   rv   UnlinkPathAction.cleanup  s(    T++,,$((dC -r]   )r  r  r   )r   r   r   r   r<   r  ra   rn   rr   rv   r   r   r   s   @rZ   r  r    s+     ###VVD Dr]   r  c                  J   a  ] tR tRt]R 4       tV 3R ltR tR tR t	Rt
V ;t# )RemoveMenuActioni  c                	   a aaa \         ;QJ d$    . V VVV3R  lSP                   4       F  NK  	  5# ! V VVV3R  lSP                   4       4      # )c              3     <"   T F6  p\        \        P                  V4      4      '       g   K)  S! SSSV4      x  K8  	  R # 5ir_   )r;  r<  r=  )r   r   r   r  rR   rQ   s   & rZ   r   2RemoveMenuAction.create_actions.<locals>.<genexpr>  s<      
1HNN4() OC#%8-NN1s
   &AA)r   r  )r   rQ   r  rR   s   ffffrZ   rC  RemoveMenuAction.create_actions  sA    u 
+11
u 	
u 
+11
 
 	
r]   c                	(   < \         SV `  WW44       R # r_   r   ra   r  s   &&&&&rZ   ra   RemoveMenuAction.__init__       	m	
r]   c                	    \         P                  \        R V P                  4       \        V P                  V P                  RR7       R# )zremoving menu for %s TrI  Nr!  r   rR   r/   r   rf   s   &rZ   rn   RemoveMenuAction.execute  s1    .0B0BC$$$d&<&<TJr]   c                	    \         P                  \        R V P                  4       \        V P                  V P                  RR7       R# )zre-creating menu for %s FrI  Nr/  rf   s   &rZ   rr   RemoveMenuAction.reverse  s1    143E3EF$$$d&<&<UKr]   c                	    R # r_   rX   rf   s   &rZ   rv   RemoveMenuAction.cleanup  r  r]   rX   r  r   s   @rZ   r%  r%    s0    
 

KL r]   r%  c                  @   a  ] tR tRtV 3R ltV 3R ltV 3R ltRtV ;t# )RemoveLinkedPackageRecordActioni  c                	(   < \         SV `  WW44       R # r_   r+  r  s   &&&&&rZ   ra   (RemoveLinkedPackageRecordAction.__init__  r-  r]   c                	   < \         SV `  4        \        V P                  4      P	                  V P
                  P                  4       R # r_   )r   rn   rK   rR   rJ  r  r  r`   r   s   &rZ   rn   'RemoveLinkedPackageRecordAction.execute  s2    4%%&--d.F.F.K.KLr]   c                	   < \         SV `  4        \        V P                  4      P	                  V P
                  4       R # r_   )r   rr   rK   rR   _load_single_recordr   r:  s   &rZ   rr   'RemoveLinkedPackageRecordAction.reverse  s,    4%%&::4;P;PQr]   rX   )	r   r   r   r   ra   rn   rr   r   r   r   s   @rZ   r6  r6    s    
MR Rr]   r6  c                  D    ] tR tRtR tR tR tR tR t]	R 4       t
RtR	# )
#UnregisterEnvironmentLocationActioni  c                	,    Wn         W n        R V n        R# r	  r  r  s   &&&rZ   ra   ,UnregisterEnvironmentLocationAction.__init__  r  r]   c                	    R V n         R# r   ry   rf   s   &rZ   rg   *UnregisterEnvironmentLocationAction.verify  r   r]   c                	    \         P                  \        R V P                  4       \        V P                  4       RV n        R# )z'unregistering environment in catalog %sTN)r!  r   rR   rH   r
  rf   s   &rZ   rn   +UnregisterEnvironmentLocationAction.execute  s/    @$BTBTUt))*#' r]   c                	    R # r_   rX   rf   s   &rZ   rr   +UnregisterEnvironmentLocationAction.reverse  r  r]   c                	    R # r_   rX   rf   s   &rZ   rv   +UnregisterEnvironmentLocationAction.cleanup  r  r]   c                	    \        4       hr_   r   rf   s   &rZ   r   4UnregisterEnvironmentLocationAction.target_full_path  r  r]   r  Nr  rX   r]   rZ   r@  r@    s/    )( $ $r]   r@  c                  f    ] tR tRtRR ltR tRR ltRR ltRR ltR t	R	 t
]R
 4       tR tRtR# )CacheUrlActioni  Nc                	    Wn         W n        W0n        W@n        WPn        W`n        V P                  \        ,           V n        R # r_   )	r  target_pkgs_dirtarget_package_basenamer  sizemd5r   r   r  )r`   r  rP  rQ  r  rR  rS  s   &&&&&&&rZ   ra   CacheUrlAction.__init__  s7     .'>$	..1EEr]   c                	L    R V P                   9   d   \        R4      hRV n        R# )z::zURL cannot contain '::'TN)r  r   rz   rf   s   &rZ   rg   CacheUrlAction.verify*  s!    488677r]   c                	   ^RI Hp V! V P                  4      p\        P                  \        RV P
                  V P                  4       \        V P                  4      '       d   \        V P                  4       \        V P                  4      '       dj   V P
                  P                  R4      '       d'   V P
                  \        V P                  4      8X  d   R# \        V P                  V P                  RR7       V P
                  P                  R4      '       d*   \        V P
                  4      pV P                  WCV4       R# V P                  W14       R# )   PackageCacheDatazcaching url %s => %szfile:/NTr  )package_cache_datarZ  rP  r!  r   r  r   r6   r  r2   r   r#   r8   r   _execute_local_execute_channel)r`   progress_update_callbackrZ  target_package_cacher5  s   &&   rZ   rn   CacheUrlAction.execute/  s     	9/0D0DE-txx9N9NO4>>""$..!4(())xx""8,,[%%> 2 t44dnnDQ88x((%dhh/K3K !!"6Qr]   c                	l   ^RI Hp \        V4      \        P                  9   d   \        WP                  4       V! \        V4      4      pVP                  P                  V P                  4      pV'       d@   \        V\        P                  4      '       d   VP                  P                  V4       R# R# R# \        VR4      pV P                  3pVP                  WVR7      p	V	'       d'   VP                  P                  V	P                   4      pMRp\#        VV P                  \$        P&                  \        P(                  R7       V'       d>   \        V\        P                  4      '       d   VP                  P                  V4       R# VP                  P                  V P*                  4       R# )rX  rY  rS  )exclude_cachesN)r   r   )r[  rZ  r   r   	pkgs_dirsr,   r   
_urls_dataget_urlrQ  r"   known_subdirsadd_urlr4   rP  tarball_file_in_cacher   r-   r<   r+   r   r  )
r`   r5  r_  r^  rZ  source_package_cache
origin_urlsource_md5sumrb  pc_entrys
   &&&&      rZ   r\  CacheUrlAction._execute_localL  sT    	9;7#4#44$[2G2GH#3GK4H#I 
 .88@@,,J l:w7L7LMM$//77
C Nz (U;M"224N'==> > H 1<<DD22
 "
 %%"--mm	 l:w7L7LMM$//77
C$//77Ar]   c                	Z   / pV P                   e   V P                   VR&   V P                  '       d   V P                  VR&   M!V P                  '       d   V P                  VR&   \        V P                  V P
                  3RV/VB  VP                  P                  V P                  4       R # )NrR  r  rS  r^  )rR  r  rS  r)   r  r   rd  rg  )r`   r_  r^  kwargss   &&& rZ   r]  CacheUrlAction._execute_channel  s    99 !YYF6N;;;#{{F8XXX HHF5MHH!!	
 &>	
 		
 	''//9r]   c                	    \        V P                  4      '       dU   \        P                  \        R V P                  V P                  4       \        V P                  V P                  RR7       R# R# r  )r6   r  r!  r   r   r8   rf   s   &rZ   rr   CacheUrlAction.reverse  sI    4>>""GGE,dnnd>S>ST4>>4+@+@M #r]   c                	0    \        V P                  4       R # r_   r  rf   s   &rZ   rv   CacheUrlAction.cleanup  r  r]   c                	B    \        V P                  V P                  4      # r_   )r   rP  rQ  rf   s   &rZ   r   CacheUrlAction.target_full_path  s    D(($*F*FGGr]   c                	@    R V P                   : RV P                  : R2# )zCacheUrlAction<url=, target_full_path=>)r  r   rf   s   &rZ   __str__CacheUrlAction.__str__  s$    $TXXL0CDDYDYC\\]^^r]   )rz   r  rS  r  rR  rQ  rP  r  )NNNr_   )r   r   r   r   ra   rg   rn   r\  r]  rr   rv   r   r   rz  r   rX   r]   rZ   rN  rN    sF    F"
R:6Bp: N
 H H_r]   rN  c                  N    ] tR tRtR tR tRR ltR tR t]	R 4       t
R	 tR
tR# )ExtractPackageActioni  c                	    Wn         W n        W0n        V P                  \        ,           V n        W@n        WPn        W`n        Wpn	        R # r_   )
r   rP  target_extracted_dirnamer   r   r  record_or_specr  rR  rS  )r`   r   rP  r  r  r  rR  rS  s   &&&&&&&&rZ   ra   ExtractPackageAction.__init__  s>     !1.(@%..1EE,	r]   c                	    R V n         R# r   ry   rf   s   &rZ   rg   ExtractPackageAction.verify  r   r]   Nc           
     	   ^RI Hp \        P                  \        RV P                  V P
                  4       \        V P
                  4      '       d   \        V P
                  4       \        P                  P                  V P                  V P
                  4        \        V P
                  4      p\'        V P(                  \*        4      '       Ed0   V P(                  P-                  R4      pV'       g   \/        R4      h\1        V\        P2                  4      '       d   \5        V4      M
\5        R4      p\7        V4      pV P8                  ;'       g    \;        V P                  R4      p\=        V P                  4      pV P>                  e,   WP>                  8w  d   \A        R	V R
V P>                   24      hV PB                  ;'       g    \;        V P                  R4      p	\D        PF                  ! XVVVVVV	R7      p
M!\D        PF                  ! V P(                  X4      p
\I        V P
                  RR4      p\K        W4       V! V PL                  4      p\N        PF                  ! V
V P                  V P
                  R7      pVPQ                  V4       R#   \        \        P                  \        3 d4    \!        RT P                   R24       \"        P$                  ! ^4        EL7i ; i)rX  rY  zextracting %s => %sz.ERROR: Encountered corrupt package tarball at zS. Conda has left it in place. Please report this to the maintainers of the package.r  zURL cannot be empty.Nr  zComputed size (z ) does not match expected value rS  )r  channelfnr  rR  rS  infozrepodata_record.json)r  r   ))r[  rZ  r!  r   r   r   r6   r2   r   plugin_managerextract_packager7   r  r!   JSONDecodeErrorFileNotFoundErrorprintsysexitr  r  r?   get_raw_valuer   r"   rf  r;   r   r  r4   r	   rR  r.  rS  rB   r  r   r1   rP  rA   r  )r`   r^  rZ  raw_index_jsonr  r  r  r  rR  rS  r   repodata_record_pathr_  package_cache_records   &&            rZ   rn   ExtractPackageAction.execute  sy    	9($*?*?AVAV	
 4(())$''( 	..!!!!	


	,T-B-BCN d))955%%33E:C !788  W%:%:;; T] 
 #B[[PPK0E0Ex$PF4001Dyy$):"%dV+KDII;W  ((GGk$*?*?GC+88O ,88##^O  $!!6+A 
 	2D/0D0DE1>>&*&;&;"&"7"7 

 	##$89i --/@A 	 @AVAV@W X" "
 HHQK	s   J AK)(K)c                	4   \        V P                  4       \        V P                  4      '       dh   \        P	                  \
        R V P                  V P                  4       \        V P                  4       \        V P                  V P                  4       R# R# )r  N)r2   r   r6   r  r!  r   r8   rf   s   &rZ   rr   ExtractPackageAction.reverse  sc    d##$4>>""GGE,dnnd>S>ST$''(4>>4+@+@A #r]   c                	0    \        V P                  4       R # r_   r  rf   s   &rZ   rv   ExtractPackageAction.cleanup  r  r]   c                	B    \        V P                  V P                  4      # r_   )r   rP  r  rf   s   &rZ   r   %ExtractPackageAction.target_full_path  s    D(($*G*GHHr]   c                	@    R V P                   : RV P                  : R2# )z&ExtractPackageAction<source_full_path=rx  ry  )r   r   rf   s   &rZ   rz  ExtractPackageAction.__str__  s(    78M8M7PPcdhdydyc||}~~r]   )	rz   r  rS  r  r  rR  r   r  rP  r_   )r   r   r   r   ra   rg   rn   rr   rv   r   r   rz  r   rX   r]   rZ   r}  r}    s:    &H:TB I Ir]   r}  )rQ   r   r  )r   
__future__r   r   rZ  r  abcr   r   	itertoolsr   loggingr   os.pathr   r   r	   r
   r   r   r   typingr   uuidr   r   r   r   
auxlib.ishr   base.constantsr   r   base.contextr   common.compatr   common.constantsr   	common.ior   common.pathr   r   r   r   r   r   r   r    common.serializer!   
common.urlr"   r#   
exceptionsr$   r%   r&   r'   r(   gateways.connection.downloadr)   gateways.disk.creater*   r+   r,   r-   r.   r/   r0   r1   gateways.disk.deleter2   gateways.disk.permissionsr3   gateways.disk.readr4   r5   r6   r7   gateways.disk.updater8   r9   r  r:   models.channelr;   models.enumsr<   r=   r>   models.match_specr?   models.recordsr@   rA   rB   rC   rD   rE   envs_managerrF   rG   rH   portabilityrI   rJ   prefix_datarK   collections.abcrL   r  	NameErrorIOErrorr   r!  r[  
IGNORECASEr<  r   rN   r   r   r   r   r   r   r8  rP  r  r  r  r  r  r  r  r%  r6  r@  rN  r}  rX   r]   rZ   <module>r     s7   Q " 	 	 
 #   M M M    -  M " " $  	 	 	 $ 2  4	 	 	 ) 5 N N 8  $ 9 9 )  W V 5 #(  ::("--8 UIS UIp$ $$f $z 0P/ P>YG- YGx[(n [(|'O- 'OTw(O w(t#O%: #OLf)#; f)RD7 DN<2 <~!$
 !$R
!1 
&D1 &DR1 8R&6 R"$* $@I_Z I_Xp: pk*    s   2I 	II