0x1949 Team - FAZEMRX - MANAGER
Edit File: DistUpgradeCache.cpython-310.pyc
o >I�c�� � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl Z d dlmZm Z ddlmZ ddlmZ ddlmZ G dd� de�ZG d d � d e�ZG dd� de�Zd d� Ze� \ZZG dd� de�ZG dd� de�ZG dd� de j�Ze dkr�d dl!Z!ddl"m#Z# ddl$m$Z$ e%d� ee#d�e$� d�Z&e%e&�'� � e!�(� e&�)� e&�*� e&j+ e&�,dg� e%e&�-� � e&�.� dS dS )� N)�Popen�PIPE� )�gettext)�ngettext)� inside_chrootc @ � e Zd ZdS )�CacheExceptionN��__name__� __module__�__qualname__� r r �>/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeCache.pyr ( � r c @ r )�CacheExceptionLockingFailedNr r r r r r , r r c @ r )�CacheExceptionDpkgInterruptedNr r r r r r 0 r r c C s� d} d}t �� d }t�d| �D ]/}|d| kr"|t j�|�7 }q|�d�dks7|�d�dks7|�d�dkr8q| t j�|�7 } q| dkrLt�d� d } |dkrWt�d � d}| d7 } d}|d |krg|d }||7 }| |fS )zjestimate the amount of space used by the kernel and initramfs in /boot, including a safety margin r � z /boot/*%s*z/boot/initrd.img-%sz initrd.imgz.bakz.dpkg-z>estimate_kernel_initrd_size_in_boot() returned '0' for kernel?i z>estimate_kernel_initrd_size_in_boot() returned '0' for initrd?i � i g�������?)�os�uname�glob�path�getsize�find�logging�warning)�kernel�initrd�kver�f� initrd_bufferr r r �#estimate_kernel_initrd_size_in_boot4 s4 ��r! c @ s e Zd ZdZdd� Zdd� ZdS )�FreeSpaceRequiredz� FreeSpaceRequired object: This exposes: - the total size required (size_total) - the dir that requires the space (dir) - the additional space that is needed (size_needed) c C s || _ || _|| _d S �N)� size_total�dir�size_needed)�selfr$ r% r&