File: //proc/self/root/lib/python3.6/site-packages/dnf-plugins/__pycache__/kpatch.cpython-36.pyc
3
�=vh�2 � @ s� d Z ddlmZ ddlmZ ddlZddlZddlZddlm Z m
Z
ddlZddlZddl
ZddlZddlZddlZdZdZdZd Zd
d� Zdd
� Zdd� ZG dd� dejj�ZG dd� dej�ZdS )z�
The DNF plugin helps customers to install kpatch-patch packages
when the kernel is upgraded and filter kernel-core packages that
are supported by the kpatch team.
� )�absolute_import)�unicode_literalsN)�_�logger�kpatchZ
autoupdateZ
autofilterzkernel-corec C s2 dd� | j D �}x|D ]}tjj|�r|S qW d S )Nc S s g | ]}d |t f �qS )z
%s/%s.conf)�KPATCH_PLUGIN_NAME)�.0�path� r
�/usr/lib/python3.6/kpatch.py�
<listcomp>5 s z(_get_plugin_cfg_file.<locals>.<listcomp>)Zpluginconfpath�osr �isfile)Z base_conf�files�filer
r
r �_get_plugin_cfg_file4 s
r c C s: t jd| j�jd�}|jdd�}| jjdd�}dj||�S )Nz
(.*)\.el.*� �.r zkpatch-patch-{}-{})�re�match�release�group�replace�version�format)�
kernel_pkgZkernel_releaseZkpp_kernel_releaseZkpp_kernel_versionr
r
r �_kpp_name_from_kernel_pkg<