+
    :1j                    X   R t ^ RIHt ^ RIHtHt ^ RIt^ RIt^ RIt^ RI	t	^ RI
Ht ^ RIHt ^ RIHt ^ RIHtHtHtHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHtHt ^RIHtHtH t  ^RI!H"t" ^RI#H$t$ ^RI%H&t&H't'H(t( ^RI)H*t* ^RI+H,t,H-t- ^RI.H/t/H0t0H1t1H2t2 ^RI3H4t4H5t5H6t6H7t7H8t8 ^RI9H:t: ^RI;H<t<H=t=H>t>H?t?H@t@HAtAHBtBHCtCHDtDHEtE ^RIFHGtG ^RIHHItI ^RIJHKtKHLtLHMtM ^RINHOtOHPtP ^RIQHRtR ^RISHTtT ^RIUHVtV ^RIWHXtXHYtY ^RIZH[t[ ^RI\H]t]H^t^H_t_ ^R I`Hata ^R!IbHctcHdtdHeteHftfHgtgHhthHitiHjtjHktkHltlHmtmHntn ^R"IoHptp ]'       d   ^ R#IqHrtrHsts ^R$ItHutu ^R%IvHwtw ^R&IbHxtx ]! ]y4      tzR' t{R( t|R) R* lt} ! R+ R,]4      t~ ! R- R.]4      t] ! R/ R04      4       t ! R1 R2]4      t ! R3 R44      tR8R5 R6 lltR7 tR# )9zIPackage installation implemented as a series of link/unlink transactions.)annotations)	dataclassfieldsN)defaultdict)chain)	getLogger)basenamedirnameisdirjoin)Pathindent)format_exception_only)TYPE_CHECKING
NamedTuple)
CondaErrorCondaMultiErrorconda_signal_handler)first)dals)DEFAULTS_CHANNEL_NAMEPREFIX_MAGIC_FILESafetyChecks)context)ensure_text_typeon_win)DummyExecutorThreadLimitedThreadPoolExecutordashlisttime_recorder)BIN_DIRECTORYexplode_directoriesget_all_directoriesget_major_minor_version#get_python_site_packages_short_path)signal_handler)
CondaSystemExitDisallowedPackageErrorEnvironmentNotWritableErrorKnownPackageClobberError	LinkErrorRemoveErrorSharedLinkPathClobberErrorSpecNotFoundInPackageCacheUnknownPackageClobberErrormaybe_raise)mkdir_p)rm_rf)isfilelexistsread_package_info)hardlink_supportedsoftlink_supported)subprocess_call)LinkType)VersionOrder)
confirm_ynget_spinner	MatchSpec)get_comspechuman_byteswrap_subprocess_call)PackageCacheData)AggregateCompileMultiPycActionCompileMultiPycActionCreatePrefixRecordActionCreatePythonEntryPointActionLinkPathActionMakeMenuAction!RegisterEnvironmentLocationActionRemoveLinkedPackageRecordActionRemoveMenuActionUnlinkPathAction#UnregisterEnvironmentLocationActionUpdateHistoryAction)
PrefixData)	GeneratorIterable)PackageInfo)PackageRecord)Actionc                   \        V R R4      p\        P                  '       d   \        P                  # \        P
                  '       d   \        P                  # \        W!4      '       d   \        P                  # \        P                  '       d"   \        W!4      '       d   \        P                  # \        P                  # )infoz
index.json)r   r   always_copyr9   copyalways_softlinksoftlinkr6   hardlinkallow_softlinksr7   )extracted_package_dirtarget_prefixsource_test_files   && /lib/python3.14/site-packages/conda/core/link.pydetermine_link_typera   ]   s    16<H}}   *::   #56F#V#V   ==    c                  a aa \         ;QJ d#    . VVV 3R  lSP                   4       F  NK  	  5M! VVV 3R  lSP                   4       4      p \        SP                  4      pRP                  RTR,           4      p\        S SST4      3p\        R T 4       4      p\        \        T4      RR7      p\         ;QJ d    . TTT 3R lT 4       F  NK  	  5M! TTT 3R lT 4       4      p	. TOT	OTO5#   \         d^     \        SP
                  P                  4      p L  \         d-    SP                   RSP                   RSP                   2p  Li ; ii ; i)	c              3  @   <"   T F  p\        SSSV4      x  K  	  R # 5iN)rL   ).0trgtprefix_recordr^   transaction_contexts   & r`   	<genexpr>&make_unlink_actions.<locals>.<genexpr>l   s'       'D 	,m]DQQ's   -z{}/{}
conda-metaz.jsonc              3  8   "   T F  qP                   x  K  	  R # 5ire   )target_short_pathrf   axns   & r`   rj   rk      s      VBU3!6!6BU   T)reversec              3  ^   <"   T F"  p\        SSSV\        P                  4      x  K$  	  R # 5ire   )rL   r9   	directory)rf   drh   r^   ri   s   & r`   rj   rk      s7      % !A 	q(BTBT	
 	
 !s   *-)tuplefilesr   r]   AttributeErrorlinksourcenameversionbuildformatrJ   r#   sortedr"   )
