/usr/lib/python3.9/site-packages/tuned/profiles/__pycache__
NameSizeModeActions
exceptions.cpython-39.opt-1.pyc3910644editdlrm
exceptions.cpython-39.pyc3910644editdlrm
factory.cpython-39.opt-1.pyc5230644editdlrm
factory.cpython-39.pyc5230644editdlrm
loader.cpython-39.opt-1.pyc42210644editdlrm
loader.cpython-39.pyc42210644editdlrm
locator.cpython-39.opt-1.pyc38060644editdlrm
locator.cpython-39.pyc38060644editdlrm
merger.cpython-39.opt-1.pyc23470644editdlrm
merger.cpython-39.pyc23470644editdlrm
profile.cpython-39.opt-1.pyc20630644editdlrm
profile.cpython-39.pyc20630644editdlrm
unit.cpython-39.opt-1.pyc40940644editdlrm
unit.cpython-39.pyc40940644editdlrm
variables.cpython-39.opt-1.pyc30970644editdlrm
variables.cpython-39.pyc30970644editdlrm
__init__.cpython-39.opt-1.pyc4300644editdlrm
__init__.cpython-39.pyc4300644editdlrm
Edit: /usr/lib/python3.9/site-packages/tuned/profiles/__pycache__/merger.cpython-39.pyc (2347B)
a Á]›i ã@s8ddlmZddlmZddlmZGdd„deƒZdS)éN)Úreduce)ÚProfilec@s(eZdZdZdd„Zdd„Zdd„ZdS) ÚMergerz0 Tool for merging multiple profiles into one. cCsdS)N©)Úselfrrú9/usr/lib/python3.9/site-packages/tuned/profiles/merger.pyÚ__init__ szMerger.__init__cCst|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)rZconfigsZ merged_configrrrÚmerge sz Merger.mergec CsL|jdur|j|_|j |j¡t|j ¡ƒD�]\}}|jtjkr®|j rT|j   ¡t |j   ¡ƒt |j  ¡ƒ@}|j  |j¡|jr¬t|jƒD]}||vrŽ|j j|dd�qŽq.|j s¾||jvrÊ||j|<q.|j|j|_|j|j|_|j|j|_|jdu�r|j|j|_|jdu�r(|j|j|_|jdu�rB|j|j|_|jdu�r\|j|j|_|jdu�rv|j|j|_|jdu�r�|j|j|_|jdu�rÄ|jD]}|j|j |d¡�q¢d|_|dk�r2|j|j dd¡du�r2|j|j dd¡}|j|j |j¡||j|jd|j|jd<q.|j|j |j¡q.|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ÚlistZunitsÚitemsÚtypeÚconstsZPLUGIN_VARIABLES_UNIT_NAMEÚreplaceZ variablesÚclearÚsetÚkeysZprependÚreversedÚ move_to_endZenabledZdevicesÚpriorityZdevices_udev_regexZ cpuinfo_regexZ uname_regexZ script_preZ script_postZdropÚpopÚget) rZ profile_aZ profile_bZ unit_nameZunitZoverwritten_variablesÚvariableÚoptionr rrrr sP            $"zMerger._merge_twoN)Ú__name__Ú __module__Ú __qualname__Ú__doc__rr r rrrrrsr)Z tuned.constsrÚ functoolsrZtuned.profiles.profilerÚobjectrrrrrÚs