Server IP : 184.154.167.98 / Your IP : 18.119.107.208 Web Server : Apache System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 User : puertode ( 1767) PHP Version : 8.2.26 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python3.6/site-packages/tracer/packageManagers/__pycache__/ |
Upload File : |
3 "eJ � @ sx d dl mZ d dlmZ ej� d krtd dlZddlmZ d dlm Z d d l mZ d d lm Z d dlZG dd� de�ZdS )� )�absolute_import)�System�arch�archarmN� )�IPackageManager)�Package)�PackagesCollection)�Applicationsc @ sX e Zd Zdd� Zdd� Zdd� Zdd� Zd d � Zdd� Zd d� Z e dd� �Zdd� ZdS )�Alpmc O s$ || _ tjdd�| _| jj� | _d S )N�/z/var/lib/pacman)Zopts�pyalpmZHandleZhandleZget_localdb�db)�self�args�kwargs� r �/usr/lib/python3.6/alpm.py�__init__ s z Alpm.__init__c C s: t � }x.| jjD ]"}|j|kr|jt|j|j�� qW |S )zR Returns list of packages which were modified between unix_time and present )r r �pkgcache�installdate�appendr �name)r Z unix_timeZnew_pkgs�pkgr r r �packages_newer_than% s zAlpm.packages_newer_thanc C s$ | j j|�}|sg S dd� |jD �S )z1 Returns list of files provided by package c S s g | ]}d |d �qS )r r r )�.0�fr r r � <listcomp>8 s z&Alpm.package_files.<locals>.<listcomp>)r �get_pkg�files)r �pkg_namer r r r � package_files0 s zAlpm.package_filesc C s2 |sdS | j j|j�}|sdS |j|_|j|_dS )zN From database load informations about given package and set them to it N)r r r Zdesc�descriptionr Zmodified)r �packager r r r �load_package_info: s zAlpm.load_package_infoc C s |j d }| j|j�S )z@ Returns name of package which provides given application r )Z instances�_file_provided_byZexe)r ZappZprocessr r r �provided_byI s zAlpm.provided_byc C s* | j j|�}|r&tj|j|�dkr&|S dS )z< Find a package by name and some other input criteria r N)r r r �vercmp�version)r r r( r r r r �find_packageQ s zAlpm.find_packagec C s t j|j|j�S )zX vercmp returns: < 0 if ver1 < ver2 0 if ver1 == ver2 > 0 if ver1 > ver2 )r r'