golden hour
/opt/saltstack/salt/lib/python3.10/site-packages/salt/spm/pkgdb/__pycache__
⬆️ Go Up
Upload
File/Folder
Size
Actions
__init__.cpython-310.pyc
168 B
Del
OK
sqlite3.cpython-310.pyc
4.81 KB
Del
OK
Edit: sqlite3.cpython-310.pyc
o �xe� � @ s� d Z ddlZddlZddlZddlZddlmZ e�e�Zdd� Z ddd�Z ddd �Zdd d�Zddd �Z ddd�Zddd�Zddd�Zdd� ZdS )zn This module allows SPM to use sqlite3 as the backend for SPM's package database. .. versionadded:: 2015.8.0 � N)�OperationalErrorc C s� t j�td �st�dtd � t �td � t j�td �s't�dtd � t�d� tj td dd�} z| � d� W n tyJ | � d � Y nw z| � d � W | S tyb | � d� Y | S w )zU Get an sqlite3 connection, and initialize the package database if necessary Z spm_cache_dirz"Creating SPM cache directory at %sZspm_dbz#Creating new package database at %sTN)Zisolation_levelzSELECT count(*) FROM packagesa] CREATE TABLE packages ( package text, version text, release text, installed text, os text, os_family text, dependencies text, os_dependencies text, os_family_dependencies text, summary text, description text )zSELECT count(*) FROM filesa@ CREATE TABLE files ( package text, path text, size real, mode text, sum text, major text, minor text, linkname text, linkpath text, uname text, gname text, mtime text ))�os�path�existsZ__opts__�log�debug�makedirs�sqlite3Zenable_callback_tracebacks�connect�executer )�conn� r �J/opt/saltstack/salt/lib/python3.10/site-packages/salt/spm/pkgdb/sqlite3.py�init s. �����r c C sr d}|du rd}t � }d}|�d�d�|��| f�}|�� }|r$|�� |s(dS ttt||���}|d |d<