ri   r^   rh   unlink_path_actionsr]   meta_short_pathremove_conda_meta_actions_all_dall_directoriesdirectory_remove_actionss
   fff       r`   make_unlink_actionsr   j   se   %  !'' %%  !''  
	 ()L)L M nn\3H73RSO'	
! ! VBU VVF08$GO$u % !	%uu % !	%  		! 
#	 ;  	$,]-?-?-F-F$G! 	 !%%&a(=(='>a@S@S?TU "	s*   C3 3E?D  3EEEEc                   V ^8  d   QhRR/# )   returnztuple[list[MatchSpec], ...] )r   s   "r`   __annotate__r      s        :U  rb   c                  a \        \        V 4      4       Uu. uF  p. NK  	  ppT;'       g    R FJ  o\        S4      o\        V3R l\	        V 4       4       R4      pVf   K3  W4,          P                  S4       KL  	  \        V4      # u upi )z1
Find which specs belong to each package to link
c              3  z   <"   T F0  w  rVP                   P                  SP                  8X  g   K,  Vx  K2  	  R # 5ire   repodata_recordr|   )rf   qpkg_infospecs   &  r`   rj   'match_specs_to_dists.<locals>.<genexpr>   s4      #CKA++00DII= #Cs   );
;Nr   )rangelenr>   next	enumerateappendrw   )packages_info_to_linkspecs_matched_specsidxr   s   &&   @r`   match_specs_to_distsr      s     "'s+@'A!BC!BAR!BMC#,-B#C
 
 ?%%d+   Ds   B
c                  T    ] tR t^t$ R]R&   R]R&   R]R&   R]R&   R]R&   R]R	&   R
tR# )PrefixSetupstrr^   ztuple[PackageRecord, ...]unlink_precs
link_precsztuple[MatchSpec, ...]remove_specsupdate_specsneutered_specsr   N__name__
__module____qualname____firstlineno____annotations____static_attributes__r   rb   r`   r   r      s&    ++))''''))rb   r   c                  @    ] tR t^t$ R]R&   R]R&   R]R&   R]R&   RtR	# )
ActionGroupr   typezPackageInfo | Nonepkg_datazIterable[Action]actionsr^   r   Nr   r   rb   r`   r   r      s    
I  rb   r   c                      ] tR t^t$ RtR]R&   R]R&   R]R&   R]R&   R]R&   R]R&   R]R	&   R]R
&   R]R&   RtR]R&   RtR]R&   R R ltRt	R# )PrefixActionGroupad  A container for groups of actions carried out during an UnlinkLinkTransaction.

:param remove_menu_action_groups: Actions which remove menu items
:param unlink_action_groups: Actions which unlink files
:param unregister_action_groups: Actions which unregister environment locations
:param link_action_groups: Actions which link files
:param register_action_groups: Actions which register environment locations
:param compile_action_groups: Actions which compile pyc files
:param make_menu_action_groups: Actions which create menu items
:param entry_point_action_groups: Actions which create python entry points
:param prefix_record_groups: Actions which create package json files in ``conda-meta/``
:param initial_action_groups: User-defined actions which run before all other actions
:param final_action_groups: User-defined actions which run after all other actions
zIterable[ActionGroup]remove_menu_action_groupsunlink_action_groupsunregister_action_groupslink_action_groupsregister_action_groupscompile_action_groupsmake_menu_action_groupsentry_point_action_groupsprefix_record_groupsinitial_action_groupsfinal_action_groupsc                   V ^8  d   QhRR/# )r   r   z,Generator[Iterable[ActionGroup], None, None]r   )r   s   "r`   r   PrefixActionGroup.__annotate__   s     , ,F ,rb   c              #  	`   "   \        V 4       F  p\        WP                  4      x  K  	  R # 5ire   )r   getattrr|   )selffields   & r`   __iter__PrefixActionGroup.__iter__   s"     D\E$

++ "s   ,.r   N)
r   r   r   r   __doc__r   r   r   r   r   r   rb   r`   r   r      sa      54//33--11002244//350513.3, ,rb   r   c                  |    ] tR t^t$ R]R&   R]R&   R]R&   R]R&   R]R&   R]R	&   R]R
&   R]R&   R]R&   R]R&   RtR# )ChangeReportr   prefixzIterable[MatchSpec]specs_to_removespecs_to_addzIterable[PackageRecord]removed_precs	new_precsupdated_precsdowngraded_precssuperseded_precsfetch_precsrevised_precsr   Nr   r   rb   r`   r   r      s=    K((%%**&&**----((**rb   r   c                  N   ] tR t^tR t]R 4       tR tR t]	! R4      R 4       t
R tR tR	 t]R
 4       t]R 4       t]R 4       t]R 4       tR tR t]R 4       t]R 4       t]RR l4       t]R R l4       t]R 4       t]R 4       t]R 4       tR tR tR t]R 4       t Rt!R# )UnlinkLinkTransactionc           
     	   V Uu/ uF  q"P                   VbK  	  upV n        / V n        V P                  P                  4        Fe  p\        P                  R VP                   RP                  R VP                   4       4      RP                  R VP                   4       4      4       Kg  	  RV n	        RV n
        RV n        \        P                  '       g   \        P                  ^8X  d   \        4       M\!        \        P                  4      V n        \        P                  '       g   \        P$                  ^8X  d   \        4       V n        R# \!        \        P$                  4      V n        R# u upi )zhinitializing UnlinkLinkTransaction with
  target_prefix: %s
  unlink_precs:
    %s
  link_precs:
    %s
z
    c              3  @   "   T F  qP                  4       x  K  	  R # 5ire   dist_strrf   precs   & r`   rj   1UnlinkLinkTransaction.__init__.<locals>.<genexpr>   s     K:J$mmoo:J   c              3  @   "   T F  qP                  4       x  K  	  R # 5ire   r   r   s   & r`   rj   r      s     I.$mmoo.r   NF)r^   prefix_setupsprefix_action_groupsvalueslogrV   r   r   r   _pfe	_prepared	_verifiedr   debugverify_threadsr   r   verify_executorexecute_threadsexecute_executor)r   setupsstps   &* r`   __init__UnlinkLinkTransaction.__init__   s   @FG//4G$&!%%,,.CHH !!K#:J:JKKI#..II
 / 	 }}} 6 6! ; O01G1GH 	 }}} 7 71 < O 	 11H1HI 	5 Hs   E0c                	   \         ;QJ d4    R  V P                  P                  4        4       F  '       g   K   RM)	  RM%! R  V P                  P                  4        4       4      '       * ;'       de    \        ;QJ d4    R V P                  P                  4        4       F  '       d   K   R# 	  R# ! R V P                  P                  4        4       4      # )c              3  `   "   T F$  qP                   ;'       g    VP                  x  K&  	  R # 5ire   )r   r   rf   r   s   & r`   rj   6UnlinkLinkTransaction.nothing_to_do.<locals>.<genexpr>  s'      
<WS///<Ws   ..TFc              3  h   "   T F(  p\        VP                  4      P                  4       x  K*  	  R # 5ire   )rO   r^   is_environmentr   s   & r`   rj   r     s.      
2 s(()88::2   02)anyr   r   allr   s   &r`   nothing_to_do#UnlinkLinkTransaction.nothing_to_do  s    3 
<@<N<N<U<U<W
333 
<@<N<N<U<U<W
 
 
 
 
c 
))002
cc	
	
 
))002
 
	
rb   c                	    V P                   f   V P                  4        V P                   P                  '       g   V P                   P                  4        R # R # re   )r   _get_pfe	_executedexecuter   s   &r`   download_and_extract*UnlinkLinkTransaction.download_and_extract  s:    99MMOyy"""II #rb   c                	z   V P                   f   V P                  4        V P                   P                  '       g   V P                   P                  4        V P                  '       d   R # / V n        \        R4      ;_uu_ 4        V P                  P                  4        Fw  pV P                  V P
                  VP                  VP                  VP                  VP                  VP                  VP                  4      V P                   VP                  &   Ky  	  R R R 4       RV n        R #   + '       g   i     L; i)NzPreparing transactionT)r   r   r   r   r   ri   r<   r   r   _preparer^   r   r   r   r   r   r   )r   r   s   & r`   prepareUnlinkLinkTransaction.prepare  s    99MMOyy"""II>>>#% 011))002?C}},,%%$$NN$$$$&&@))#*;*;< 3 2  21s   BD**D:	unlink_link_prepare_and_verifyc                	,   V P                   '       g   V P                  4        \        P                  '       d   \	        R 4      h\        P
                  \        P                  8X  d
   RV n        R# \        R4      ;_uu_ 4        V P                  V P                  V P                  4      pV'       d0    \        \        V4      \        4       \"        P%                  T4       RRR4        V P'                  \(        P*                  ! R V P                  P-                  4        4       !  4       RT n        R#    \        T P                   R,          4       h ; i  + '       g   i     L~; i  \.         d    \        T P                   R,          4       h i ; i)z.Cannot execute .verify() with dry-run enabled.TNzVerifying transactiontemp_dirc              3  :   "   T F  pVP                   x  K  	  R # 5ire   )r   )rf   acts   & r`   rj   /UnlinkLinkTransaction.verify.<locals>.<genexpr>M  s      #EC ..#Es   )r   r  r   dry_runRuntimeErrorsafety_checksr   disabledr   r<   _verifyr   r   r0   r   r2   ri   r   rV   _verify_pre_link_message	itertoolsr   r   r'   )r   
exceptionss   & r`   verifyUnlinkLinkTransaction.verify5  s)   ~~~LLN???OPP  L$9$99!DN011d&8&8$:S:STJ
 ;WE $ 2	))#'#<#<#C#C#E !$22:>? 21$  	$**:67	s1   /E3D5E*AE* 5EEE'	*)Fc                	   R pV F  p\        VP                  P                  4      R,          R,          p\        R VP	                  R4       4       4      pVP                  4       '       g   Ki  V'       g   Ks  \        R4       RpV FI  p\        RVP                   R24       \        \        VP                  4       R	4      4       \        4        KK  	  K  	  V'       d   \        4        R
# R
# )FrV   prelink_messagesc              3  T   "   T F  qP                  4       '       g   K  Vx  K   	  R # 5ire   )is_file)rf   items   & r`   rj   AUnlinkLinkTransaction._verify_pre_link_message.<locals>.<genexpr>^  s      "!=!=s   (
(z**/*z0

The following PRELINK MESSAGES are INCLUDED:

Tz  File z:
  N)r   r   r]   listglobis_dirprintr|   r   	read_textr;   )r   all_link_groupsflag_pre_linkr  prelink_msg_dirall_msg_subdirmsg_files   &&     r`   r  .UnlinkLinkTransaction._verify_pre_link_messageX  s    "CS\\7786ADVV  " "!0!5!5f!=" N %%''NNLM $ .HGHMM?#67&!3!3!5t<=G !/ # L rb   c                	   V P                   '       g   V P                  4        \        P                  '       d   \	        R 4      h V P                  \        \        \        \        V P                  P                  4       !  !  !  4      4       \        V P                  R,          4       R#   \        T P                  R,          4       i ; i)z+Cannot run .execute() with dry-run enabled.r	  N)r   r  r   r  r  _executerw   r   zipr   r   r2   ri   r   s   &r`   r   UnlinkLinkTransaction.executel  s    ~~~KKM???LMM	8 MMeUC)B)B)I)I)K$LMNO $**:67E$**:67s   AB* *Cc                	*   ^RI Hp V P                  e   V P                  pV# V P                  '       g   V! R4      ;V n        pV# \	        \
        P                  ! R V P                  P                  4        4       4      4      pV! V4      ;V n        pV# )   )ProgressiveFetchExtractc              3  8   "   T F  qP                   x  K  	  R # 5ire   )r   r   s   & r`   rj   1UnlinkLinkTransaction._get_pfe.<locals>.<genexpr>  s      $.IsNN.Irr   r   )package_cache_datar/  r   r   setr   from_iterabler   )r   r/  pfer   s   &   r`   r   UnlinkLinkTransaction._get_pfe|  s    ?99 ))C 
 ###5b99DI 
 ## $.2.@.@.G.G.I$ J
 6jAADI
rb   c                	j  aa( \        S4      '       g    \        S4       \        S4      o(V(3R lV 4       p	\        ;QJ d    . R V	 4       F  NK  	  5M! R V	 4       4      p	\        ;QJ d    . R V 4       F  NK  	  5M! R V 4       4      p
\        V
4      '       g   \        R4      h\        ;QJ d    . R \        WJ4       4       F  NK  	  5M! R \        WJ4       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 P                  SV	V4      w  rWR	&   WR
&   \        SR4      VR&   . p. pV	 F^  pVP                  \        RV\!        VSV4      S4      4       VP                  \        RV\"        P$                  ! VVS4      S4      4       K`  	  V'       d   \'        VS4      3p\        RRVS4      .pMRp\)        W4      p. p. p. p. p. p\        WV4       EF3  w  ppp\        RVV P+                  VVSVV4      S4      pVP                  V4       \        RVV P-                  VVSVVV4      S4      pVP                  V4       \        RVV P/                  VVSVVV4      S4      pVP                  V4       \        RV\0        P$                  ! VVSV4      S4      p VP                  V 4       . VP2                  OVP2                  OVP2                  OV P2                  O5p!VP5                  \6        P$                  ! VVSVVV!4      4       EK6  	  \        RRVS4      .p"\8        P$                  ! VSVVV4      p#\;        VS4      3p$\        RRV$V#,           S4      .p%\<        P>                  PA                  VSVVVVV4      p&\<        P>                  PC                  VSVVVVV4      p'\E        VVVVV%VVVV"\        RRV&S4      .\        RRV'S4      .R7      #   \         d3   p\        P	                  \        T4      4       \        R S R24      hRp?ii ; i)z#Unable to create prefix directory 'z.'.
Check that you have sufficient permissions.Nc              3  Z   <"   T F   pSP                  VP                  4      x  K"  	  R # 5ire   )getr|   )rf   r   prefix_datas   & r`   rj   1UnlinkLinkTransaction._prepare.<locals>.<genexpr>  s!      U!;!;s   (+c              3  8   "   T F  q'       g   K  Vx  K  	  R # 5ire   r   )rf   lpds   & r`   rj   r;    s     %R5Jcccc5Js   	
c              3  N   "   T F  p\         P                  ! V4      x  K  	  R # 5ire   )rB   get_entry_to_linkr   s   & r`   rj   r;    s"      '
AK..t44s   #%z&Some records cannot be found in cache.c              3  <   "   T F  w  r\        W4      x  K  	  R # 5ire   )r5   )rf   r   pcrecs   &  r`   rj   r;    s!      &
F d**Fs   c              3  P   <"   T F  p\        VP                  S4      x  K  	  R # 5ire   )ra   r]   )rf   r   r^   s   & r`   rj   r;    s(      
1   > >NN1s   #&target_python_versiontarget_site_packages_short_pathz	.condatmpr	  unlinkremove_menus
unregisterrz   entry_pointcompile
make_menusrecordregisterinitialfinal)r   r   r   )#r
   r1   OSErrorr   r   reprr   rO   rw   r   r.   r+  _get_python_infor   r   r   r   rK   create_actionsrM   r   _make_link_actions_make_entry_point_actions_make_compile_actionsrH   r   extendrE   rN   rI   r   plugin_managerget_pre_transaction_actionsget_post_transaction_actionsr   ))clsri   r^   r   r   r   r   r   eprefix_recs_to_unlinkpkg_cache_recs_to_linkr   
link_typespython_versionpython_site_packagesr   r   
prefix_recaxnsr   matchspecs_for_link_distsr   r   r   r   record_axnsr   ltr   link_agentry_point_ag
compile_agmake_menu_agall_link_path_actionsr   history_actionsregister_actionsr   pre_transaction_actionspost_transaction_actionsr:  s)   &&f&&&&&                                @r`   r  UnlinkLinkTransaction._prepare  s    ]##& !/ U U !&%R5J%R%R5J%R R!& '
AK'
 '
AK'
 "
 )**,-UVV % &
":F&
 &
":F&
 !

 U 
1
UU 
1
 

 03/C/C!!0
,
 8F34AU=>*.}k*JJ'$&!!/J '''(;]JW!	 &,,"$33+Z "	 0*  34GWD L$mD($ (*$$8!%
!  $&! ""$#&!/H$
Hb% "&&'="e G %%g.(--'!& N &,,^<$))'!& J "((4&--'=" L $**<8%%##%  ''% %%	%! (77'!)	w$
L !,HdK WX .<<
 ..A=Q
 D"2_"Dm"
 #*"8"8"T"T#
 $+#9#9#V#V$
  !% $"!#% It-DmT# GT+C]S!
 	
  		$q'" 9- I  s   O5 5P2 -P--P2c                	H   \         P                  ! R  V  4       4      p. pV F|  pVP                  '       d   K  VP                  4       pV'       g   K1  RP	                  \        \        V4      V4      4      p\        P                  RW54       VP                  V4       K~  	  V# )c              3  L   "   T F  pV F  pVP                   x  K  	  K  	  R # 5ire   )r   )rf   action_groupsaxngroups   &  r`   rj   AUnlinkLinkTransaction._verify_individual_level.<locals>.<genexpr>n  s*      *
!4) ) !4s   "$ z"Verification error in action %s
%s)
r   r4  verifiedr  r   r   r   r   r   r   )prefix_action_groupall_actionserror_resultsrq   error_resultformatted_errors   &     r`   _verify_individual_level.UnlinkLinkTransaction._verify_individual_levell  s    )) *
!4*
 
 C|||::<L|"$'')$|*<lK# 		?V$$\2  rb   c                	N  a V w  rVP                   pVP                  pR  pV UUu0 uF@  pVP                   F-  p\        V\        4      '       g   K  V! VP
                  4      kK/  	  KB  	  pppR V 4       p	. p
\        \        4      pV	 EF  pVP                   EF  p\        V\        4      '       d   VP                  pM@\        VR4      '       d    VP                  \        P                  8w  d   VP
                  3MRpV EF  oV! S4      oVS,          P                  V4       SV9  g   K-  \!        \#        VS4      4      '       g   KJ  \%        R \'        V4      P)                  4        4       V3R lR7      pV'       dT   V
P                  \+        SVP,                  P.                  P1                  4       VP1                  4       \2        4      4       K  V
P                  \5        SVP,                  P.                  P1                  4       \2        4      4       EK  	  EK  	  EK  	  VP7                  4        Fb  w  op\9        V4      ^8  g   K  T
P                  \;        S\<        ;QJ d    . R V 4       F  NK  	  5M! R V 4       4      \2        4      4       Kd  	  V
# u uppi )c                >    \         '       d   V P                  4       # T # re   )r   lower)ps   &r`   <lambda><UnlinkLinkTransaction._verify_prefix_level.<locals>.<lambda>  s    ff!;!!;rb   c              3  |   "   T F2  pVP                    F  p\        V\        4      '       g   K  Vx  K!  	  K4  	  R # 5ire   )r   
isinstancerE   )rf   grprq   s   &  r`   rj   =UnlinkLinkTransaction._verify_prefix_level.<locals>.<genexpr>  s5      
+{{#78 C" +s   '<<	link_typec              3  &   "   T F  pVx  K	  	  R # 5ire   r   )rf   ra  s   & r`   rj   r    s      31J !+31s   c                "   < SV P                   9   # re   )rx   )ra  paths   &r`   r  r    s    4:;K;K3Krb   keyc              3  h   "   T F(  qP                   P                  P                  4       x  K*  	  R # 5ire   )package_infor   r   rp   s   & r`   rj   r    s*      SWC,,<<EEGGSWr   r   )r   r   r   r  rL   ro   r   r  rj  rD   target_short_pathshasattrr  r9   ru   r   r4   r   r   rO   iter_recordsr*   r  r   r   r   r/   itemsr   r-   rw   )+target_prefix_AND_prefix_action_group_tupler^   rw  r   r   lower_on_winr  rq   unlink_pathscreate_lpr_actionsry  link_paths_dictlink_path_actionr  colliding_prefix_recrb  r  s   &               @r`   _verify_prefix_level*UnlinkLinkTransaction._verify_prefix_level  sr    .Y*2GG2GG; ,
+{{#/0 0L../" 0+ 	 

+
 %d+%C$'$=$= .0EFF)9)L)L&  ''7EE+559K9KK *;;=  	 ' /D'-D#D)005</GDPT<U4V4V/42<$13"".,.31 !L0, 0)00 8$($'$4$4$D$D$M$M$O$8$A$A$C$+	!" *00 :$($'$4$4$D$D$M$M$O$+!"1 / %> &X *//1JD$4y1}$$. SW SW    2 S
s   'J!J!c              #  	  aa"   \        \        P                  R R4      \        P                  3o\        ;QJ d%    . V3R lV P	                  4        4       F  NK  	  5M! V3R lV P	                  4        4       4      p\
        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      p\        R V 4       R4      w  r4V'       d   Vf   \        R4      x  VfB   \        P                  p\        V4      pRpRp\        R	 VP                  4        4       R4      p	MVP                  p\        V4      p\        ;QJ d(    . R
 VP                  ;'       g    R 4       F  NK  	  5M!! R
 VP                  ;'       g    R 4       4      p\        ;QJ d(    . R VP                  ;'       g    R 4       F  NK  	  5M!! R VP                  ;'       g    R 4       4      pVP                  p	WP9   d@   V	 F9  p
\        V
4      P                   pW9  g   K   W9   g   K(  \        RV R24      x  K;  	  \        ;QJ d"    . R \        P"                   4       F  NK  	  5M! R \        P"                   4       4      pV P	                  4        Fe  pVP                   FR  o\
        ;QJ d    V3R lV 4       F  '       g   K   RM	  RM! V3R lV 4       4      '       g   KE  \%        S4      x  KT  	  Kg  	  V P	                  4        F  p\        VP                  \&        4      p\)        V4      pRp \+        \-        V4      4      p\/        VR4      P1                  4        V'       g   \3        \-        V4      4       Kw  V'       g   \3        V4       K  K  	  R#   \4         d6    TRJ d   \3        \-        T4      4       \7        TP                  4      x   K  i ; i5i)envs_conda_c              3  N   <"   T F  pVP                   S9   g   K  Vx  K  	  R # 5ire   )r^   )rf   setupconda_prefixess   & r`   rj   BUnlinkLinkTransaction._verify_transaction_level.<locals>.<genexpr>  s(      
/""n4 E/   %
%c              3  f   "   T F'  pVP                    F  pVP                  R 8H  x  K  	  K)  	  R# 5icondaN)r   r|   rf   r  r   s   &  r`   rj   r    s3      
%** II * !%s   /1TFc              3  t   "   T F.  pVP                    F  pVP                  R 8X  g   K  W!3x  K  	  K0  	  R# 5ir  )r   r|   r  s   &  r`   rj   r    s:      )E!,,D99' , )s   "88NzTThis operation will remove conda without replacing it with
another version of conda.c              3  `   "   T F$  pVP                   R 8X  g   K  VP                  x  K&  	  R# 5ir  )r|   depends)rf   rK  s   & r`   rj   r    s)      "3{{g- #FNN"3s   ..c              3  8   "   T F  qP                   x  K  	  R # 5ire   r|   r   s   & r`   rj   r    s      )&Hd		&Hrr   c              3  8   "   T F  qP                   x  K  	  R # 5ire   r  r   s   & r`   rj   r  "  s      +&Jd		&Jrr   'zT' is a dependency of conda and cannot be removed from
conda's operating environment.c              3  8   "   T F  p\        V4      x  K  	  R # 5ire   r=   rf   ss   & r`   rj   r  3  s     M1LA9Q<<1Lrr   c              3  D   <"   T F  qP                  S4      x  K  	  R # 5ire   )match)rf   rv   r   s   & r`   rj   r  6  s     9jwwt}}js    aNNr   )r   r   root_prefixrw   r   r   r   r,   conda_prefixrO   r  r^   r   r   r  r>   r|   disallowed_packagesr(   r   r4   r1   r	   opencloser2   rO  r)   )r   conda_setupsconda_unlinked
conda_precconda_final_setupconda_final_prefixpdpkg_names_being_lnkdpkg_names_being_unlnkdconda_linked_dependsconda_dependencydep_name
disallowedprefix_setup	test_pathtest_path_existeddir_existedr  r   s   &                @@r`   _verify_transaction_level/UnlinkLinkTransaction._verify_transaction_level  sh     $$fi8
 u 
&--/
uu 
&--/
 
  
%
 
%
 
 )-) )
%
 /7 , 
 $!(!5!5./B#% %'"#'"$//"3
 $  "3!@!@./B#(5 )&7&B&B&H&Hb&H)55 )&7&B&B&H&Hb&H) $  &+U +&7&D&D&J&J&J+UU +&7&D&D&J&J&J+ &" $.#5#5 .$8 $%56;;76%H: &9 9  %9 UM1L1LMUUM1L1LMM
)002L$//39j93339j999066 0 3 *002L\779JKI '	 2K%%gi&89Y$**, #'),-*)$ + 3  N%''),-1,2L2LMMNs   BO	OC O%OOO2%O;OO O A>OO!AO1.NO&N'OO<OOOOc                	*   \         ;QJ d'    . R  \        P                  V4       4       F  NK  	  5M ! R  \        P                  V4       4       4      pV'       d   V# . pV P                  P	                  \        P
                  VP                  4       4       F  pV'       g   K  VP                  V4       K   	  V P                  P	                  \        P                  VP                  4       4       F  pV'       g   K  VP                  V4       K   	  V# )c              3  :   "   T F  pV'       g   K  Vx  K  	  R # 5ire   r   )rf   excs   & r`   rj   0UnlinkLinkTransaction._verify.<locals>.<genexpr>L  s      '
U CUs   

)
rw   r   r  r   mapr|  r   rV  r  r  )r   r   r   transaction_exceptionsr  r  s   &&&   r`   r  UnlinkLinkTransaction._verifyK  s    !& '
,FF}U'
 '
,FF}U'
 "

 "))
''++!:: '')
C s!!#&
 ''++!668L8R8R8T
C s!!#&	

 rb   c                	L  a \         ;QJ d    . R  V 4       F  NK  	  5M! R  V 4       4      p\        R V 4       4      p\        R V 4       4      p\        R V 4       4      p\        R V 4       4      p\        R V 4       4      p\        R V 4       4      p\        R V 4       4      p	\        R V 4       4      p
\        \        4      ;_uu_ 4        \	        R	4      ;_uu_ 4        . p\        R
4      ;_uu_ 4        V P                  P                  \        P                  V	4       F  pV'       g   K  VP                  V4       K   	  VRR3VRR33 EF  w  popV'       g   V F  p\        P                  V4       K  	  V FV  pVP                  R8H  pVP                  pVP                  p\        V'       d   TMVP                  TV'       d   RMRV4       KX  	  V P                  P                  \        P                  V4       F  pV'       g   K  VP                  V4       K   	  V'       d   V F  p\        P                  V4       K  	  V F3  p\        P!                  V4      pV'       g   K"  VP                  V4       K5  	  . pV'       dq   V UUu. uF  pVP"                   F  pVNK  	  K  	  pppV'       d2   \%        V!  pVP                  \'        RRV.VP                  4      4       VP)                  V4       V P                  P                  \        P                  V4       F  pV'       g   K  VP                  V4       K   	  \         ;QJ d    . V3R lV 4       F  NK  	  5M! V3R lV 4       4      pV F3  p\        P                  V4      pV'       g   K"  VP                  V4       K5  	  V'       d    M.V'       g   EK{  V F  p\        P                  V4       K  	  EK  	  V P                  P                  \        P                  V
4       F  pV'       g   K  VP                  V4       K   	  RRR4       V'       EdC   V^ ,          pVP*                  ^,          pRVP                  R8H  ppVP                  pV'       d>   \,        P/                  RP1                  V'       d   RMRVP3                  4       4      4       . p\4        P6                  '       d`   \        R4      ;_uu_ 4        \9        \        V4      4      pV F)  p\        P;                  V4      pVP)                  V4       K+  	  RRR4       \=        . \?        V\<        4      '       d'   VP*                  ^ ,          VP*                  R,          3MV3OVO54      hV F&  pVP"                   F  pVPA                  4        K  	  K(  	   RRR4       RRR4       R# u uppi   + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     LG; i  + '       g   i     R# ; i)c              3  J   "   T F  qP                   R 8X  g   K  Vx  K  	  R# 5i)rE  Nr   rf   groups   & r`   rj   1UnlinkLinkTransaction._execute.<locals>.<genexpr>d  s      
0eJJ(4JEE0   #
#c              3  J   "   T F  qP                   R 8X  g   K  Vx  K  	  R# 5i)rz   Nr  r  s   & r`   rj   r  h  s      
0eJJ&4HEE0r  c              3  J   "   T F  qP                   R 8X  g   K  Vx  K  	  R# 5i)rI  Nr  r  s   & r`   rj   r  k  s      
0eJJ)4KEE0r  c              3  J   "   T F  qP                   R 8X  g   K  Vx  K  	  R# 5i)rH  Nr  r  s   & r`   rj   r  n  s      #
0eJJ-4OEE0r  c              3  J   "   T F  qP                   R 8X  g   K  Vx  K  	  R# 5i)rK  Nr  r  s   & r`   rj   r  q  s      
0eJJ(4JEE0r  c              3  J   "   T F  qP                   R 8X  g   K  Vx  K  	  R# 5i)rJ  Nr  r  s   & r`   rj   r  t  s      !
0eJJ,4NEE0r  c              3  J   "   T F  qP                   R 8X  g   K  Vx  K  	  R# 5i)rF  Nr  r  s   & r`   rj   r  w  s      #
0eJJ.4PEE0r  c              3  J   "   T F  qP                   R 8X  g   K  Vx  K  	  R# 5i)rM  Nr  r  s   & r`   rj   r  z  s      '
0eJJ)4KEE0r  c              3  J   "   T F  qP                   R 8X  g   K  Vx  K  	  R# 5i)rN  Nr  r  s   & r`   rj   r  }  s      (
0eJJ'4IEE0r  unlink_link_executezExecuting transactionrG  FrL  TrE  z
pre-unlinkpre-linkrI  Nc              3  N   <"   T F  pVP                   S8X  g   K  Vx  K  	  R # 5ire   r  )rf   r  register_groups   & r`   rj   r    s&      -%6E ::7 %6r  z(An error occurred while {} package '{}'.uninstalling
installingzRolling back transaction:r   NN)!rw   r  r&   r   r    r<   r   r  r   _execute_actionsr   r   r^   r   
run_scriptr]   _execute_post_link_actionsr   rC   r   rV  errorsr   errorr   r   r   rollback_enabledreversed_reverse_actionsr   r  cleanup)r   all_action_groupsunlink_actionslink_actionscompile_actionsentry_point_actionsrecord_actionsmake_menu_actionsremove_menu_actionsrm  rn  r  r  r  install_siders  	is_unlinkr^   r   composite_agagrq   individual_actions	compositerl  r[  actionrollback_excsreverse_actionsexcsr  s   &&                            @r`   r*  UnlinkLinkTransaction._executeb  s    
0
 
0
 
  
0
 
  
0
 
 # #
0#
 
  
0
 
 ! !
0!
 
 # #
0#
 
 #' '
0'
 #
 $( (
0(
 $
  011=AV3W3WJ4550044)::+C s"))#. $\59!:t4<7E>< ( )<H1BB8L )< %*$,MMX$=	(0(>(>'00"-6MD<V<V ,5L:)		 %*  $4488->>  3&--c2	  $(;H1BB8L )< %*3NNxX3&--c2 %* $&L#
 +:.*9BRZZcCZC/ + . .(F!3)I )// +$-$(%.K$-$;$;	!" %++N;#4488->>  3&--c2	  (-u -%6-uu -%6- ($
 %53DDXN3&--c2 %5 "#| ):H1BB8L ):k<r  0044)::,C s"))#.G 6T zqM88A;%)8==H+D	((IIBII.7N\ MMO !#+++$%?@@*259J3K*L(7H#8#I#I(#SD)006 )8 A &  *!_== XXa[!((2,7"#	 '	 	 !2H"*"2"2( #3 !2a 4X11v.s 655z A@ 4X3W111s   X)W?	?3W7BW?WW4=W6WWW8A?W<WAW'WWAW+W W?	A"W?	42W?	'W?	:AW,>BW?	 XWW)#	W?	,W<7W?	?X
XX#	c                	h   V P                   pV P                  p\        VR 4      p\        V4      '       g   \	        V4        V P
                  R8X  d'   \        P                  RVP                  4       V4       MAV P
                  R8X  d1   \        P                  RVP                  4       VVP                  4       V P                   F  pVP                  4        K  	  R#   \         dH   pRp\        P                  '       d   \        P!                  T 4      p\#        TT .TO54      u Rp?# Rp?ii ; i)rm   rE  z,===> UNLINKING PACKAGE: %s <===
  prefix=%s
rz   z6===> LINKING PACKAGE: %s <===
  prefix=%s
  source=%s
Nr   )r^   r   r   r
   r1   r   r   rV   r   r]   r   r   	Exceptionr   r  r   r  r   )rs  r^   r   conda_meta_dirr  r[  reverse_excss   &      r`   r  &UnlinkLinkTransaction._execute_actions  s    ..  m\:^$$N#	}}(DMMO! &(OMMO!..	 #**  + 	L'''4EEhO" " 	s   BC D1*<D,&D1,D1c                	F   V P                   pV P                  R 8H  pV P                  pV'       d    \        TTV'       d   RMRRR7       R# R#   \         dH   pRp\
        P                  '       d   \        P                  T 4      p\        TT .TO54      u Rp?# Rp?ii ; i)rE  zpost-unlink	post-linkT)activateNr   )
r^   r   r   r  r  r   r  r   r  r   )rs  r^   r  r   r[  r	  s   &     r`   r  0UnlinkLinkTransaction._execute_post_link_actions=  s     ..MMX-	  !%.MK!	   !+++#8#I#I(#SL&  & s   A B <BB B c                	Z   V P                   pV P                  pV P                  R 8X  d'   \        P	                  RVP                  4       V4       M6V P                  R8X  d&   \        P	                  RVP                  4       V4       . pV^ 8  d   V P                  pMV P                  RV^,            p\        \        \        V4      4      4       F  w  rg VP                  4        K  	  V#   \         d5   p\        P                  RTRR7       TP                  T4        Rp?KV  Rp?ii ; i)rE  z3===> REVERSING PACKAGE UNLINK: %s <===
  prefix=%s
rz   z1===> REVERSING PACKAGE LINK: %s <===
  prefix=%s
Nz#action.reverse() error in action %rTexc_info)r^   r   r   r   rV   r   r   r  rw   r   rs   r  r   r   )	rs  reverse_from_idxr^   r   r  r  axn_idxr  r[  s	   &&       r`   r  &UnlinkLinkTransaction._reverse_actionsW  s    ..   ==H$HHG ]]f$HHE 
a&..O&../E1AA1EFO'i.H(IJOG%   K   %		?RV	W!!!$$%s   C++D*6)D%%D*c                   V ^8  d   QhRR/# r   r   ztuple[str | None, str | None]r   )r   s   "r`   r   "UnlinkLinkTransaction.__annotate__z  s     . .	&.rb   c                v   R R lp\        R V 4       R4      pV'       d+   VP                  p\        P                  RV4       V! V4      # \	        V 4      P                  RR4      pV'       d6   \        R V 4       R4      pVf   \        P                  RV4       V! V4      # \        P                  R	4       R
# )ze
Return the python version and location of the site-packages directory at the end of the transaction
c                   V ^8  d   QhRR/# r  r   )r   s   "r`   r   <UnlinkLinkTransaction._get_python_info.<locals>.__annotate__  s     		8 		8-J 		8rb   c                    V P                   '       g   \        R 4      h\        V P                   4      pV P                  pVf   \	        V4      pW3# )z"Python record version is required.)r}   
ValueErrorr$   python_site_packages_pathr%   )python_recordr_  r`  s   &  r`   version_and_sp>UnlinkLinkTransaction._get_python_info.<locals>.version_and_sp  sU     ((( !EFF4]5J5JKN#0#J#J #+'J"($ "77rb   c              3  `   "   T F$  pVP                   P                  R 8X  g   K   Vx  K&  	  R# 5ipythonNr   )rf   r  s   & r`   rj   9UnlinkLinkTransaction._get_python_info.<locals>.<genexpr>  s-      $9L//44@ $9s   .
.Nz'found in current transaction python: %sr#  c              3  L   "   T F  pVP                   R 8X  g   K  Vx  K  	  R# 5ir"  r  )rf   prefix_rec_to_unlinks   & r`   rj   r$    s)      0E,+00H< )(0Es   $
$z#found in current prefix, python: %sz!no python version found in prefixr  )r   r   r   r   rO   r9  )r^   r\  r   r  linking_new_pythonr  unlinking_pythons   &&&    r`   rQ  &UnlinkLinkTransaction._get_python_infoy  s    		8 "$9
 
 .>>MII?O!-00"=155hE#0E
    '		?O%m44		56rb   c                	p    V VVV3p\         P                  ! V!  p\         P                  ! VR V/ p. VOVO5# )file_link_actions)rG   create_file_link_actionscreate_directory_actions)ri   r  r^   requested_link_typerequested_specrequired_quadr+  r-  s   &&&&&   r`   rS  (UnlinkLinkTransaction._make_link_actions  s`      	
 +CC]S#1#J#J$
.?$
 

%

 	
rb   c                	6    V VVV3p\         P                  ! V!  # re   )rF   rR  )ri   r  r^   r.  r/  r   r0  s   &&&&&& r`   rT  /UnlinkLinkTransaction._make_entry_point_actions  s*      	
 ,::MJJrb   c                	z   a V SVV3p\        V3R  lV 4       4      p\        P                  ! VRVP                  / # )c              3  L   <"   T F  qP                   S8X  g   K  Vx  K  	  R # 5ire   )r   )rf   r  r  s   & r`   rj   >UnlinkLinkTransaction._make_compile_actions.<locals>.<genexpr>  s       !
+2{{l/JBB+   $
$r+  )r   rD   rR  r   )ri   r  r^   r.  r/  r   r0  link_action_groups   &f&&&&  r`   rU  +UnlinkLinkTransaction._make_compile_actions  sX      	
 ! !
+!
 
 %33
.?.G.G
 	
rb   c                	  a . pV P                   f   V P                  4        \        V P                  P	                  4       4       EF  w  pw  r4\        \        4      pV^ 8X  d   V P                   P                  4        V P                   P                   Uu0 uF  qfP                  kK  	  upoVR,          P                  V3R lV P                   P                   4       4       VP                  VR&   VP                   F  pVR,          P                  V4       K  	  VP                   F  pVR,          P                  V4       K  	  VP                  V4       EK  	  V# u upi )NFETCHc              3  L   <"   T F  qP                   S9   g   K  Vx  K  	  R # 5ire   )url)rf   r   download_urlss   & r`   rj   CUnlinkLinkTransaction._make_legacy_action_groups.<locals>.<genexpr>  s       (%9TXX=VDD%9r7  PREFIXUNLINKLINK)r   r   r   r   r  r   r  r  cache_actionsr=  rV  r   r^   r   r   )	r   legacy_action_groupsr   r   r  r   rq   r   r>  s	   &       @r`   _make_legacy_action_groups0UnlinkLinkTransaction._make_legacy_action_groups  s(     "99MMO"+D,>,>,D,D,F"GA!$'GAv		!!#48II4K4K L4KS4K L '' (%)YY%9%9(  !& 3 3GH**!((. +(( &&t,	 ) !''0% #H( $#! !Ms   E c           	     	   V P                  4       pV P                  P                   Uu0 uF  q"P                  kK  	  pp\	        WP
                  P                  4       4       Fk  w  pw  rVV P                  VVP                  VP                  VVP                  VP                  4      pV P                  V4      p\        \        V4      4       Km  	  V# u upi re   )rE  r   rC  r=  r+  r   r  _calculate_change_reportr   r   r   r   _change_report_strr!  r   )	r   rD  rq   r>  r   r   r   change_reportchange_report_strs	   &        r`   print_transaction_summary/UnlinkLinkTransaction.print_transaction_summary	  s    #>>@,0II,C,CD,CS,CD&) "4"4":":"<'
