MOON
Server: Apache
System: Linux s5.yayogua.com.py 6.12.0-124.55.3.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:54:02 EDT 2026 x86_64
User: sanbercountryclu (1012)
PHP: 8.2.33
Disabled: NONE
Upload Files
File: //lib/python3.12/site-packages/tuned/profiles/__pycache__/merger.cpython-312.opt-1.pyc
�

�]�i��>�ddlmZddlmZddlmZGd�de�Zy)�N)�reduce)�Profilec�"�eZdZdZd�Zd�Zd�Zy)�Mergerz0
	Tool for merging multiple profiles into one.
	c��y)N�)�selfs �:/usr/lib/python3.12/site-packages/tuned/profiles/merger.py�__init__zMerger.__init__
s���c�D�t|j|t��}|S)z�
		Merge multiple configurations into one. If there are multiple units of the same type, option 'devices'
		is set for each unit with respect to eliminating any duplicate devices.
		)r�
_merge_twor)r	�configs�
merged_configs   r
�mergezMerger.merge
s��
����'�7�9�=�-�	�rc�`�|j�|j|_|jj|j�t|jj��D�]�\}}|jtjk(r�|jr|jj�t|jj��t|jj��z}|jj|j�|js��t|j�D]$}||vs�|jj!|d���&��|js||jvr||j|<��,|j|j|_|j"|j|_|j$|j|_|j&�|j&|j|_|j(�|j(|j|_|j*�|j*|j|_|j,�|j,|j|_|j.�|j.|j|_|j0�|j0|j|_|j2�A|j2D]+}|j|jj5|d��-d|_|dk(r�|j|jj7dd���|j|jj7dd�}|j|jj|j�||j|jdz|j|jd<���|j|jj|j����|S)z�
		Merge two profiles. The configuration of units with matching names are updated with options
		from the newer profile. If the 'replace' options of the newer unit is 'True', all options from the
		older unit are dropped.
		NF)�last�script)�name�options�update�list�units�items�type�consts�PLUGIN_VARIABLES_UNIT_NAME�replace�	variables�clear�set�keys�prepend�reversed�move_to_end�enabled�devices�priority�devices_udev_regex�
cpuinfo_regex�uname_regex�
script_pre�script_post�drop�pop�get)	r	�	profile_a�	profile_b�	unit_name�unit�overwritten_variables�variable�optionrs	         r
rzMerger._merge_twos6���^�^���N�N�9�>������9�,�,�-��i�o�o�3�3�5�6�o�i��
�i�i�6�4�4�4��|�|������ ��	� 3� 3� 8� 8� :�;�c�$�,�,�BS�BS�BU�>V�V��
�����t�|�|�,��|�|��d�l�l�+��	�.�	.����&�&�x�e�&�<�,�	
���	����8�!%�I�O�O�I��&*�i�i�I�O�O�I��#�)-���I�O�O�I��&�)-���I�O�O�I��&��}�}� �+/�=�=�Y�_�_�Y��(����*�59�5L�5L�Y�_�_�Y��2����%�04�0B�0B�Y�_�_�Y��-����#�.2�.>�.>�Y�_�_�Y��+����"�-1�_�_�Y�_�_�Y��*����#�.2�.>�.>�Y�_�_�Y��+��y�y���9�9���o�o�i� �(�(�,�,�V�T�:���T�Y��H������!;�!C�!C�!G�!G��RV�!W�!c��o�o�i�(�0�0�4�4�X�t�D�V��_�_�Y��'�'�.�.�t�|�|�<�4:�Y�_�_�Y�=W�=_�=_�`h�=i�4i�Y�_�_�Y��'�'��1��_�_�Y��'�'�.�.�t�|�|�<�K7�N
�rN)�__name__�
__module__�__qualname__�__doc__rrrrrr
rrs�����2rr)�tuned.constsr�	functoolsr�tuned.profiles.profiler�objectrrrr
�<module>r@s����*�B�V�Br