%PDF- %PDF-
Direktori : /usr/lib/python3/dist-packages/UbuntuDrivers/__pycache__/ |
Current File : //usr/lib/python3/dist-packages/UbuntuDrivers/__pycache__/detect.cpython-312.pyc |
� �.�f�� � � � d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl m Z dai adZ G d� de� Zd� Zd3d �Zd � Zd� Zd� Zd � Zd� Zi e_ d� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z!d4d�Z"d� Z#d� Z$d� Z%d5d�Z&d6d�Z'd7d�Z(d8d �Z)d!� Z*d"� Z+ G d#� d$e� Z,d%� Z-d&� Z.d9d'�Z/d3d(�Z0d)� Z1d*� Z2d+� Z3d,� Z4d-� Z5d.� Z6d/� Z7d0� Z8d1� Z9d2� Z:y):zGHardware and driver package detection functionality for Ubuntu systems.� N)�kerneldetection� z/etc/custom_supported_gpus.jsonc �: � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z d� Z y ) �NvidiaPkgNameInfoz%Class to process NVIDIA package namesc � � || _ d| _ d| _ d| _ d| _ d| _ d| _ | j | j � y )NF���r )� _pkg_name�_obsolete_name_scheme�_server�_open� _major_ver�_flavour�is_valid� _process_name)�self�pkg_names �6/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py�__init__zNvidiaPkgNameInfo.__init__ sF � �!���%*��"������ ������ ��� ����4�>�>�*� c �f � d|vrt j d|� y t j d� }|j |� }|r6d| _ |j d� | _ | j | _ d| _ y t j d� }|j |� }|r�|j d� j d� d k7 | _ |j d� j d � d k7 | _ |j d� �| j rdnd�| j rd nd��| _ d| _ y y )N�nvidiaz8NvidiaPkgNameInfo: %s is not an NVIDIA package. Skippingznvidia-([0-9]+)T� znvidia-driver-([0-9]+)(.*)r �-serverr �-openr ) �logging�debug�re�compile�matchr �groupr r r �findr r )r �name�patternr s r r zNvidiaPkgNameInfo._process_name( s � ��4���M�M�T�VZ�[���*�*�.�/��� � �d�#�� �)-�D�&�#�k�k�!�n�D�O� �O�O�D�M� �D�M�� �*�*�9�:��� � �d�#��� �;�;�q�>�.�.�y�9�R�?�D�L����Q��,�,�W�5��;�D�J�(-���A��59�\�\� �r�(I�37�:�:��2�(E�G�D�M� !�D�M� r c � � | j S �N)r �r s r �has_obsolete_name_schemez*NvidiaPkgNameInfo.has_obsolete_name_schemeD s � ��)�)�)r c � � | j S r% )r r&