"G]f !99      M !% 7 7 F"#456'
 $#! Es   Cc           
     	  aaaaa R R.oSP                  RVP                   24       SP                  R 4       VP                  '       dW   SP                  RP                  \	        \        R VP                   4       4      ^R7      4      4       SP                  R 4       VP                  '       dK   SP                  R\	        \        R VP                   4       4      ^R7       24       SP                  R 4       R pV3R	 lpR
 oR oVP                  '       d   SP                  R4       . p^ p\        VP                  V3R lR7       Fx  pVP                  pR\        V4      ,          pWW,          pV! \        VP                  P                  4      4      p	V	'       d   VRV	,           ,          pVP                  Wh34       Kz  	  SP                  V! V4      4       SP                  R4       SP                  R R\        V4      ,          ,           4       R oV3R lp
V3R loVVV3R lpVP                  '       d~   SP                  R4       \        VP                  SR7       FQ  pVP                  V,          pV
! S! V4      VP                  4        RRP!                  VP"                  4       24       KS  	  VP$                  '       d{   SP                  R4       \        VP$                  SR7       FN  pVP$                  V,          pSP                  RVP&                   RVP(                   RVP*                   24       KP  	  VP,                  '       d%   SP                  R4       V! VP,                  S4       VP.                  '       d%   SP                  R4       V! VP.                  S4       VP0                  '       d%   SP                  R4       V! VP0                  S4       VP2                  '       d%   SP                  R4       V! VP2                  S4       SP                  R 4       SP                  R 4       RP!                  S4      # )!ru  z## Package Plan ##
z  environment location: z  removed specs:{}c              3  8   "   T F  p\        V4      x  K  	  R # 5ire   r   r  s   & r`   rj   ;UnlinkLinkTransaction._change_report_str.<locals>.<genexpr>'  s     M/L!s1vv/Lrr   r   z  added / updated specs:c              3  8   "   T F  p\        V4      x  K  	  R # 5ire   rP  r  s   & r`   rj   rQ  .  s     :fKea3q66Kerr   c                p    \         P                  R J d   R# \         P                  f   V \        8X  d   R# V # )Fru  )r   show_channel_urlsr   )r  s   &r`   channel_filt>UnlinkLinkTransaction._change_report_str.<locals>.channel_filt2  s/    ((E1((0Q:O5OHrb   c                B  < . pR pVP                  VR,          4       VP                  VR,          4       V  Fc  w  r4VS! VP                  4      R,           VP                  ,           VP                  3,          pV'       d	   WT,          pVP                  V4       Ke  	  V# )z    %-27s|%17srl   )packager~   )z---------------------------z-----------------)r   namekeyr}   r~   )dists_extraslinesfmtr   extralinestrip_globals   &     r`   print_dists=UnlinkLinkTransaction._change_report_str.<locals>.print_dists9  s    E"CLL334LL334+ .4t||CJJ  MDT"  , Lrb   c                T    V P                  R 4      '       d   RV R,          ,           # T # )global:z0:   NN
startswithxs   &r`   r  :UnlinkLinkTransaction._change_report_str.<locals>.<lambda>H  s#    all96M6MTAbE\$TST$Trb   c                F    V P                  R 4      '       d
   V R,          # T # )rc  rd  rf  rh  s   &r`   r  rj  I  s    !,,y*A*A2!Hq!Hrb   z,
