HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /proc/1780863/root/usr/lib/python3/dist-packages/reportbug/__pycache__/
Upload File :
Current File : //proc/1780863/root/usr/lib/python3/dist-packages/reportbug/__pycache__/debbugs.cpython-311.pyc
�

4�Ad�����ddlmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZddl
mZddlmZGd�de��Zd	d
ddd
dddd�Zddd�Zgd�gd�d�Zdddd�Zgd�Zd�d�Zidd�d d!�d"d#�d$d%�d&d'�d(d)�d*d+�d,d-�d.d/�d0d1�d2d3�d4d5�d6d7�d8d9�d:d;�d<d=�d>d?�id@dA�dBdC�dDdE�dFdG�dHdI�dJdK�dLdM�dNdO�dPdQ�dRdS�dTdU�dVdW�dXdY�dZd[�d\d]�d^d_�d`da��dbdcdddedfdg��ZdhdiiZdj�Zdk�Zd�dm�Zd�dn�Ze	jdo��Zd�dp�Z d�dq�Z!d�dr�Z"ds�Z#dt�Z$du�Z%dv�Z&dwdxdyedzd{ge eee!e"d|�d}d~e$d�	d�d�d�e%d��d�d�d�d��d��Z'd�d�d�d��Z(gd��Z)d�d�iZ*d�d�iZ+d�d�d�d�d�d�d�d�d�d��	Z,d�ej-fd��Z.d��Z/d�d��Z0		d�d��Z1		d�d��Z2d�d��Z3d��Z4ejd���D�]_Z5ee6��5e7e5d�����5Z8e8�9��Z:ddd��n#1swxYwYej;�<e5��Z=e'�>e=idlidd����e'e=<e:D]�Z?	e?�@d�d��\ZAZBeA�C��ZAeB�D��ZBeAd�kreBe'e=d�<nceAd�kr]e4eB��\ZEZFeEe'e=d�<eEdkr d�eFzd�ze'e=d�<d�eFze'e=d�<neEd�krde'e=d�<eFe'e=d�<n	��#eG$rY��wxYw	ddd��n#1swxYwY��a		d�d��ZH		d�d��ZIdS)��)�utils�N)�defaultdict)�suppress)�
checkversionsc��eZdZdS)�ErrorN)�__name__�
__module__�__qualname__���3/usr/lib/python3/dist-packages/reportbug/debbugs.pyr	r	(s�������Drr	z�makes unrelated software on the system (or the
        whole system) break, or causes serious data loss, or introduces a
        security hole on systems where you install the package.z�makes the package in question unusable by most or all users,
        or causes data loss, or introduces a security hole allowing access
        to the accounts of users who use the package.aEis a severe violation of Debian policy (that is,
        the problem is a violation of a 'must' or 'required' directive);
        may or may not affect the usability of the package.  Note that non-severe
        policy violations may be 'normal,' 'minor,' or 'wishlist' bugs.
        (Package maintainers may also designate other bugs as 'serious' and thus
        release-critical; however, end users should not do so.). For the canonical
        list of issues deserving a serious severity you can refer to this webpage:
        https://release.debian.org/testing/rc_policy.txt .z�a bug which has a major effect on the usability
        of a package, without rendering it completely unusable to
        everyone.zca bug that stops the package from being built
        from source.  (This is a 'virtual severity'.)z�a bug that does not undermine the usability of the
        whole package; for example, a problem with a particular option or
        menu item.z�things like spelling mistakes and other minor
        cosmetic errors that do not affect the core functionality of the
        package.z*suggestions and requests for new features.)�critical�grave�serious�	important�does-not-build�normal�minor�wishlist))�breaks unrelated softwareztbreaks unrelated software on the system
            (packages that have a dependency relationship are not unrelated))�breaks the whole systemzmrenders the entire system unusable (e.g.,
            unbootable, unable to reach a multiuser runlevel, etc.))�causes serious data lossz8causes loss of important, irreplaceable
            data)�root security holez�introduces a security hole allowing access to
            root (or another privileged system account), or data normally
            accessible only by such accounts��unknownznot sure, or none of the above))�renders package unusablearenders the package unusable, or mostly
            so, on all or nearly all possible systems on which it could be installed
            (i.e., not a hardware-specific bug); or renders package uninstallable
            or unremovable without special effort)�causes non-serious data losszvcauses the loss of data on the system
            that is unimportant, or restorable without resorting to backup media)�user security holezgintroduces a security hole allowing access to
            user accounts or data not normally accessibler)rr)rrrrr)rrr rz�The product, component or concept is completelynon-operational or some essential functionality is missing.  Noworkaround is known.z�The product, component or concept is not workingproperly or significant functionality is missing.  Problems thatwould otherwise be considered critical are rated serious whena workaround is known.z�The product, component or concept is workingin general, but lacks features, has irritating behavior, doessomething wrong, or doesnt match its documentation.)rr�non-critical)
rrrrrrr!rr�fixed�debbugsc��|dkrddi�||��S|dkrdddddd��||��S|S)a�
    Convert severity names if needed

    Different bug tracking systems use different names for their
    severity levels. This function does some translation between levels
    known by 'debbugs' and 'gnats'.

    Parameters
    ----------
    severity : str
        bug severity level name
    type : str
        type of the bug tracking system (either 'debbugs' or 'gnats')

    Returns
    -------
    str
        translated severity level
    r#r!r�gnatsrr)rrrrr)�get)�severity�types  r�convert_severityr)�sj��(�y�����)�-�-�h��A�A�A�	
