403Webshell
Server IP : 35.236.43.222  /  Your IP : 216.73.216.143
Web Server : Apache
System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64
User : deploy ( 1002)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/reportbug/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/reportbug/__pycache__/checkversions.cpython-39.pyc
a

K56a^%�@s�ddlZddlZddlZddlZddlmZddlmZddl	m
Z
ddlmZddl
mZdZd	Zd
Zdd�Zd
d�Zddd�Zddd�Zddd�Zddd�ZdS)�N�)�utils)�open_url)�	NoNetwork)�Deb822)�debian_supportz4https://qa.debian.org/madison.php?package=%s&text=onzhttp://incoming.debian.org/z$http://ftp-master.debian.org/new.822cCs|r|sdSt�||�S)aIReturn 1 if upstream is newer than current, -1 if current is newer
    than upstream, and 0 if the same.

    .. warning::

        Beware, this is the opposite of usual convention!

        The usual convention is: f(a, b) returns <0, =0, >0 when a <,
        =, > b.

        See e.g. the comparison function in qsort(3).

    r)rZversion_compare)ZcurrentZupstream�r�9/usr/lib/python3/dist-packages/reportbug/checkversions.py�compare_versions=sr
cCst||�dkr|S|S)Nr)r
)�a�brrr	�
later_versionPsr
�i386c

Cs|sd}t��}t|}|dd�|�7}|d|7}zt|||�}WnPty\iYStjjy�}z t	d|t
jd�iWYd}~Sd}~00|s�iS|�dd	��
�}i}	|�d
�D]>}
|
�d�}t|�dkr�q�tj�|d
|d
�}|d|	|<q�|	S)a�:param package:

        Name of the package, e.g. ``"reportbug"``.

    :param timeout:

        Socket timeout, in seconds.

    :param dists:

        The distributions where the search should be done, as an
        iterable, e.g. ``('oldstable', 'stable', 'testing',
        'unstable', 'experimental')`` (which is the default).

    :param http_proxy:

        The proxy to use for the http protocol.  By default, use the
        :func:`urllib.request.getproxies()` settings.

    :returns:

        A map of each dist to a version of the package, e.g.::

            dict(oldstable="46.1",
                 stable="1:26.1+1-3.2+deb10u1",
                 testing="1:26.1+1-4",
                 unstable="1:26.3+1-1")

        .. todo::

            What if there are several versions in the same dist?
            E.g.::

                emacs | 1:26.1+1-4           | sid      | source, all
                emacs | 1:26.3+1-1           | sid      | source, all

    )Z	oldstableZstableZtestingZunstableZexperimentalz&s=�,z&a=source,all,�Warning:��fileN� ��
�|��r)rZget_arch�RMADISON_URL�joinrr�urllib�error�	HTTPError�print�sys�stderr�replace�strip�split�lenZCODENAME2SUITE�get)
�package�timeout�dists�
http_proxy�archZurl�page�xZcontent�versions�line�l�distrrr	�get_versions_availableVs0&
r1c

Cs�|durd}ztt||�}WnPty2iYStjjyl}z td|tjd�iWYd}~Sd}~00|sviSi}t	�
|�D]<}|d|kr�|dd|dd}	t|d	���||	<q�|S)
N)zunstable (new queue)rrZSourceZDistributionz (ZQueue�)ZVersion)
r�NEWQUEUE_URLrrrrrrr rZiter_paragraphs�maxr#)
r&r'r(r)r*r+r,r-Zpara�krrr	�get_newqueue_available�s"r6c
Cslztt||�}WnLty$YdStjjy\}ztd|tjd�WYd}~dSd}~00|sfdS~dS)aG
    :param timeout:

        Socket timeout, in seconds.

    :param http_proxy:

        The proxy to use for the http protocol.  By default, use the
        :func:`urllib.request.getproxies()` settings.

    :returns:

        None.

        .. todo::

            Looks like this function does not work at the moment.

    Nrr)	r�INCOMING_URLrrrrrrr )r&r'r)r*r+r,rrr	�get_incoming_version�sr8TcCsi}|r"t||||�}	|	r"|	|d<t|||||�}
|�|
�|rpt�|�}|durV|}t|||||�}
|�|
�i}d}
|D]n}|dkr�d|vr�|�dd�d}n|}t|||�}nt|||�}|dkr�||||<q||dkr||
d7}
q||
o�|
t|�k}||fS)a�:param package:

        Name of the package, e.g. ``"emacs"``.

    :param version:

        The version as a string, e.g. ``"1:26.3+1-1"``.

    :param timeout:

        Socket timeout, in seconds.

    :param check_incoming:

        If truthy, also check versions in
        ``http://incoming.debian.org/``.

    :param http_proxy:

        The proxy to use for the http protocol.  By default, use the
        :func:`urllib.request.getproxies()` settings.

    :returns:

        A tuple ``(avail, toonew)``::

        avail
            The versions that are more recent that current, as a
            mapping of each distribution to the version, e.g.::

                dict(unstable="42.1", testing="42.0")

        toonew
            Whether the current version is "too new", as a boolean.
            The version is "too new" if it is strictly newer than all
            distributions.

    ZincomingNr�:r)	r8r1�updaterZget_source_namer6r#r
r$)r&�versionr'r(Zcheck_incomingZcheck_newqueuer)r*ZavailZivZstuffZ
srcpackage�newZnewerr0ZverZ
comparisonZtoo_newrrr	�check_available�s8)



r=)NNr)NNr)Nr)NTTNr)rZurllib.requestrZurllib.errorZurllib.parserrZurlutilsrZreportbug.exceptionsrZ
debian.deb822rZdebianrrr7r3r
r
r1r6r8r=rrrr	�<module>s$
V

2�

Youez - 2016 - github.com/yon3zu
LinuXploit