+
    ,i
  c                   s    ^ RI Ht ^RIHtHt ^RIHt ^RIHt ^RI	H
t
HtHt ]! RRR7       ! R R	]4      4       t ! R
 R]
4      t ! R R]],          4      tR# )i    )	dataclass)ContextGenfscon)ContextWrapper)DiffResultDescriptor)
DifferenceDifferenceResultWrapperT)ZfrozenZorderc                   s0   a  ] tR t^t o RtV 3R ltRtV tR# )ModifiedGenfsconz,Difference details for a modified genfscons.c                s>   < V ^8  d   Qh/ S[ ;R&   S[;R&   S[;R&   # )   ruleZadded_contextZremoved_context)r   r   Zformat__classdict__   "</usr/lib64/python3.14/site-packages/setools/diff/genfscon.py__annotate__ZModifiedGenfscon.__annotate__   s+     
 N          N)__name__
__module____qualname____firstlineno____doc__Z__annotate_func____static_attributes____classdictcell__r      @r   r   r      s      7  r   r   c                   s   a  ] tR t^t o RtV 3R lR lt]],          ! ]4      t]],          ! ]4      t	]]
,          ! ]4      tV 3R lR ltRtV tR# )GenfsconsDifferencez@Determine the difference in genfscon rules between two policies.c                   < V ^8  d   QhRR/# r	   returnNr   r   r   r   r    GenfsconsDifference.__annotate__   s     T T Tr   c                sJ   V P                   P                  RV P                   RV P                   24       V P	                  R V P                  P                  4        4       R V P                  P                  4        4       4      w  V n        V n        p\        \        ,          ! 4       V n
        V Fn  w  r#\        VP                  4      \        VP                  4      8w  g   K4  V P                  P                  \        VVP                  VP                  4      4       Kp  	  R# )z?Generate the difference in genfscon rules between the policies.z%Generating genfscon differences from z to c              3   8   "   T F  p\        V4      x  K  	  R # 5iNGenfsconWrapperZ.0fs   & r   	<genexpr>5GenfsconsDifference.diff_genfscons.<locals>.<genexpr>#   s     H+GR_R  +G   c              3   r    r!   r"   r$   r&   r   r'   r(   $   s     I+HR_R  +Hr)   N)logZinfoZleft_policyZright_policyZ	_set_diffZ	genfsconsadded_genfsconsremoved_genfsconsZlistr   modified_genfsconsr   contextZappend)selfZmatchedZ	left_ruleZ
right_rules   &   r   diff_genfsconsZ"GenfsconsDifference.diff_genfscons   s     	3D4D4D3ET$J[J[I\]	_ AEH4+;+;+E+E+GHI4+<+<+F+F+HIAK=d4g #''7"8":%,!I i//0N:CUCU4VV''../?	@J@R@R@I@Q@Q0S T	 &-r   c                r   r   r   r   r   r   r   r   7   s     $ $T $r   c                sH    V P                   P                  R4       V =V =V =R# )z%Reset diff results on policy changes.z#Resetting genfscon rule differencesN)r*   Zdebugr+   r,   r-   r/      &r   _reset_diffZGenfsconsDifference._reset_diff7   s%    <= "#r   )r+   r-   r,   N)r   r   r   r   r   r0   r   r   r+   r,   r   r-   r3   r   r   r   r   r   r   r      sP     JT T( +84^DO,X6~F-.>?O
$ $r   r   c                   sL   a  ] tR t^?t o RtR	tV 3R lR ltR tR tR t	Rt
V tR# )
r#   z,Wrap genfscon rules to allow set operations.c                s$   < V ^8  d   QhRS[ RR/# )r	   r
   r   N)r   r   r   r   r   ZGenfsconWrapper.__annotate__E   s      X $ r   c                s    Wn         VP                  V n        VP                  V n        VP                  V n        \	        VP
                  4      V n        \        V4      V n        R # r!   )originr%   pathfiletyper   r.   Zhashkey)r/   r
      &&r   __init__ZGenfsconWrapper.__init__E   sC    ''II	%dll3:r   c                s    V P                   # r!   r7   r1   r2   r   __hash__ZGenfsconWrapper.__hash__M   s    xxr   c                s4    V P                   VP                   8  # r!   r:   r/   Zotherr8   r   __lt__ZGenfsconWrapper.__lt__P   s    xx%))##r   c                s    V P                   VP                   8H  ;'       d;    V P                  VP                  8H  ;'       d    V P                  VP                  8H  # r!   )r%   r5   r6   r<   r8   r   __eq__ZGenfsconWrapper.__eq__S   sK    ww%((" , ,II#, ,MMU^^+	,r   )r.   r6   r%   r7   r4   r5   N)r%   r5   r6   r.   )r   r   r   r   r   Z	__slots__r9   r;   r=   r>   r   r   r   r   r   r#   r#   ?   s+     65I $, ,r   r#   N)Zdataclassesr    Z	policyrepr   r   r.   r   Zdescriptorsr   Z
differencer   r   r   r   r   r#   r   r   r   <module>r?      sZ   
 " ) # - = = $d#'  $$$* $$N,gh' ,r   