����#�&�(�'�*�	,�,�-0�C��(�,C�,C�		D��rzbugs.debian.orgz)The bug tracking system, @bugs.debian.orgzbuildd.debian.orgz3Problems and requests related to the Debian Builddszbuildd.emdebian.orgz2Problems related to building packages for Emdebianzcdimage.debian.orgzCD Image issues�cdromzInstallation systemzcloud.debian.orgz8Issues involving Debian images for public/private cloudszcontributors.debian.orgzKIssues with the Debian Contributors Website and coordination of maintenancezd-i.debian.orgzNIssues regarding the d-i.debian.org service and general Debian Installer taskszdebian-i18nzBRequests regarding Internationalization (i18n) of the distributionzdebian-livez)General problems with Debian Live systems�ftp.debian.orgz7Problems with the FTP site and Package removal requests�generalz4General problems (e.g. "many manpages are mode 755")�installation-reportsz6Reports of installation problems with stable & testingzjenkins.debian.orgz*Issues with the jenkins.debian.org servicezlists.debian.orgz,The mailing lists, debian-*@lists.debian.orgzmanpages.debian.orgzGIssues with the Debian Manpages Website and coordination of maintenance�mirrorsz"Problems with the official mirrorsz
nm.debian.orgz-New Member process and nm.debian.org webpageszpet.debian.netz"The Debian Package Entropy Trackerzpiuparts.debian.orgz+Issues with the piuparts.debian.org service�presszPress release issues�projectz*Problems related to project administrationz
qa.debian.orgzThe Quality Assurance group�release.debian.orgz9Requests regarding Debian releases and release team toolsz
release-noteszProblems with the Release Noteszrtc.debian.orgzVIssues in the operation of the Debian RTC services which are not package-specific bugszsecurity-trackerzThe Debian Security Bug Trackerzsecurity.debian.orgzThe Debian Security Teamzsnapshot.debian.orgz,Issues with the snapshot.debian.org service �spamz8Spam (reassign spam to here so we can complain about it)zsponsorship-requestsz+Requests for package review and sponsorshipzsso.debian.orgzAProblems and requests related to the Debian Single Sign On systemzsummit.debconf.orgz<Problems and requests related to the DebConf Summit instancez	tech-cttez5The Debian Technical Committee (see the Constitution)zJIssues with the Debian Package Tracker and coordination of its maintenancez0Reports of upgrade problems for stable & testingzProblems with the Debian wikiz*Work-Needing and Prospective Packages listzProblems with the WWW site)ztracker.debian.org�upgrade-reportszwiki.debian.org�wnppzwww.debian.orgzdebian-generalzAny non-package-specific bugc��tj|��}|dr|Stj|d���}|dr|Stj|d���}|r't|dd��}|r
|dr|SdS)a�
    Get package information

    Check if dpkg or apt know about a given package and return
    information about it. If only a matching source package is found,
    return information about one of its binary packages.

    See :func:`utils.get_package_status()` for a description of the
    returned package information.

    This is a helper function used by :func:`handle_debian_ftp()`,
    :func:`handle_debian_release()`, and :func:`handle_wnpp()`.

    Parameters
    ----------
    package : str
        package name

    Returns
    -------
    (...) or None
        Tuple with package information, or None of no package found
    rT)�avail)�only_sourcerN)r�get_package_status�get_source_package�check_package_info)�package�info�pkgss   rr:r:�s���2�#�G�,�,�D��A�w�����#�G�4�8�8�8�D��A�w�����#�G��>�>�>�D���!�$�q�'�!�*�-�-���	�D��G�	��K��4rc��|dp|}|�d|z��|�d|z��|�d��|S)N�zControl: affects -1 + src:%sz$X-Debbugs-Cc: %s@packages.debian.orgz=Your report will be carbon-copied to the package maintainer.
)�append�log_message)r<r;�pseudos�ui�src_pkgs     r�add_affects_packagerEsX���2�h�!�'�G��N�N�1�G�;�<�<�<��N�N�9�G�C�D�D�D��N�N�S�T�T�T��NrTc�	�dx}x}x}	x}
}d}g}
g}d}|�dddddd	d
ddd
dd�
dd���}|s|�d��t�d}|dkrdSd}|�|��}|s|�d��dS|�d��t|��}d}|s5|�ddddd���}|dkrtjd ��n"|d!|d"}}
t||||��}|d#k�r�|�
d$��|�
d%��|�d&id'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d�d6d�d7d�id8d�d9d�d:d�d;d�d<d�d=d�d>d�d?d�d@d�dAd�dBd�dCd�dDd�dEd�dFd�dGd�dHd��idId�dJd�dKd�dLd�dMd�dNd�dOd�dPd�dQd�dRd�dSd�dTd�dUd�dVd�dWd�dXd�dYd��ddddddddZ��d[|
d�\��}|s|
}|d]krd^}n|}|�d_ddddd`�da|d�\��}|s|}||
krO||krI|�dbdcddded���}|dkr)|�df��tjd ��||kr*|�
dg��|�dh��|�diddddj�dkdld�\��}|sdl}|dlkrdm|�dn|�do|�dp|��}ndm|�dn|�do|��}dq}�n�|�
d$��|�
dr��|�dsdtdudvdwdxdydzd{d|�d}dd�\��}|sd}|d~vr*|�
d��|�d���d�}|�|��}|sdS|�d�dd�d�d���}|d�kr5d�}|�|��}	|	s|�d���t�|d�kr|	r|�d���d}d�}|	r'|dkrd�|�do|�d�|	�d�|�d�|��
}n/d�|�d�|	�d�|�d�|��}n |dkrd�|�do|�d�|�d�|��}nd�|�d�|�d�|��}|d�kr)|�d���tjd ��|||
|||fS)�a�
    Handle bugs for ftp.debian.org

    Interactively (via the user interface) gather information required
    for filing a bug on ftp.debian.org.

    This function is accessible via:
    SYSTEMS['debian']['specials']['ftp.debian.org']
    and therefore one of the functions sharing the same call
    signature available under:
    SYSTEMS['debian']['specials']

    Parameters
    ----------
    package : str
        package name
    bts
        unused
    ui : reportbug UI object
        reportbug UI
    fromaddr
        unused
    timeout
        unused
    online : bool, optional
        unused
    http_proxy : optional
        unused

    Returns
    -------
    (str, str, [str, ...], [], str, str) or None
        Tuple with six components:

        0. subject string
        1. severity string
        2. list of header strings
        3. empty list of pseudoheaders
        4. message body template
        5. query bool, always False
    ��unstableT��What sort of request is this?  (If none of these things mean anything to you, or you are trying to report a bug in an existing package, please press Enter to exit reportbug.)z(Package removal - Request Of Maintainer.z+Package removal - Requested by the QA team.z$Package removal - Request of Porter.z(Package removal - Not Built [by] Source.z1Package removal - Never Part Of A Stable Release.z,Package removal - Newer Version In Unstable.z5Package removal - Architecture Not Allowed In Source.z*Package removal - Internal Compiler Error.zChange override request.z5Not a package removal request, report other problems.)
�ROM�RoQA�ROP�NBS�NPOASR�NVIU�ANAIS�ICE�override�other�Choose the request type: ��empty_okzOTo report a bug in a package, use the name of the package, not ftp.debian.org.
rrSNzHPlease enter the name of the package (either source of binary package): z@You seem to want to report a generic bug, not request a removal
� Checking package information...
F�/This package doesn't appear to exist; continue?�yN�!Ignore this problem and continue.�Exit without filing a report.��y�nr^r��
rRz(User: ftp.debian.org@packages.debian.orgzUsertags: overridezSelect the new section�adminzcli-mono�comm�databasezdebian-installer�debug�devel�doc�editors�	education�electronics�embedded�fonts�games�gnomezgnu-r�gnustep�golang�graphics�hamradio�haskell�httpd�interpreters�
introspection�java�
javascript�kde�kernel�libdevel�libs�lisp�localization�mail�math�metapackages�misc�net�news�ocaml�oldlibs�	otherosfs�perl�php�python�ruby�rust�science�shells�sound�tex�text)r�vcs�video�web�x11�xfce�zopezChoose the section: ��defaultrV�extra�optionalzSelect the new priority)�requiredr�standardr�zChoose the priority: znYou didn't change section nor priority: is this because it's ftp.debian.org override file that needs updating?�Ynz+ftp.debian.org override file needs updatingzNo, it's not the override filez3There's nothing we can do for you, then; exiting...z*X-Debbugs-Cc: debian-boot@lists.debian.orgz2Your report will be carbon-copied to debian-boot.
z9Is this request for an archive section other than "main"?)�main�contribznon-freezChoose the archive section: r�z
override: �:�/� z*(Describe here the reason for this change)zUsertags: removez;Is the removal to be done in a suite other than "unstable"?z
Old stablezOld stable proposed updates�StablezStable proposed updateszTesting only (NOT unstable)zTesting proposed updates�Unstable�Experimental)�	oldstablezoldstable-proposed-updates�stablezstable-proposed-updates�testingztesting-proposed-updatesrH�experimental�Choose the suite: )r�rHr�z-X-Debbugs-Cc: debian-release@lists.debian.orgz5Your report will be carbon-copied to debian-release.
z%Please enter the reason for removal: z3Is this removal request for specific architectures?z3This is a partial (specific architectures) removal.z&This removal is for all architectures.r]�1Please enter the arch list separated by a space: z<Partial removal requests must have a list of architectures.
r�z_Partial removal for testing; forcing suite to 'unstable', since it's the proper way to do that.z�(please explain the reason for the removal here)

Note: this was a request for a partial removal from testing, converted in one for unstable�RM: z [z] -- z; � -- zwRemovals from testing are handled by the release team. Please file a bug against the release.debian.org pseudo-package.)�menu�long_message�
SystemExit�
get_stringrAr:�select_options�sys�exitrEr@)r;�btsrC�fromaddr�timeout�online�
http_proxy�body�reason�archs�section�priority�suite�headersrB�query�tagr'�promptr<�cont�new_section�default_priority�new_priority�arch_section�subject�why�partials                            r�handle_debian_ftpr�
s���T24�3�D�3�6�3�E�3�G�h��E��G��G��E�
�'�'�%�H�K�C�G� S�L�V�I�"<�V�'�'�1�4��A�A�C���
���j�k�k�k����H�
�g�~�~���[���-�-��'�'���	��N�N�^�_�_�_��F�
���:�;�;�;�!�'�*�*�����
	F��$�$�A��?�;�=�=�>�>�D��s�{�{�������� $�R��$�r�(�X�G�)�$���"�E�E�G�
�j������A�B�B�B����+�,�,�,��g�g�6�9
��R�9
�#�R�9
�)/��9
�5?��9
���9
�$+�R�9
�18�"�9
�>C�R�9
�
�r�9
�'��9
�-:�2�9
�
��	9
�$�R�	9
�*1�"�	9
�7>�r�	9
�

�R�9
�
#�B�9
�9
�
)1�"�9
�
��
9
�'��
9
�
�r�9
�#�B�9
�)7��9
�
�R�9
�"(��9
�.:�2�9
�
�2�9
� ��9
�
��9
�#�B�9
�)/��9
�5C�B�9
�
�B�9
���9
�9
�9
�%3�B�9
�9?��9
�
�2�9
��r�9
�$+�B�9
�1:�2�9
�
��9
�$�R�9
�*/��9
�5=�b�9
�
�B�9
���9
�
�r�9
�$�R�9
�*1�"�9
�7<�R�9
� 
�B�!9
�9
� "$�B��B��r�2�#9
�9
�9
�$"�7�T�%�C�C��&�	"�!�K��w���)���'���w�w�8�����	;
�;
�
#�,<�t��M�M���	,�+�L��'�!�!�l�h�&>�&>��$�$�D��I�=�?�?�@�@�D�
�s�{�{����!-�.�.�.��������8�#�#��N�N�G�H�H�H��N�N�P�Q�Q�Q��w�w�Z����]
�]
�*�6�D�	�J�J��
�	"�!�L��6�!�!�!�18���,�,�,����Ua�Ua�b�G�G�"�/6�g�g�{�{�{�L�L�Q�G�;������A�B�B�B����)�*�*�*����'�)5�:W�&.�7P�'D�8R�(2�,:�	)�	)�0��d��
T�
T���	��E��?�?�?��N�N�J�K�K�K��N�N�S�T�T�T�5�����s�#�#���	��F��#�#�A��M�@�B�B�C�C���c�>�>�H�F��M�M�&�)�)�E��
!���� _�`�`�`� � ��I���%���O�O�S�
T�
T�
T��E�3�D��		F��
�"�"�"�8?���������s�s�s�TZ�TZ�[���#�6=�W�W�e�e�e�S�S�S�&�&�Q����
�"�"�"�3:�7�7�E�E�E�3�3�3���O���#�18������f�f�E���I����O�O�_�
`�
`�
`��H�Q�K�K�K��X�w���u�=�=rc���(�d}g}g}	d}
d}d}tjd}
|
dz}|
dz}|
dz}tjd}|dz}|dz}|dz}tjd	}|�d
ddd
ddddd|d|
z|d|zddddidd���}|s|�d��t�d}|dkrdS|d
krB|�d��}|s)|�d��t
jd���n d}|�|��}|s|�d ��dS|�d!��t|��}d"}
|r|d#p|}|d$}|rk|�
d��rV	ttj
|||dd%�f�������d$}n#t$rYnwxYw|s5|�d&d'd(d)d*���}|d+krt
jd��nt#|||	|��}	|dd||dfvrq|�
d��rd}|r%|�d,|zd-d.d/d*���}|d+krd}|s1|�d0��}|s|�d1|z��dS|d2vrp|�d3d'd4d5d*���}|d6krP|dkr|�d7��t�d8}|�|��}|s|�d9��|dkr0|�d:|d|d|d|
d|d|d|dd;dd<di	d=d;d�>��}|sd;}|	�d?��|�
d��r6|	�d@��|	�dA|dd%�z��n|	�dB|z��|dkr3|�dC��}dD|�dE|��}dF|�dE|�dG|pdH�dG|�dI|�dJ�}�n�|dk�rdK|z}dL}dM} dM}!dM}"|�dN��dO}|�|��}#|#rdP}|�|��}$nd}$|#r�|$r�dQ��(�(fdR�|#������D��}%�(fdS�|$������D��}&dTj}'dU|'|%|&z��z} dU|'|&��z}!dU|'|%��z}"|t-jdV|�dW| �dX|!�dY|"�dZ�	��z
}n�|d
kr|}d}n�|dkr'd[|�d\|��}t-jd]|�d^|�d\|�d_���}n�|�
d��r|�d`|�d\|��}t-jda��}nY|dkrS|�dbd-dcddd*���}|d6kr)|�de��t
jd��df|�d\|��}dg}||||	||
fS)ha 
    Handle bugs for release.debian.org

    Interactively (via the user interface) gather information required
    for filing a bug on release.debian.org.

    This function is accessible via:
    SYSTEMS['debian']['specials']['release.debian.org']
    and therefore one of the functions sharing the same call
    signature available under:
    SYSTEMS['debian']['specials']

    Parameters
    ----------
    package : str
        package name
    bts
        unused
    ui : reportbug UI object
        reportbug UI
    fromaddr
        unused
    timeout : int
        remote query timeout in seconds
    online : bool, optional
        use a remote query to get the package version?
    http_proxy : optional
        unused

    Returns
    -------
    (str, str, [], [str, ...], str, str) or None
        Tuple with six components:

        0. subject string
        1. severity string, always 'normal'
        2. empty list of headers
        3. list of pseudoheaders strings
        4. message body template
        5. query bool, always False
    rGTNr�z-puz
