�
�xkd)� � �: � d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl Z ddl
mZ ddlm
Z
ddlmZ ddlmZmZmZmZmZmZmZmZmZmZmZ ddlZddlZddlm Z m!Z! dd lm"Z# d
Z$d� Z% G d� d
e&� � Z' G d� de'� � Z( G d� de)� � Z* G d� dee* � � Z+ G d� de)� � Z, G d� deeef � � Z- G d� de)� � Z. G d� dee. � � Z/ G d� de)� � Z0ed� � � Z1e2dk r e1� � dS dS ) z"Functionality related to packages.� )�print_functionN)�
BadStatusLine)� HTTPError)�urlopen)�Any�Iterable�Iterator�List�Optional�Set�Tuple�Union�
no_type_check�Mapping�Sequence)�AcquireProgress�InstallProgress)�gettext)�BaseDependency�
Dependency�Origin�Package�Record�Version�VersionListc � � t j � | � � rgt j � | � � |k rDt | � � 5 }t j |� � j |k cddd� � S # 1 swxY w Y dS )z(Return ``True`` if the file is the same.NF)�os�path�exists�getsize�open�apt_pkg�Hashes�hashes)r �sizer$ �fobjs �-/usr/lib/python3/dist-packages/apt/package.py�
_file_is_samer( G s� � �
�w�~�~�d��� 9������ 5� 5�� =� =�
�$�Z�Z� 9�4��>�$�'�'�.�&�8� 9� 9� 9� 9� 9� 9� 9� 9� 9� 9� 9� 9���� 9� 9� 9� 9��5s �A<�<B �B c � � e Zd ZdZdS )�
FetchErrorz(Raised when a file could not be fetched.N��__name__�
__module__�__qualname__�__doc__� � r' |