The following packages will be downloaded:
c                (   < S! V P                   4      # re   )rY  )ri  convert_namekeys   &r`   r  rj  Q  s    9Srb   r  z%15sr   rl   zTotal: %14sc                   V P                   P                  VP                   P                  8g  pV P                  VP                  8g  pV P                  VP                  8g  pV P                  VP                  8g  p. p. pV'       g	   V'       d{   V P                   P                  e&   VP                  V P                   P                  4       VP                   P                  e&   VP                  VP                   P                  4       V'       dE   VP                  RV P                  ,           4       VP                  RVP                  ,           4       V'       g	   V'       dc   V'       g	   V'       dS   VP                  RV P                  ,           R,           4       VP                  RVP                  ,           R,           4       V'       g	   V'       dg   VP                  V P                  R,           V P                  ,           4       VP                  VP                  R,           VP                  ,           4       RP                  V4      RP                  V4      3# )N/z::rl   ru  )channelr|   subdirr}   r~   r   r   )unlink_prec	link_precchannel_changesubdir_changeversion_changebuild_changebuilder_leftbuilder_rights   &&      r`   	diff_strs;UnlinkLinkTransaction._change_report_str.<locals>.diff_strs_  s   (00559J9J9O9OON'..)2B2BBM(00I4E4EEN&,,	?LLM&&++7 ''(;(;(@(@A$$))5!(():):)?)?@##C+*<*<$<=$$S9+;+;%;<-n##D;+;+;$;c$AB$$TINN%:S%@A##K$7$7#$=@Q@Q$QR$$Y%6%6%<y%NO77<("''-*@@@rb   c                |   < \        V 4      ^8  d   V R,          R,           p SP                  RV :R RV: 24       R# )   N   N~r  18rn  Nr   r   )display_keydisp_strbuilders   &&r`   
add_single<UnlinkLinkTransaction._change_report_str.<locals>.add_singley  s0    ;"$)#.4NN;ABrb   c                   < \        V 4      ^8  d   V R,          R,           p \        V4      ^&8  d   VR,          R,           pSP                  RV :R RV:R RV: 24       R	# )
r~  r  r  :N%   Nr  r  rn  z>38z --> Nr  )r  left_str	right_strr  s   &&&r`   
add_double<UnlinkLinkTransaction._change_report_str.<locals>.add_double~  sL    ;"$)#.48}r!#C=3.NNK9UVrb   c           
        < \        WR 7       FE  pW,          w  r4S! W44      w  rVS! S	! V4      VV RRP                  VP                  4       24       KG  	  R# )r  rn  N)r   r   metadata)
change_report_precsr  rY  rs  rt  r  r  r  r{  r_  s
   &&     r`   summarize_doubleBUnlinkLinkTransaction._change_report_str.<locals>.summarize_double  s]    !"5?)<)E&&/&G# ) k388I,>,>#?"@A @rb   z/