-backportsz	-securityr�r�rI�binnmuzbinNMU requests�britneyztesting migration script bugs�
transitionztransition tracking�unblockzunblock requestsz%s proposed updates requests�rmzStable/Testing removal requestsrSzNone of the other optionsrTrUzSTo report a bug in a package, use the name of the package, not release.debian.org.
rz,Please enter the subject of the bug report: zNo subject specified, exitingrz&Please enter the name of the package: z*You seem to want to report a generic bug.
rWFr?r���rXrYrZr[r\r^z7Latest version seems to be %s, is this the proper one ?r�zThis is the correct versionzEnter the proper versionz)Please enter the version of the package: z5A version is required for action %s, not sending bug
)r�r�z+Is this request for specific architectures?z3This is a partial (specific architectures) request.z&This request is for all architectures.r]aThe proper way to request a partial removal from testing is to file a partial removal from unstable: this way the package for the specified architectures will be automatically removed from testing too. Please re-run reportbug against ftp.debian.org package.r�z&No architecture specified, skipping...z/For which suite are you requesting this binNMU?rHr�r�r�z,User: release.debian.org@packages.debian.orgzUsertags: puzTags: %szUsertags: %szbinNMU changelog entry: znmu: �_znmu z . �ANYz . -m "z"
ztransition: %sz�(please explain about the transition: impacted packages, reason, ...
 for more info see: https://wiki.debian.org/Teams/ReleaseTeam/Transitions)
z
<Fill out>aQTo assist the release team, please fill in the following information. You will be asked to provide package names of the library package(s) that are the source of the transition.  If more than one library is changing the name, please use a space separated list.  Alternatively you can use a regex by enclosing the regex in slashes ("/").  Please ensure that the "old" regex does not match the "new" packages.  Example: old="/libapt-pkg4.10|libapt-inst1.2/ libept1" new="/libapt-pkg4.12|libapt-inst1.5|libept1.4.12/". For further reference, please refer to https://debian.pages.debian.net/ben/ .zMPlease enter old binary package name of the library (or a regex matching it):zMPlease enter new binary package name of the library (or a regex matching it):c�(�|ddkr|pd|zS)Nrr�z"%s"r
)�xs r�quotez$handle_debian_release.<locals>.quote�s���!����)��8�f�q�j�8rc�&��g|]
}�|����Sr
r
��.0r�r�s  �r�
<listcomp>z)handle_debian_release.<locals>.<listcomp>�s!���?�?�?�A�u�u�Q�x�x�?�?�?rc�&��g|]
}�|����Sr
r
r�s  �rr�z)handle_debian_release.<locals>.<listcomp>�s!���>�>�>�Q���a���>�>�>rz | .depends ~ z.depends ~ z3
               Ben file:

               title = "z ";
               is_affected = z;
               is_good = z;
               is_bad = z;

               z	unblock: r�z'                Please unblock package a

                (Please provide enough (but not too much) information to help
                the release team to judge the request efficiently. E.g. by
                filling in the sections below.)

                [ Reason ]
                (Explain what the reason for the unblock request is.)

                [ Impact ]
                (What is the impact for the user if the unblock isn't granted?)

                [ Tests ]
                (What automated or manual tests cover the affected code?)

                [ Risks ]
                (Discussion of the risks involved. E.g. code is trivial or
                complex, key package vs leaf package, alternatives available.)

                [ Checklist ]
                  [ ] all changes are documented in the d/changelog
                  [ ] I reviewed all changes and I approve them
                  [ ] attach debdiff against the package in testing

                [ Other info ]
                (Anything else the release team should know.)

                unblock z
                z
: package a�                (Please provide enough information to help the release team
                to judge the request efficiently. E.g. by filling in the
                sections below.)

                [ Reason ]
                (Explain what the reason for the (old-)stable update is. I.e.
                what is the bug, when was it introduced, is this a regression
                with respect to the previous (old-)stable.)

                [ Impact ]
                (What is the impact for the user if the update isn't approved?)

                [ Tests ]
                (What automated or manual tests cover the affected code?)

                [ Risks ]
                (Discussion of the risks involved. E.g. code is trivial or
                complex, alternatives available.)

                [ Checklist ]
                  [ ] *all* changes are documented in the d/changelog
                  [ ] I reviewed all changes and I approve them
                  [ ] attach debdiff against the package in (old)stable
                  [ ] the issue is verified as fixed in unstable

                [ Changes ]
                (Explain *all* the changes)

                [ Other info ]
                (Anything else the release team should know.)
                zgIs the removal you are asking for really to be done in stable/testing and not in unstable/experimental?z7Yes, the package should be removed from stable/testing.z<No, I want to request removal from unstable or experimental.z�Removal requests for unstable and experimental are handled by the FTP team. Please file a bug against the ftp.debian.org pseudo-package.r�z*(explain the reason for the removal here)
)r�SUITE2CODENAMEr�r�r�r�r�r�rAr:�endswith�listr�get_versions_available�values�
IndexErrorr�rEr@�strip�split�join�textwrap�dedent))r;r�rCr�r�r�r�r�r�rBr�r��versionr��oldstable_pu�oldstable_backports�oldstable_securityr��	stable_pu�stable_backports�stable_securityr�r�r'�subject_britneyr�r<r�r�r�r�r��affected�good�bad�tfrom�tto�listbad�listgood�jr�s)                                        @r�handle_debian_releaser��s8���T�D��G��G��E��E��G��$�[�1�I��u�$�L�#�l�2��"�[�0��
�
!�(�
+�F����I���,���{�*�O��"�9�-�G�
�'�'�%�� 1��!@�"�$9��!3�"�$B�Y�$N��!?�&�!H��=��:�	'�1�4��A�A�C���
���n�o�o�o����H�
�g�~�~���
�i����-�-�(V�W�W���	��O�O�;�<�<�<��H�Q�K�K�K��:���-�-��'�'���	��N�N�H�I�I�I��F�
���:�;�;�;�!�'�*�*�����	��2�h�)�'�G��1�g�G��	�c�l�l�5�)�)�	�
��}�C�G�W�WZ�[^�\^�[^�W_�Va�b�b�i�i�k�k�l�l�mn�o�����
�
�
���
�����	F��$�$�A��?�;�=�=�>�>�D��s�{�{��������)�$���"�E�E�G�
�x��I�|�T�B�B�B��<�<����	��G��	��$�$�I�W�U��9�6�8�8�9�9�D��s�{�{����	��m�m�$O�P�P�G��
����W�[^�_�`�`�`���
�����#�#�9��M�@�B�B�C�C���c�>�>��d�{�{����!L�M�M�M�
!� �H�F��M�M�&�)�)�E��
J���� H�I�I�I�
�h������I�"�B�,�b�+�R�%�r�/��.��#�R�&��*�B�
�-�j�4��Q�Q���	��E��N�N�A�B�B�B�
�|�|�E���/����~�&�&�&����z�S��"��X�.�/�/�/�/����~��-�.�.�.�
�h������9�:�:���")�'�'�7�7�3���6=�g�g�w�w�w���QV���X]�X]�X]�_e�_e�_e�f���	��	�	�"�g�.��^��������
���\�	]�	]�	]�a���
�
�f�%�%���	�d�F��-�-��'�'�C�C��C��
	-�S�
	-�
9�
9�
9�@�?�?�?������)<�)<�)>�)>�?�?�?�G�>�>�>�>�#�)�)�+�+�*;�*;�*=�*=�>�>�>�H� �%�A�$�q�q��8�);�'<�'<�<�H� �1�1�X�;�;�.�D��!�!�G�*�*�,�C������g�g�x�x�x����s�s�s�	!4�	5�	5�		5���

�	�	�	�!�����	�	�	�	�	�&-�g�g�w�w�7�����:�w�w�������; 2�3�3���<

���e�	�	�,=�),���g�g�g�w�w�?���� �����@

����� � �"T�!%�-f�-k�(m�(m�n�n���3�;�;��O�O�[�
\�
\�
\��H�Q�K�K�K��!(���'�'�2��<���X�w���u�=�=s�AG�
G�Gaa    * Package name    : %(package)s
      Version         : x.y.z
      Upstream Contact: Name <somebody@example.org>
    * URL             : https://www.example.org/
    * License         : (GPL, LGPL, BSD, MIT/X, etc.)
      Programming Lang: (C, C++, C#, Perl, Python, etc.)
      Description     : %(short_desc)s

    (Include the long description here.)

    Please also include as much relevant information as possible.
    For example, consider answering the following questions:
     - why is this package useful/relevant? is it a dependency for
       another package? do you use it? if there are other packages
       providing similar functionality, how does it compare?
     - how do you plan to maintain it? inside a packaging team
       (check list at https://wiki.debian.org/Teams)? are you
       looking for co-maintainers? do you need a sponsor?
c	��dx}}g}	g}
d}|�ddddddd	�d
d���}|s|�d��t�d}|sK|d
vrd}
nd}
|�|
��}t	j|��s|�d��d}|�K|�d��t|��}|o|d}d}|dv�r|rJ|rtj	|d||���r0|�
d|zddd���stjd��d}d}|s|�d��}|�|dkr�|
�
d��|
�
d �tj�tj�|��������|�d!��t&t)��z}n�|d"vr�d}d#}|s9|�d$d%d&dd'���}|d(krtjd��dx}}n.|d)pd}|d*p|}|d+}t-|||
|��}
|d,kr|r|d-d.vrd/}|d0kr*|
�
d��|�d1��|r$d2}|d3krd4}n|d0krd5}d6|�d7|�d8�}||zd9z}|r|�d:|�d;|��}n|�d:|��}|||	|
||fS)<aJ
    Handle wnpp bugs

    Interactively (via the user interface) gather information required
    for filing a wnpp (Work-Needing and Prospective Packages) bug.

    This function is accessible via:
    SYSTEMS['debian']['specials']['wnpp']
    and therefore one of the functions sharing the same call
    signature available under:
    SYSTEMS['debian']['specials']

    Parameters
    ----------
    package : str
        package name
    bts
        unused
    ui : reportbug UI object
        reportbug UI
    fromaddr : str
        Mailaddress to use as Owner pseudo-header for ITP bugs
    timeout : int
        remote query timeout in seconds
    online : bool, optional
        use a remote query to get the package version?
    http_proxy : str
        Proxy URL to use with HTTP connections

    Returns
    -------
    (str, str, [], [str, ...], str, str) or None
        Tuple with six components:

        0. subject string
        1. severity string
        2. list of header strings
        3. list of pseudoheaders strings
        4. message body template
        5. query bool
    rGTrIzOThe package has been `Orphaned'. It needs a new maintainer as soon as possible.a+This is a `Request for Adoption'. Due to lack of time, resources, interest or something similar, the current maintainer is asking for someone else to maintain this package. They will maintain it in the meantime, but perhaps not in the best possible way. In short: the package needs a new maintainer.z�This is a `Request For Help'. The current maintainer wants to continue to maintain this package, but they need some help to do this because their time is limited or the package is quite big and needs several maintainers.zrThis is an `Intent To Package'. Please submit a package description along with copyright and URL in such a report.z�This is a `Request For Package'. You have found an interesting piece of software and would like someone else to maintain it for Debian. Please submit a package description along with copyright and URL in such a report.)�O�RFA�RFH�ITP�RFPrTrUzETo report a bug in a package, use the name of the package, not wnpp.
)r�r�z(Please enter the proposed package name: zPlease enter the package name: zInvalid package namerWrr)r�r��0)r�zQA package called %s already appears to exist (at least on your system); continue?z�Ignore this problem and continue.  If you have already locally created a package with this name, this warning message may have been produced in error.r[r)r�rzpPlease briefly describe this package; this should be an appropriate short description for the eventual package: r�z+X-Debbugs-Cc: debian-devel@lists.debian.orgz	Owner: {}zFYour report will be carbon-copied to debian-devel, per Debian policy.
)r�r�r�FrXrYrZr\r^�r?�
r��	)r�rr�rr�zGYour request will be carbon-copied to debian-devel, per Debian policy.
zintend to orphanr�zrequest an adopter forz#request assistance with maintainingzI z the z' package.

The package description is:
�
�: r�)r�r�r�r�r�check_package_namerAr:r�check_available�yes_nor�r�r@�format�email�header�make_header�
decode_header�itp_template�varsr�rE)r;r�rCr�r�r�r��
short_descr�r�rBr�r�r�r<�	availabler'r��	long_desc�orphstrr�s                     r�handle_wnppr@s!��T��J���G��G��E�
�'�'�%�L�M�
Z�r�N�'�'�$1�4�+�A�A�C�,��
���`�a�a�a����G����.� � �?�F�F�6�F��-�-��'�'���'��0�0�	��O�O�2�3�3�3��G����N�N�6�7�7�7��g�&�&�D�� ��a��I��H�
�n����		�f�		�
�(E���g�*�)>�)>�)>�		��9�9�/�18�9�G�4�Q�
�@�@�
����������
��	L����K�L�L�J��	L�
�%�<�<��N�N�H�I�I�I��N�N�;�-�-���(�(���)C�)C�H�)M�)M�N�N�P�P�
Q�
Q�
Q��N�N�2�
3�
3�
3��d�f�f�$���	�#�	#�	#������
	F��$�$�A��?�;�=�=�>�>�D��s�{�{�������%'�'�J����b���R�J��2�h�)�'�G��R��I�)�$���"�E�E�G��#�:�:�$�:�4��7�5�$6�$6�"�H��%�<�<��N�N�H�I�I�I��N�N�2�
3�
3�
3��		+�(�G��e�|�|�2�������?���9@������J�D��)�#�d�*�D��,�$'�C�C����*�*�=���!�c�c�7�7�+���X�w���u�=�=rc	���d}g}g}	d}
d}d}|�d��pd}
|�d��pd}|�d��pd}tjd	|
�d
|�d|�d���}||||	||
fS)
a�
    Provide installation report template

    Interactively (via the user interface) gather information required
    for filing an installation report and provide a report template.

    This function is accessible via:
    SYSTEMS['debian']['specials']['installation-reports']
    and therefore one of the functions sharing the same call
    signature available under:
    SYSTEMS['debian']['specials']

    Parameters
    ----------
    package : str
        unused
    bts
        unused
    ui : reportbug UI object
        reportbug UI
    fromaddr : str
        unused
    timeout : int
        unused
    online : bool, optional
        unused
    http_proxy : str
        unused

    Returns
    -------
    (str, str, [], [str, ...], str, str) or None
        Tuple with six components:

        0. subject string
        1. severity string
        2. list of header strings
        3. list of pseudoheaders strings
        4. message body template
        5. query bool
    rGTz9How did you boot the installer (CD/DVD/USB/network/...)? z/<boot method (CD/DVD, USB stick, network, etc.>zMWhat image did you use to install? (If you can, give its URL and build date) z*<Full URL to image you downloaded is best>z/Describe your machine (manufacturer and type): z-<Description of machine (manufacturer, type)>z�        (Please provide enough information to help the Debian
        maintainers evaluate the report efficiently - e.g., by filling
        in the sections below.)

        Boot method: z
        Image version: z@
        Date: <Date and time of the install>

        Machine: an
        Partitions: <df -Tl will do; the raw partition table is preferred>


        Base System Installation Checklist:
        [O] = OK, [E] = Error (please elaborate below), [ ] = didn't try it

        Initial boot:           [ ]
        Detect network card:    [ ]
        Configure network:      [ ]
        Detect media:           [ ]
        Load installer modules: [ ]
        Clock/timezone setup:   [ ]
        User/password setup:    [ ]
        Detect hard drives:     [ ]
        Partition hard drives:  [ ]
        Install base system:    [ ]
        Install tasks:          [ ]
        Install boot loader:    [ ]
        Overall install:        [ ]

        Comments/Problems:

        <Description of the install, in prose, and any thoughts, comments
              and ideas you had during the initial install.>


        Please make sure that any installation logs that you think would
        be useful are attached to this report. (You can find them in the
        installer system in /var/log/ and later on the installed system
        under /var/log/installer.) Please compress large files using gzip.
        )r�r�r�)r;r�rCr�r�r�r�r�r�rBr�r'r��
bootmethod�image�machines                r�handle_installation_reportr�s���T�D��G��G��E��H��G��-�-� [�\�\�G�F���]�]�j�
k�
k�=�<�
��}�}�N�O�O�B�A���?�(�
!�(�(��
(�(��(�(�(�(
�(
�D�T
�X�w���u�=�=rc�R�d}g}g}	d}
d}d}tjd��}||||	||
fS)a�
    Provide upgrade report template

    This function is not interactive and just provides a report
    template.

    This function is accessible via:
    SYSTEMS['debian']['specials']['installation-reports']
    and therefore one of the functions sharing the same call
    signature available under:
    SYSTEMS['debian']['specials']

    Parameters
    ----------
    package : str
        unused
    bts
        unused
    ui : reportbug UI object
        unused
    fromaddr : str
        unused
    timeout : int
        unused
    online : bool, optional
        unused
    http_proxy : str
        unused

    Returns
    -------
    (str, str, [], [str, ...], str, str) or None
        Tuple with six components:

        0. subject string
        1. severity string
        2. list of header strings
        3. list of pseudoheaders strings
        4. message body template
        5. query bool
    rGTa�        (Please provide enough information to help the Debian
        maintainers evaluate the report efficiently - e.g., by filling
        in the sections below.)

        My previous release is: <codename or version from which you are upgrading>
        I am upgrading to: <codename or version of the release you are upgrading to>
        Archive date: <Timestamp, available as project/trace/ftp-master.debian.org
             on your mirror or .disk/info on your CD/DVD set>
        Upgrade date: <Date and time of the upgrade>
        uname -a before upgrade: <The result of running uname -a on a shell prompt>
        uname -a after upgrade: <The result of running uname -a on a shell prompt>
        Method: <How did you upgrade?  Which program did you use?>

        Contents of /etc/apt/sources.list:


        - Were there any non-Debian packages installed before the upgrade?  If
          so, what were they?

        - Was the system pre-update a 'pure' system only containing packages
          from the previous release? If not, which packages were not from that
          release?

        - Did any packages fail to upgrade?

        - Were there any problems with the system after upgrading?


        Further Comments/Problems:


        Please attach the output of "COLUMNS=200 dpkg -l" (or "env COLUMNS ...",
        depending on your shell) from before and after the upgrade so that we
        know what packages were installed on your system.
        )r�r�)
r;r�rCr�r�r�r�r�r�rBr�r'r�s
             r�handle_upgrade_reportrOsO��T�D��G��G��E��H��G��?�#�#
�#
�D�J
�X�w���u�=�=rc���tj��}tj��d}tj��}|r||krd|z}nd|�d|�d�}nd|z}|r|d|zz
}|dz
}|S)	a
    Collect information about dpkg and machine architecture(s)

    This is a helper function for :func:`debian_infofunc()` and
    :func:`ubuntu_infofunc()`.

    Returns
    -------
    str
        Information line(s) about debian/machine architecture(s)
    �zArchitecture: %s
zArchitecture: z (z)
zArchitecture: ? (%s)
zForeign Architectures: %s
r)r�get_arch�os�uname�
get_multiarch)�debarch�
utsmachine�	multiarch�debinfos    r�
dpkg_infofuncr&�s����n���G�����A��J��#�%�%�I��8��� � �*�W�4�G�G�!�4;�7�7�J�J�J�G�G�G�*�Z�7���=��0�9�<�<���t�O�G��Nrc�n�tj��tj��zt��zS)z�
    Get Debian release and Architecture information

    This function is available under:
    SYSTEMS['debian']['infofunc']

    Returns
    -------
    str
        Information line(s) about debian/machine architecture(s)
    )r�get_debian_release_info�get_merged_usrr&r
rr�debian_infofuncr*�s*���(�*�*�U�-A�-C�-C�C�m�o�o�U�Urc�F�tj��t��zS)z�
    For Ubuntu get LSB release and Architecture information

    This function is available under:
    SYSTEMS['ubuntu']['infofunc']

    Returns
    -------
    str
        Information line(s) about LSB/machine architecture(s)
    )r�lsb_release_infor&r
rr�ubuntu_infofuncr-�s���!�#�#�m�o�o�5�5rc�f�tj��d}tj��d|zzS)z�
    Get LSB release and Architecture information

    Returns
    -------
    str
        information about OS release and architecture
    rzArchitecture: %s

)rr rr,)r#s r�generic_infofuncr/�s-������A��J��!�#�#�&<�z�&I�I�Ir�Debianz%s@bugs.debian.orgzhttp://www.debian.org/Bugs/zlinux-imagezkernel-image)r4r+r1r-r3)
�gcczg++�cpp�gcj�gpc�gobjc�chill�gij�g77r�zpython-basezx-window-system-corezx-window-systemz https://bugs.debian.org/cgi-bin/)	�namer
�btsroot�	otherpkgs�
nonvirtual�specials�deppkgs�cgiroot�infofunc�Ubuntuzubuntu-users@lists.ubuntu.com�mailto)r9r
r(r@zGUUG (German Unix User Group)z%s@bugs.guug.deF)r9r
�
query-dpkg)�debian�ubuntu�guugzUThe problem is a bug in the software or code.  Forexample, a crash would be a sw-bug.z\The problem is in the documentation.  For example,an error in a man page would be a doc-bug.z�You are requesting a new feature or a changein the behavior of software, or are making a suggestion.  Forexample, if you wanted reportbug to be able to get your localweather forecast, as well as report bugs, that would be achange-request.)zsw-bugzdoc-bugzchange-request�securityz3This problem is a security vulnerability in Debian.z.You are including a patch to fix this problem.z5This bug applies to the upstream part of the package.z<This bug is relevant to the development of debian-installer.z9This bug affects support for Internet Protocol version 6.z<This bug affects support for large files (over 2 gigabytes).z;This bug reports a localization/internationalization issue.z;This bug affects accessibility for users with disabilities.zTThis bug has a known solution but the maintainer requests someone else implement it.z'The package fails to build from source.)	�patch�upstreamzd-i�ipv6�lfs�l10n�a11y�newcomer�ftbfsrGc��t���}|dvr|�t��|tjkr|�t��n|tjkrd|vr|d=|S)a�
    Return list of tags supported by the bug tracking system

    If severity is release critical or reportbug's user mode is higher
    than STANDARD, then include the 'security' tag in the list of
    available tags.

    Parameters
    ----------
    severity : str
        bug severity level name
    mode : int
        reportbug user mode level

    Returns
    -------
    {str : str, ...}
        dictionary of tag names and tag descriptions
    )rrrrN)�TAGS�copy�update�
CRITICAL_TAGSr�
MODE_STANDARD�EXPERT_TAGS)r'�mode�tagss   r�get_tagsrY7sw��(�9�9�;�;�D��3�3�3����M�"�"�"��e�!�!�!����K� � � � �	
��#�	#�	#�
�d�(:�(:�����Krc�8�|rt|��dkrdSdSdS)az
    Turn `setting` into equivalent string

    If a yes/no setting comes as bool, convert it to a string.

    This is a helper function for :func:`cgi_report_url()` and
    :func:`cgi_package_url()`.

    Parameters
    ----------
    setting : bool or str
        indication whether the setting should be set or not

    Returns
    -------
    str
        'yes' or 'no'
    �no�yes)�str)�settings r�yn_boolr_Ys,��&���w�<�<�4����4��u��trc�x�t|�d��}|sdS|�d|�dt|����S)a
    Construct bugreport URL string

    Determine the URL of a bug report in the bug tracking system.

    This function does the work for :func:`get_report_url()`.

    Parameters
    ----------
    system : str
        should be 'debian', 'ubuntu', or 'guug'
    number : int
        bug number
    archived : bool, optional
        consider archived bugs?
    mbox : bool or str, optional
        URL for bugreport website or mailbox?

    Returns
    -------
    str or None
        URL for the given bugreport
    r?Nzbugreport.cgi?bug=z&mboxmaint=)�SYSTEMSr&r_)�system�number�archived�mbox�roots     r�cgi_report_urlrgtsJ��0�6�?���y�)�)�D����t��H�H�f�H�H�����H�H�Hrc�R�t|�d��}|sdS|rd|���i}nd|���i}t|��|d<|rdnd|d<|rt	|��|d	<t
j�|��}|�d
|��S)a�
    Get the URL listing the bugs for a given package

    This function does the work for :func:`get_package_url()`.

    Parameters
    ----------
    system : str
        should be 'debian', 'ubuntu', or 'guug'
    package : str
        package name
    archived : bool, optional
        specifies whether archived bugs should in included/listed
    source : bool, optional
        specifies whether archived bugs should in included/listed
    repeatmerged : bool, optional
        specifies whether merged bugs should be listed separately or not
    version : str, optional
        specifies a specific package version

    Returns
    -------
    str
        The URL of the package's bug page
    r?N�src�pkg�repeatmerged�bothr[rdr�zpkgreport.cgi?)rar&�lowerr_r]�urllib�parse�	urlencode)	rbr;rd�sourcerkr�rfr��qstrs	         r�cgi_package_urlrs�s���6�6�?���y�)�)�D����t��)���
�
���(�����
�
���(��#�L�1�1�E�.��"*�4����E�*���(��w�<�<��i���<�!�!�%�(�(�D�#'�4�4���.�.rc�(�t|||||��S)at
    Get the URL listing the bugs for a given package

    Parameters
    ----------
    system : str
        should be 'debian', 'ubuntu', or 'guug'
    package : str
        package name
    mirrors : [str, ...], optional
        list of mirror URLs
    source : bool, optional
        specifies whether archived bugs should in included/listed
    archived : bool, optional
        specifies whether archived bugs should in included/listed
    repeatmerged : bool, optional
        specifies whether merged bugs should be listed separately or not

    Returns
    -------
    str
        The URL of the package's bug page
    )rs)rbr;r.rqrdrks      r�get_package_urlru�s��2�6�7�H�f�l�K�K�Krc�&�t||||��S)a�
    Construct bugreport URL string

    Determine the URL of a bug report in the bug tracking system.

    Parameters
    ----------
    system : str
        should be 'debian', 'ubuntu', or 'guug'
    number : int
        bug number
    mirrors : [str, ...]
        list of mirror URLs
    archived : bool, optional
        consider archived bugs?
    mbox : bool or str, optional
        URL for bugreport website or mailbox?

    Returns
    -------
    str or None
        URL for the given bugreport
    )rg)rbrcr.rdres     r�get_report_urlrw�s��0�&�&�(�D�9�9�9rc��|�dd��}t|��dkrdS|\}}|�d��r
|dd�}|�d��r|dd�}|�d���||fS)z�
    Parse bug tracking system URL

    Parameters
    ----------
    url : str
        the URL to parse

    Returns
    -------
    (str, str)
        A tuple with URL type (http, https, ...) and address
    r�r�Nz//r����)r��len�
startswithr�)�url�bitsr(�locs    r�
parse_bts_urlr��s����9�9�S�!���D�
�4�y�y�A�~�~��t��I�D�#�
�~�~�d�����!�"�"�g��

�,�,�s�
�
���#�2�#�h���,�,�s�
�
����9�rz/etc/dpkg/origins/*�backslashreplace)�errors)r;rCr.r?r�vendorr9�bugsr(zhttp://r�r:z%s@r
rDc�:�|dk�r�|rdnd}t|t��rf|r4tj||���}|tjd|z|���z
}�ntj||���}|tj||���z
}n�g}|D]�}		|t	|	��gz
}�#t
$r�|	�d��r;|tj|	dd	�|���z
}|tj|	|���z
}nj|r6|tj|	|���z
}|tjd|	z|���z
}n2|tj|	|���z
}|tj|	|���z
}Y��wxYwtt|����}tj	|��}
tt��}tt��}|
D]N}
|
jd
kr!||
j�
|
���.||
j�
|
���Og}tD]&}||vr |�
d|z||f���'tD]&}||vr |�
d|z||f���'t|
��d
|z|fSt!d|�d����)a[
    Collect bug reports for a given package

    The purpose of collecting a list of reports is to allow the user to
    check if the problem they are experiencing has already been
    reported. However, there are often different (binary) packages to
    which the same bug could be reported, and in many cases bugs are
    also reported against source packages. It therefore makes sense to
    return a relatively extensive list by default.

    Reportbug's way of obtaining such an extensive list consists of (i)
    collecting not only bugs reported against the package directly, but
    also collecting bugs marked as affecting the package, and (ii) not
    only returning bugs for a specified binary package, but also those
    belonging to the corresponding source package. (The latter is done
    in reportbug by calling this function with a list of packages
    including the binary and its source.)

    Parameters
    ----------
    package : str or list
        name of affected package, or list of package names, or list of
        bugs
    timeout : int
        connection timeout in seconds
    system : str
        should be either 'debian', 'ubuntu', or 'guug'. Only 'debian' is
        currently supported.
    mirrors
        list of mirrors
    version
        package version
    http_proxy : str
        Proxy URL to use for HTTP connection
    archived : bool
        Also look up archived reports?
    source : bool
        Also look up source packages?

    Returns
    -------
    (int, str, [(str, [debianbts.Bugreport, ...]), ...])
        A tuple with three components:

        0. the number of bugs,
        1. title of this collection ("Bugs reports for XY"), and
        2. hierarchy: list of two-tuples. Each tuple consists of a
           string indicating the severity, and the list of
           debianbts.Bugreport objects for that severity
    rDrlr)ri�archivezsrc:)�affectsr�)r;r�rN�donezBugs with severity %szResolved bugs with severity %szBug reports for %szGetting bugs from z is not supported)�
isinstancer]�	debianbts�get_bugs�int�
ValueErrorr|r��set�
get_statusr�pendingr'r@�SEVLISTr{r	)r;r�rbr.r�r�rdrqr�rj�stats�d�r�s�hier�sevs                r�get_reportsr�4s��h����%�.�6�6�3���g�s�#�#�	R��
N� �)�g�x�H�H�H���	�*�6�G�3C�X�V�V�V�V��� �)�'�8�L�L�L���	�*�7�H�M�M�M�M����D��
R�
R��R��S��X�X�J�&�D�D��!�	R�	R�	R��~�~�f�-�-�R��	� 2�s�1�2�2�w�� Q� Q� Q�Q���	� 2�3�� Q� Q� Q�Q����R��	� 2�s�H� M� M� M�M���	� 2�6�C�<�QY� Z� Z� Z�Z����	� 2�3�� Q� Q� Q�Q���	� 2�3�� Q� Q� Q�Q����	R�����C��I�I�����$�T�*�*�������������	$�	$�A��y�F�"�"��!�*�
�$�$�Q�'�'�'��
�a�j�M� � ��#�#�#�#����	E�	E�C��a�x�x����4�s�:�A�c�F�C�D�D�D���	N�	N�C��a�x�x����=��C�Q�s�V�L�M�M�M���E�
�
�0�7�:�D�A�A�
�>�V�>�>�>�
?�
?�?s�B$�$CE+�*E+c��t|��}|dkr�tj|g��d}tj|��}g}	|D]�}
|
d}g}dD]4}
|
|vr.|�|
dz|�|
��z���5|	�d�t|����dz|
dz����||	fSd	S)
a\
    Look up a bug report in the bug tracking system

    Parameters
    ----------
    number : int
        bug number
    timeout : int
        connection timeout in seconds
    system : str
        should be either 'debian', 'ubuntu', or 'guug'
    mirrors
        list (or dictionary?) of mirrors
    http_proxy : str
        Proxy URL to use for HTTP connection
    archived : bool
        look for archived bugs, too?
    followups : bool
        passed on to called functions

    Returns
    -------
    (debianbts.Bugreport, [str, ...])
        Tuple with bugreport and its list of messages
    rDr�message)�Date�Subject�Fromrrz

r�N)r�r�r��get_bug_logr@r&r��sorted)rcr�rbr.r�rd�	followups�status�log�bodies�lm�h�hdrs�is              r�
get_reportr��s���6��[�[�F�
�����%�v�h�/�/��2���#�F�+�+�����	I�	I�B��9�
�A��D�0�
5�
5����6�6��K�K��D��1�5�5��8�8� 3�4�4�4���M�M�$�)�)�F�4�L�L�1�1�F�:�R��Z�G�H�H�H�H������4r)r#)TN)FF)FFTN)NFFT)NFF)rDNNrGFF)rDNrGFF)JrGrr�r
�email.errors�globr�urllib.parsernr�r��collectionsr�
contextlibrr�	Exceptionr	�
SEVERITIES�JUSTIFICATIONS�	JUSTORDER�SEVERITIES_gnatsr�r)�debother�progenyotherr:rEr�r�r�rrrrr&r*r-r/ra�CLASSES�	CLASSLISTrTrVrQ�MODE_NOVICErYr_rgrsrurwr��origin�OSError�open�fp�	readlines�lines�path�basenamerbr&�liner�r�contentrmr�r(rfr�r�r�r
rr�<module>r�s���0������
�
�
�
�������������	�	�	�	�������������#�#�#�#�#�#�������������	�	�	�	�	�I�	�	�	�C�9�>��9���=�5��
�>�
����:���
���

�

�	�'�(�L����C�C�C������B(��B�(��N�(��O�(��+�	(�
�
"�(��R�
(��l�(��f�(��W�(��>�(��O�(��E�(��T�(��F�(��F�(� �d�!(�"�3�#(�(�$�D�%(�&�:�'(�(�H�)(�*�
#�+(�,�;�-(�.�2�/(�0�U�1(�2�6�3(�4�n�5(�6�9�7(�8�5�9(�:�I�;(�<�F�=(�>�I�?(�@�Y�A(�B�X�C(�D�H�E(�(�Fg�I�6�8�2�O(�(�(��V�4���
*�*�*�Z���b>�b>�b>�b>�Jx>�x>�x>�x>�v	�x�� ����,e>�e>�e>�e>�Pd>�d>�d>�d>�NV>�V>�V>�V>�r���8V�V�V�6�6�6�
J�
J�
J�"�%�0��$�n�5��/�"7�$>�4�
�
�
�
6�#�)��.�0��#�	��0�"��
�
�;!�!��H4�<�(�
�
��
4�3�3�	��E��
�
�E���
>�G�I�G�I�I�I�f�
6�
�
���u�0�����D���6I�I�I�I�<=B�/3�-/�-/�-/�-/�`;@�15�L�L�L�L�8:�:�:�:�6���6�d�i�-�.�.���F�	��'�	�	���
�T�&�!3�
4�
4�
4�	#���L�L�N�N�E�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#�	#����	#�	#�	#�	#���!�!�&�)�)��!�+�+�f�B�=A�:<�:>�/@�/@�A�A�����	�	�D�
�$(�J�J�t�Q�$7�$7�!���������!�-�-�/�/���X�%�%�.5�G�F�O�F�+�+��v�%�%�#0�=��#9�#9�L�T�4�.2�G�F�O�F�+��y�(�(�5>��5E��5K����	�2�38�4�<�����0�0���)�)�59����	�2�37�����0�0�����
�
�
���
����'	��������������������>JN�6;�j@�j@�j@�j@�Z:>�8=�.�.�.�.�.�.s[�K"�*G�?K"�G�K"�G�?K"�B6K
�	K"�
K	�K"�K	�K"�"K&	�)K&