관리-도구
편집 파일: needs_restarting.cpython-39.pyc
a ���g6 � @ s d dl mZ d dl mZ d dl mZ d dl mZ d dlmZmZ d dlZd dl Zd dl Z d dlZd dlZd dl Z d dlZd dlZg d�Zdd � Zd d� Zdd � Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� ZG dd� de�ZG dd� de�ZejjG dd� dejj ��Z!dS ) � )�absolute_import)�division)�print_function)�unicode_literals)�logger�_N) Zkernelz kernel-rtZglibczlinux-firmwareZsystemd�dbuszdbus-brokerzdbus-daemonZ microcode_ctlc s� t j�| �st� S t� }t �| �D ]j}t j�|�s"|�d�s>q"tt j�| |���,}|D ]}|� |� � |f� qVW d � q"1 s�0 Y q"t� � |j�� � � jdd� |D �d�D ]}� � |j� q�� fdd�|D �D ] \}}t�tdj||d��� q؈ S ) z� Provide filepath as string if single dir or list of strings Return set of package names contained in files under filepath z.confNc S s h | ]}|d �qS �r � ��.0�xr r �@/usr/lib/python3.9/site-packages/dnf-plugins/needs_restarting.py� <setcomp>@ � z'get_options_from_dir.<locals>.<setcomp>��namec s h | ]}|d � vr|�qS r r r �Zpackagesr r r B r z`No installed package found for package name "{pkg}" specified in needs-restarting file "{file}".)�pkg�file)�os�path�exists�set�listdir�isdir�endswith�open�join�add�rstrip�sack�query� installed�filterr r �warningr �format)�filepath�base�optionsr �fp�liner r r r r �get_options_from_dir. s&