The following NEW packages will be INSTALLED:
z)
The following packages will be REMOVED:
z)
The following packages will be UPDATED:
zI
The following packages will be SUPERSEDED by a higher-priority channel:
z,
The following packages will be DOWNGRADED:
z)
The following packages will be REVISED:

z@    ------------------------------------------------------------z+                                           )r   r   r   r   r   r   r   r   sizer@   r   rq  canonical_namerV  r   	record_idr   r  r   r|   r}   r~   r   r   r   r   )r   rJ  rU  r`  disp_lsttotal_download_bytesr   r  r]  schannelr  r  rY  rt  rs  r  r  rm  r{  r_  s   &&             @@@@@r`   rI  (UnlinkLinkTransaction._change_report_str  s   -.1-2F2F1GHIr(((NN$++M}/L/LMMVW NN2%%%NN*8F:f=KeKe:f4fop+q*rs NN2		 UH$$$NNKLH#$ ))/S yyT!22$,$'DLL,G,G(HITH_,E. NN;x01NN-.NN8mkBV6W&WWX	A4	C
	W	 """NNNO!-"9"9O)33G<	 ) **,-Qsxx	8J8J/K.LM P &&&NNHI!-"="=?S+99'B))*!K,?,?+@+BSBSATU T &&&NNHI]88/J)))NN2 ];;_M)))NNKL];;_M&&&NNHI]88/Jrryy!!rb   c                	   V Uu/ uF  qfP                   VbK  	  ppV Uu/ uF  qfP                   VbK  	  pp\        V4      \        V4      rW,
           Uu/ uF  pWV,          bK  	  ppW,
           Uu/ uF  qW,          bK  	  pp/ p/ p/ p/ pW,          pV EF  pW{,          W,          pp\        VP                  4      p\        VP                  4      pVP                  VP                  8  pVV8X  d	   V'       g   VV8  d	   VV3W&   Ku  VP
                  P                  VP
                  P                  8X  dX   VP                  VP                  8X  d=   VV8X  d   K  VV8X  d%   VP                  VP                  8w  d
   VV3VV&   K  VV3W&   K  VV3VV&   EK  	  V Uu0 uF  qfP                  V9   g   K  VkK  	  pp\        V VVVVVVVVV4
      pV# u upi u upi u upi u upi u upi re   )rY  r3  r:   r}   build_numberrq  r|   rr  r~   r=  r   )r   r   r   r>  r   r   r   
unlink_maplink_mapunlink_namekeyslink_namekeysrY  r   r   r   r   r   r   common_namekeysrs  rt  	unlink_volink_vobuild_number_increasesr   rJ  s   &&&&&&                    r`   rH  .UnlinkLinkTransaction._calculate_change_report  s"    6BB\TllD(\
B3=>:4LL$&:>),Z#h- ,;
; ((; 	 

 8E7V
7V7X&&7V 	 
 '9&G%/%8(:KK$[%8%89I"9#4#45G%.%;%;k>V>V%V")#(>'IBU*5y)A&!!&&+*=*=*B*BB$$(:(::+ i'IOO{?P?P,P.99-EM'*1<i0H$--8),D )+ '. )3P
hh-6Ott
P$
 y C>

N Qs"   GGG#4G($G-;G-)r   r   r   r   r   r   ri   r   N))"r   r   r   r   r   propertyr   r  r  r    r  r  r   r   classmethodr  staticmethodr|  r  r  r  r*  r  r  r  rQ  rS  rT  rU  rE  rL  rI  rH  r   r   rb   r`   r   r      sk   
B 
 
 2 34  5 D(8   ]
 ]
~  . \ \| e% e%N.q)f % %N  2  B . .` 
 
2 K K  
 
*$<$*W"r ? ?rb   r   c          
     ,    V ^8  d   QhRRRRRRRRRR/# )r   r   r   r  
env_prefixr  boolr   r   )r   s   "r`   r   r     sC     S SS S 	S
 S 
Srb   c           	     l	   \        T \        RP                  VP                  T\        '       d   RMR4      4      p\        V4      '       g   R# \        P                  P                  4       pVR8X  d   Rp \        V4      ;_uu_ 4       p\        VP                  4       4      p	RRR4       \        '       d   RX	9   g   R	X	9   d   RpYR&   T'       g5   \        P                   ! \#        R4      TP%                  4       ,          4       Rp\        '       dK    \'        4       pT'       d1   \-        \.        P0                  T \.        P2                  RRT34      w  rMvTRRT.pMoR\4        P6                  9   d   RMRpV'       d1   \-        \.        P0                  V \.        P2                  RRV34      w  rMR\4        P6                  9   d   RMRpVRV.p\.        P0                  VR&   T;'       g    T VR&   VP                  VR&   VP8                  VR&   VP:                  VR&   \        P<                  P                  \?        V4      VPA                  RR4      34      VR&   \        P                  RVP%                  4       VR,          RP                  V4      4        \C        W\?        V4      RR7      pVPD                  ^ 8w  d   \G        V 4      pVR&9   dx   RVP%                  4       9   d	   V R V 2pMO\#        R!4      TVP%                  4       TT;'       g    R"VPH                  VPJ                  VPD                  3,          p\M        V4      h\        PO                  R#VVP%                  4       4        Ve;   R$\        P                  9  d   \Q        V4       R# \        PO                  R%V4       R# R# \G        V 4        Ve;   R$\        P                  9  d   \Q        V4       R# \        PO                  R%V4       R# R#   + '       g   i     EL`; i  \         d#   p
\        P                  T
RR
7        Rp
?
ELoRp
?
ii ; i  \(         d*    \        P+                  RTTP%                  4       4        R# i ; i  Te9   R$\        P                  9  d   \Q        T4       i \        PO                  R%T4       i i ; i)'zY
Call the post-link (or pre-unlink) script, returning True on success,
False on failure.
z	.{}-{}.{}batshTr  FNz(%PREFIX%\python.exe %SOURCE_DIR%\link.pyz&$PREFIX/bin/python $SOURCE_DIR/link.pyr  
SOURCE_DIRa  
            Package %s uses a pre-link script. Pre-link scripts are potentially dangerous.
            This is because pre-link scripts have the ability to change the package contents in the
            package cache, and therefore modify the underlying files for already-created conda
            environments.  Future versions of conda may deprecate and ignore pre-link scripts.
            z/failed to run %s for %s due to COMSPEC KeyErrorz@CALLz/dz/cbsdbash.z-xROOT_PREFIXr@  PKG_NAMEPKG_VERSIONPKG_BUILDNUMPATHru  z$for %s at %s, executing script: $ %srn  )envr  raise_on_erroropensslz failed for: aJ  
                    %s script failed for package %s
                    location of failed script: %s
                    ==> script messages <==
                    %s
                    ==> script output <==
                    stdout: %s
                    stderr: %s
                    return code: %s
                    z<None>zI%s script failed for package %s
consider notifying the package maintainerCONDA_TEST_SAVE_TEMPSz0CONDA_TEST_SAVE_TEMPS :: retaining run_script %s)r  r  ))r   r!   r   r|   r   r3   osenvironrX   r  r   readr  r   r   warningswarnr   r   r?   KeyErrorrV   rA   r   r  devsysplatformr}   r  pathsepr	   r9  r8   rcmessagesstdoutstderrr+   warningr2   )r   r   r  r  r  r  r  is_old_noarchfscript_textr[  script_callercomspeccommand_args
shell_pathresponsemmessages   &&&&&             r`   r  r    s    499fvve4HD
 $<<
**//
C	(dq.qvvx8  G;V9[H $ #LMM --/"
 Mv	!mG *>##$+'M< $T46L"cll2T
*>##d+'M< "'#,,!6FJ&d3L ,,C((&CMiiC
OC++C**//74=#''&"2E"FGCKII.H	3"e
 ;;! A22/ "(dV<G"	 X   G(  ((@MMO	 
 $&bjj8m$F	 % V$&bjj8m$F	 %i   	(IIa$I''	(*  	HHA
 	r $&bjj8m$F	 %sb   6P 	O:#P 7P 
P> A:Q5 AQ5 .Q5 :P		P P;P66P;>0Q21Q25>R3c                   \        V R 4      p \        V4      '       d   \        V4      ;_uu_ 4       pVP                  4       p\	        VR4      '       d   VP                  R4      p\        T\        P                  '       d   \        P                  M\        P                  R7       VuuRRR4       \        V4       # \        V4       R#   + '       g   i     L; i  \        T4       i ; i)z.messages.txtdecodezutf-8)fileN)r   r3   r  r  r  r  r!  r   jsonr  r  r  r2   )r   r  fir  s   &   r`   r  r    s    (D	$<<drGGI1h'')AaGLLLcjjcjjI  	dd  	ds#   $C A6C(
C C	C C+)r  NF)r   
__future__r   dataclassesr   r   r  r  r  r  collectionsr   r   loggingr   os.pathr   r	   r
   r   pathlibr   textwrapr   	tracebackr   typingr   r   ru  r   r   r   auxlib.collectionr   
auxlib.ishr   base.constantsr   r   r   base.contextr   common.compatr   r   	common.ior   r   r   r    common.pathr!   r"   r#   r$   r%   common.signalsr&   r  r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   gateways.diskr1   gateways.disk.deleter2   gateways.disk.readr3   r4   r5   gateways.disk.testr6   r7   gateways.subprocessr8   models.enumsr9   models.versionr:   	reportersr;   r<   resolver>   utilsr?   r@   rA   r2  rB   path_actionsrC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   r:  rO   collections.abcrP   rQ   models.package_inforR   models.recordsrS   rT   r   r   ra   r   r   r   r   r   r   r   r  r  r   rb   r`   <module>r     s>   P " )  	 
  #   2 2   + , @ @ %  S S " 4   ,   $ ( C C 2 # ) /  B B 0    $31.$
+\ (** **  , , ,B
+: 
+L L^(Slrb   