+
     [;i  c                   s    ^ RI t ^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHt ^ RIHt  ]t ! R R]4      tR#   ] d     Li ; i)i    N)HooksObserver)DefaultView)InteractiveView)NoteForHiddenView)_)Tracer)System)dump_memory)Applications)Rules)HelperControllerc                   s\   a  ] tR t^)t o RtRtRtR tR tR t	R t
R tR tR tR	 tR
tV tR# )DefaultControllerNc           	     s$   Wn         \        \        P                  ! VP                  R 7      \
        \        \        \        4       VP                  R7      V n	        VP                  V P                  n
        VP                  ^ ,          V P                  n        V'       d   W P                  n        V P                  P                  V P                  VP                  4      4      V n        V P                   P"                  '       d9   V P                   P%                  \        P&                  R,          .4      V n        R# V P                   P(                  '       d9   V P                   P%                  \        P&                  R,          .4      V n        R# R# ))erased)ZmemoryZhooks_observerr   DAEMONSTATICN)argsr   r   Zpackage_managerr   r	   r   r   r    tracerZnowZ	timestampZspecified_packagesZtrace_affected_useruserapplicationsZdaemons_onlyfilter_typesTYPESZreboot_only)selfr   Zpackages   &&&?/usr/lib/python3.14/site-packages/tracer/controllers/default.py__init__ZDefaultController.__init__/   s   )	-
/
++$+ HH$++/..+$++$,;;!kk00DII1FG$	YY((55|7I7I(7S6TU4yy((55|7I7I(7S6TU4     c                s4   V P                   P                  '       gc   \        4       pVP                  R V P                  4       VP                  RV P                   4       VP                  4        V P                  4        \        V P                  4       4       R# )r   r   N)	r   Z
hooks_onlyr   assignr   rendercreate_reboot_required_fileZexitstatus_code)r   view   & r   r   ZDefaultController.renderD   se    				
-4;;~t001;;vtyy!;;=##%tr   c                s   \        V P                  4      pV P                  V P                  V P                  4       F)  pVP	                  W P                  4       \        R 4       K+  	  \        4       pVP                  RV P                  4       VP                  R\        V P                  4      4       VP                  RV P                  P                  \        P                  R,          4      4       VP                  RV P                  P                  \        P                  R,          4      4       VP                  4        R# )Z r   total_countsession_countSESSIONstatic_countr   N)r
   r   _restartable_applicationsr   print_helperprintr   r   len
count_typer   r   r   )r   helper_controllerZapplicationr   s   &   r   render_helpersZ DefaultController.render_helpersM   s    &tyy133D4E4EtyyQk!!+yy99 R 
	$++fdii ++mS!2!234++ot00;;L<N<Ny<YZ[++nd//::<;M;Mh;WXY++-r   c                s   \        V P                  4      pV P                  V P                  V P                  4      P	                  R 4      p \        4       pVP                  RV4       VP                  RV P                  4       VP                  R\        V P                  4      4       VP                  RV P                  P                  \        P                  R,          4      4       VP                  RV P                  P                  \        P                  R,          4      4       VP                  4        VP                  R4      VP                  R4      VP                  R4      ,           8X  d   R# \        R\        R	4      ,           4       \        R
4      p VR8X  d   R# \!        V4      ^ 8:  g   \!        V4      \        V4      8  d   \"        hVP%                  V\!        V4      ^,
          ,          V P                  4       \*        P,                  P/                  R\        R4      ,           R,           4       \        4        EK     \&        \"        \(        3 d    \        \        R4      4        Loi ; i)namer   r   r!   r"   r#   r$   r   
z0Press application number for help or 'q' to quitz--> ZqNzWrong application numberz
-- z)Press <enter> to get list of applicationsz --)r
   r   r%   r   sortedr   r   r(   r)   r   r   r   Zgetr'   r   inputZintZ
IndexErrorr&   ZSyntaxErrorZ
ValueErrorsysZstdoutwrite)r   r*   Zfilteredr   Zanswers   &    r   render_interactiveZ$DefaultController.render_interactiveZ   s   &tyy1++D,=,=tyyIPPQWX(

4;;~x(;;vtyy!;;}c$"3"345;; 1 1 < <\=O=OPY=Z [\;;~t00;;L<N<Nx<XYZ;;= hh}/!:TXXn=U!UU	DE	EF&M6)}f	V	S[3x=8
:J""8CK!O#<diiH
 ::Ga KLLuTU7	 
J
/ )	!&
'()s   I &A"I *I87I8c                s   ^ p\        V P                  4      ^ 8  d   ^epV P                  P                  \        P                  R,          4      '       d   ^fpV P                  P                  \        P                  R,          4      '       d   ^gpV P                  P                  \        P                  R,          4      '       d   ^hpV# )z
0   - No affected applications
101 - Found some affected applications
102 - Found some affected daemons
103 - Session restart needed
104 - Reboot needed
r   r#   r   )r(   r   r)   r   r   )r   Zcoder    r   r   ZDefaultController.status_codex   s     
$		a
4	!!,"4"4X">??
4	!!,"4"4Y"?@@
4	!!,"4"4X">??
4	+r   c                s   \         P                  ! 4       ^ 8X  d   V P                  P                  \        P
                  R,          4      '       d   \        RR4      ;_uu_ 4       pVP                  R4       V P                  P                  \        P
                  R,          .4      P                  4       P                  R4       F"  pVP                  RVP                   R24       K$  	  RRR4       R# R# R#   + '       g   i     R# ; i)	zg
If a reboot is needed, create a /run/reboot-required file.
This is how Debian/Ubuntu distros does it.
r   z/run/reboot-requiredZwz$Tracer says reboot is required for:
r,   z- r-   N)osZgetuidr   r)   r   r   Zopenr1   r   Zuniquer.   r,   )r   ZfpZapps   &  r   r   Z-DefaultController.create_reboot_required_file   s    
 YY[A$++66|7I7I(7STT#S))RHH45  --|/A/A(/K.LMTTV]]^deXX388*B  f 	*) U)))s   %BC99D
	c                s    VP                   '       g>   VP                  \        P                  R ,          \        P                  R,          .4      # T# )r   r#   )ZallZexclude_typesr   r   )r   r   r   r   r   r%   Z+DefaultController._restartable_applications   sM     HHH 
	#	#hi % 
 ' ''r   c                s    VR .8X  g   VR 8X  d   R# VR8X  d   V# V'       g   \         P                  ! 4       # V^ ,          # )Z*NZroot)r   r   )r   r   s   &&r   r   ZDefaultController._user   s5    u}tv~d{fkkm+Awr   )r   r   r   )Z__name__Z
__module__Z__qualname__Z__firstlineno__r   r   Z	processesr   r   r+   r2   r   r   r%   r   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   r   r   )   sB     
V*<,	!' r   r   )r3   r0   Ztracer.hooksr    Ztracer.views.defaultr   Ztracer.views.interactiver   Ztracer.views.note_for_hiddenr   Ztracer.resources.langr   Ztracer.resources.tracerr   Ztracer.resources.systemr   Ztracer.resources.memoryr   Ztracer.resources.applicationsr   Ztracer.resources.rulesr	   Ztracer.controllers.helperr
   Z	raw_inputr/   Z	NameErrorZobjectr   ) r   r   <module>r4      sZ   & 
 
 & , 4 : # * * / 6 ( 6	
z z	  s   A A%$A%