Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3/dist-packages/landscape/lib/apt/package/__pycache__/ |
Upload File : |
o ���c^B � @ s� d Z ddlZzddlZW n ey ddlmZ Y nw ddlmZmZ ddl m Z ddlmZ G dd� de �ZG d d � d e �ZG dd� de�ZG d d� de�ZG dd� de�ZG dd� de�ZG dd� de�Zdd� Zdd� Zdd� ZdS )zEProvide access to the persistent data used by L{PackageTaskHandler}s.� N)�dbapi2)� iteritems�long)�bpickle)�with_cursorc @ � e Zd ZdZdS )�UnknownHashIDRequestz$Raised for unknown hash id requests.N��__name__� __module__�__qualname__�__doc__� r r �A/usr/lib/python3/dist-packages/landscape/lib/apt/package/store.pyr � r c @ r )�InvalidHashIdDbzARaised when trying to add an invalid hash=>id lookaside database.Nr r r r r r r r c @ sl e Zd ZdZdZdd� Zdd� Zedd� �Zed d � �Z edd� �Z ed d� �Zedd� �Zedd� �Z dS )�HashIdStorea C{HashIdStore} stores package hash=>id mappings in a file. The file is a SQLite database that contains a single table called "hash". The table schema is defined in L{ensure_hash_id_schema}. @param filename: The file where the mappings are persisted to. Nc C s || _ d S �N)� _filename��self�filenamer r r �__init__! s zHashIdStore.__init__c C s t | j� d S r )�ensure_hash_id_schema�_db�r r r r �_ensure_schema$ s zHashIdStore._ensure_schemac C s, t |�D ]\}}|�d|t�|�f� qdS )zbSet the ids of a set of hashes. @param hash_ids: a C{dict} of hash=>id mappings. zREPLACE INTO hash VALUES (?, ?)N)r �execute�sqlite3�Binary)r �cursor�hash_ids�hash�idr r r �set_hash_ids'