403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.12/site-packages/dnf-plugins/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.12/site-packages/dnf-plugins/__pycache__/copr.cpython-312.pyc
�

?�(fy��l�ddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlmZm
Z
ddlZddlmZddlmZddlZ	ddlmZmZmZmZd�ZdZeed�ed
�g�Zeed�ed�dg�Zerddl m!Z!m"Z"m#Z#ddl$m%Z%m&Z&m'Z'nddl!m!Z!m"Z"m#Z#ddl(m%Z%m&Z&m'Z'ejRjTGd�dejVjX��Z-ejRjTGd�de-��Z.y#e$rd�Z	dd	lmZn#e$rd
�ZYnwxYwY��wxYw)�)�print_functionN)�_�logger)�PY3)�ucd)�name�version�codename�os_release_attrc�<�t�t�t�fS�N)rr	r
���5/usr/lib/python3.12/site-packages/dnf-plugins/copr.py�linux_distributionr.s�����	�8�:�.�.rc��y)N�r)rs rrr1s��r)rc��td�5}i}|D]9}	|j�jd�\}}|jd�||<�;|d|ddfcddd�S#t$rY�[wxYw#1swYyxYw)Nz/etc/os-release�=�"�NAME�
VERSION_ID)�open�rstrip�split�strip�
ValueError)�os_release_file�os_release_data�line�os_release_key�os_release_values     rrr7s����'�(�O�"$��+�D��;?�;�;�=�;N�;N�s�;S�8��(8�:J�:P�:P�QT�:U���7�,�(��/���1N�PT�U�)�(��&�����
)�(�s.�A0�6A!�A0�!	A-�*A0�,A-�-A0�0A9�copr�yes�y�no�nr)�ConfigParser�
NoOptionError�NoSectionError)�urlopen�	HTTPError�URLErrorc��eZdZdZdZdZdZdZdZedzezZ	dZ
ed	�Zd
Z
ed�Zed��Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zed��Zd�Zd�Z d�Z!d�Z"d�Z#d�Z$ed ��Z%ed!��Z&ed"��Z'y)#�CoprCommandz Copr plugin for DNF Nzcopr.fedorainfracloud.org�fedora�httpsi��://)r#z Interact with Copr repositories.Ta�
  enable name/project [chroot]
  disable name/project
  remove name/project
  list --installed/enabled/disabled
  list --available-by-user=NAME
  search project

  Examples:
  copr enable rhscl/perl516 epel-6-x86_64
  copr enable ignatenkobrain/ocltoys
  copr disable rhscl/perl516
  copr remove rhscl/perl516
  copr list --enabled
  copr list --available-by-user=ignatenkobrain
  copr search tests
    c��|jddgd���|j�}|jddtd���|jd	dtd
���|jddtd���|jd
dtd���|jdtd���|jdd��y)N�
subcommand�)�help�enable�disable�remove�list�search��nargs�choicesz--installed�
store_truez.List all installed Copr repositories (default))�actionr6z	--enabledzList enabled Copr repositoriesz
--disabledzList disabled Copr repositoriesz--available-by-userrz-List available Copr repositories by user NAME)�metavarr6z--hubz(Specify an instance of Copr to work with)r6�arg�*)r=)�add_argument�add_mutually_exclusive_groupr)�parser�list_options  r�
set_argparserzCoprCommand.set_argparserps������L��%A�	�	B��9�9�;��� � ��|�&'�(X�&Y�	!�	[�� � ��\�&'�(H�&I�	!�	K�� � ��l�&'�(I�&J�	!�	L�� � �!6��&'�(W�&X�	!�	Z�	���G�!�,V�*W��X����E���-rc��|jjjjdk7ryd}t�}g}|jj
jd}tjj|tdz�}tjjdtdz�}tjj|�r|j|�tjj|�r|j|�n|j|�tjtjj|tdz��D]M}|jd�s�tjj|tdz|�}|j|��Og}	t!|jj"�r(|jj"dj%d�}	t!|	�dk(rh|jj&rRt)j*t-d	�t-d
�z�t.jj1t-d���|jj&s1t!|	�dk7r#|j2|_|j6|_n*t!|	�dk(r|	d}n|jj&}|r�|r�d|_|j;t=|d�
��|j?||dd�}
|
r�|j?||d|j@�}|j?||d|jB�}|
|_|dz|
z|_tE|�|jBk7r0|xj8d|zz
c_|xj4d|zz
c_|j8sEd|vr||_|j@dz|z|_y|j%dd�d|_||_yy)Nr#rz.confz/usr/share/dnf/plugins/z.vendor.confz.d�/��Error: z^specify Copr hub either with `--hub` or using `copr_hub/copr_username/copr_projectname` formatzmultiple hubs specifiedT)�reverse�hostname�protocol�portr2�:r5)#�cli�command�optsr(�base�conf�pluginconfpath�os�path�join�PLUGIN_CONF�isfile�append�_get_copr_chroot�listdir�endswith�lenrBr�hubr�criticalr�dnf�CliError�default_hostname�
copr_hostname�default_url�copr_url�read�sorted�_read_config_item�default_protocol�default_port�int)
�self�copr_hub�copr_plugin_config�config_files�config_path�default_config_file�vendor_config_file�filename�config_file�projectrNrOrPs
             r�	configurezCoprCommand.configure�s@���8�8��� � �(�(�F�2����)�^�����i�i�n�n�3�3�A�6�� �g�g�l�l�;��g�8M�N���W�W�\�\�*C�[�Sa�Ea�b��
�7�7�>�>�-�.���� 3�4�
�7�7�>�>�,�-��!�!�"4�5��!�!�"5�6��
�
�2�7�7�<�<��[�4�=O�#P�Q�H�� � ��)� �g�g�l�l�;��d�8J�H�U���#�#�K�0�R�
���t�y�y�}�}���i�i�m�m�A�&�,�,�S�1�G��w�<�1��������O�O��)���E�F�F�
�
�'�'�"�"�1�%>�#?�@�@������3�w�<�1�#4�!%�!6�!6�D�� �,�,�D�M���\�Q�
��q�z�H��y�y�}�}�H��H� �D�M��#�#�F�<��$F�G��-�-�.@�(�J�X\�]�H���1�1�2D�h�PZ�26�2G�2G�I���-�-�.@�(�F�.2�.?�.?�A��&.��"� (�5� 0�8� ;��
��t�9�� 1� 1�1��M�M�S�4�Z�/�M��&�&�#��*�4�&��}�}��H�$�%-��"� $� 5� 5�� =�� H��
�%-�^�^�E�1�%=�a�%@��"� (��
�
rc�V�	|j||�S#ttf$r|cYSwxYwr
)�getr)r*)rp�configrb�section�defaults     rrlzCoprCommand._read_config_item�s1��	��:�:�c�7�+�+���~�.�	��N�	�s��(�(c�J�tjj|�syt�}|j	|�|jdd�r@|jdd�r.|j
dd�}|j
dd�}||g|_y|js
ddg|_yy)z}
        Sets the Copr root from a config file
        This is refactored from configure() to avoid code duplication
        N�main�distribution�
releaseverF)rXrYr\r(rj�
has_optionr|�
chroot_config)rpr}rrr�r�s     rr^zCoprCommand._get_copr_chroot�s���
�w�w�~�~�f�%��)�^������'��(�(���@�"�-�-�f�l�C�-�1�1�&�.�I�L�+�/�/���E�J�".�
�!;�D���%�%�&+�U�^��"�&rc�|�tjjdj|j	���y)N�{0}
)�sys�stderr�write�formatr)rp�texts  r�_user_warning_before_promptz'CoprCommand._user_warning_before_prompt�s#���
�
�������
�
��5�6rc�	�|jjd}|dk(r&|jjj	|�y|dk(r�|jj
r&|j
|jj
�y|j|jjjd|jj|jj�y	|jjd}	|jjd}t+|jj�dkDr(t&j,j/t%d���|j1d	�|_t+|j2�d
kr(t&j,j/t%d���	|dk(r|j7|�y|j1d
�}t+|�dvrRt!j"t%d�t%d�z�t&jj)t%d���t+|�dk(r|d}|d}n|d}|d}|d
z|z}dj9|jjj:|j<|j?|�|�}|dk(r�|jA�t%d�}d
jC|j<||g�}dj9|�}	|jE||	�|jG||�t!jHt%d��|jK||�y|dk(rA|jA�|jM||�t!jHt%d��y|dk(rA|jA�|jO||�t!jHt%d��yt&j,j/t%d�j9|���#ttf$rxt!j"t%d�t%d�z�|jjj	|�t&jj)t%d���wxYw#t$r*|j5�}|j1d	�|_Y�� wxYw)Nrr6r:rLz>exactly two additional parameters to copr command are requiredr5�zToo many arguments.�-rKzOBad format of optional chroot. The format is distribution-version-architecture.r;rJ)r�rKzEuse format `copr_username/copr_projectname` to reference copr projectzbad copr project formatz{0}/_copr:{1}:{2}:{3}.repor7a
Enabling a Copr repository. Please note that this repository is not part
of the main distribution, and quality may vary.

The Fedora Project does not exercise any power over the contents of
this repository beyond the rules outlined in the Copr FAQ at
<https://docs.pagure.org/copr.copr/user_documentation.html#what-i-can-build-in-copr>,
and packages are not held to any quality or security level.

Please do not file bug reports about these packages in Fedora
Bugzilla. In case of problems, contact the owner of this repository.
z!Do you really want to enable {0}?z Repository successfully enabled.r8z!Repository successfully disabled.r9z Repository successfully removed.zUnknown subcommand {}.)(rTr4rR�	optparser�
print_help�available_by_user�_list_user_projects�_list_installed_repositoriesrUrV�reposdir�enabled�disabledrBr�
IndexErrorrrcrrdrera�
exceptions�Errorr�chroot_parts�
_guess_chroot�_searchr��get_reposdirrg�_sanitize_username�
_need_rootrZ�	_ask_user�_download_repo�info�_runtime_deps_warning�
_disable_repo�_remove_repo)
rpr4�project_name�chrootry�
copr_username�copr_projectname�
repo_filenamer��msgs
          r�runzCoprCommand.run�s#���Y�Y�)�)�!�,�
�����H�H���)�)�$�/������y�y�*�*��(�(����)D�)D�E���1�1�$�)�)�.�.�2I�2I�!�2L�26�)�)�2C�2C�T�Y�Y�EW�EW�Y��
	0��9�9�=�=��+�L�
	2��Y�Y�]�]�1�%�F��4�9�9�=�=�!�A�%��n�n�*�*�1�-B�+C�D�D� &���S� 1�D���4�$�$�%��)��n�n�*�*�1�.R�,S�T�T�*���!��L�L��&���$�$�S�)���w�<�v�%��O�O��)���.�/�/�
0��'�'�"�"�1�%>�#?�@�@�
��\�Q�
�#�A�J�M�&�q�z��#�A�J�M�&�q�z��(�3�.�1A�A�L�4�;�;��I�I�N�N�'�'��);�);��#�#�M�2�4D�F�
���!��O�O�����D��h�h�� 2� 2�M� 0� 2�3�G�5�<�<�W�E�C��N�N�4��%�����m�<��K�K��<�=�>��&�&�}�6F�G�
�9�
$��O�O�����}�.>�?��K�K��=�>�?�
�8�
#��O�O�����m�-=�>��K�K��<�=�>��.�.�&�&��*�+�2�2�:�>�@�
@��W�J�'�	0��O�O��)���.�/�/�
0�
�H�H���)�)�$�/��'�'�"�"��.�/�0�
0�
	0��"�	2��'�'�)�F� &���S� 1�D��	2�s �$P�>B9R&�BR#�&/S�Sc��|jjd�d}tjd|jz|�}|j
|jk(xrtjd|�}tjd|�}|jjr|s|sy|sytjd|�rytjd|�ry|j}	|	r|s|	s|ryd}
tjd	|�r&|jd
d�\}}}
}|dz|
zdz|z}n�tjd|�rO|jdd
�}|jd
d�djd
d
�d
}|dz|dzdz|d
z}n2|jdd
�}|jdz|dzdz|d
z}d}
|	s|dz
}|
r|dz
}t|�|
S)NrJ����_copr:�_copr_z_copr:|^_copr_zcopr:.*:.*:.*:mlz
coprdep:.*F�copr:rQrKr�r5r�rTz (disabled)z *)
�repofiler�re�matchrgrirhrTrbr��rsplitrf�print)rp�repo_id�repo�enabled_only�
disabled_only�	file_name�	match_new�	match_old�	match_anyr��old_reporrg�
copr_owner�copr_dirr��	copr_names                 r�_list_repo_filezCoprCommand._list_repo_fileJs����M�M�'�'��,�R�0�	��H�H�X��(:�(:�:�I�F�	��M�M�T�%5�%5�5�W�"�(�(�8�Y�:W�	��H�H�-�y�9�	��9�9�=�=��Y����
�8�8�&��0��
�8�8�L�'�*���,�,���
�w�<�����8�8�G�W�%�5<�]�]�3��5J�2�A�}�j�(��#�%�
�2�S�8�8�C�C�
�X�X�h�	�
*��
�
�c�1�-�I�%�,�,�S�!�4�Q�7�=�=�c�1�E�a�H�M��#�%�	�!��4�s�:�Y�q�\�I�C� �
�
�c�1�-�I��'�'�#�-�	�!��<�s�B�Y�q�\�Q�C��H���=� �C���4�K�C�
�c�
��rc��d}|jjj�D]\}}|j||||�s�d}�|rt	td��yy)NFTz�* These coprs have repo file with an old format that contains no information about Copr hub - the default one was assumed. Re-enable the project to fix this.)rU�repos�itemsr�r�r)rp�	directoryr�r�r�r�r�s       rr�z(CoprCommand._list_installed_repositories{s]����!�Y�Y�_�_�2�2�4�M�G�T��#�#�G�T�<��O���5���!�9�:�
;�rc��dj|�}|j|z}|jj|d��}	t	j
|j
��}|j|�td�j|�}|j|�|dD]c}dj||d�}|d	xstd
�}	|jjjt!|�|	�}t#|��ey#t$r8tjjtd�j|���wxYw)Nz!/api_3/project/list?ownername={0}�w+��modez+Can't parse repositories for username '{}'.zList of {} coprsr�z
{0}/{1} : r�descriptionzNo description given�r�rirUr+�json�loadsrjrrdr�r�r�_check_json_output�_print_match_section�output�
fmtKeyValFillrr�)
rp�	user_name�api_path�url�res�
json_parse�section_text�itemr��descs
          rr�zCoprCommand._list_user_projects�s"��6�=�=�i�H���m�m�h�&���i�i����$��/��	$����C�H�H�J�/�J�
	
���
�+��+�,�3�3�I�>���!�!�,�/��w�'�D��%�%�i��f��>�C��
�&�C�!�,B�*C�D��)�)�"�"�0�0��S��4�@�C��#�J�	(���	$��.�.�&�&��?�@���	�"�$�
$�	$�s�#D
�
AEc��dj|�}|j|z}|jj|d��}	t	j
|j
��}|j|�td�j|�}|j|�|dD]b}dj|d�}|d	xstd
�}	|jjjt!|�|	�}t#|��dy#t$r8tjjtd�j|���wxYw)Nz/api_3/project/search?query={}r�r�zCan't parse search for '{}'.zMatched: {}r�z{0} : �	full_namer�zNo description given.r�)
rp�queryr�r�r�r�r�r�r�r�s
          rr�zCoprCommand._search�s��3�:�:�5�A���m�m�h�&���i�i����$��/��	:����C�H�H�J�/�J�	
���
�+���'�.�.�u�5���!�!�,�/��w�'�D��/�/�$�{�"3�4�C��
�&�D�!�,C�*D�D��)�)�"�"�0�0��S��4�@�C��#�J�	(���	:��.�.�&�&�q�)G�(+�+1�6�%�=�:�
:�	:�s�#D	�	AE
c�d�|jjj|�}t|�yr
)rUr��
fmtSectionr�)rpr��	formatteds   rr�z CoprCommand._print_match_section�s$���I�I�$�$�/�/��5�	�
�i�rc���|jstjjd�d|_tjjdj	|j���|jj�rf|jjjsE|jjjdj	|�dj	|���syy)N�
Fr�z
{} [y/N]: z
{} [Y/n]: )r��defaultyes_msgT)�
first_warningr�r�r�r�rrU�
_promptWantedrV�assumenor��userconfirm�rpr�r�s   r�_ask_user_no_raisezCoprCommand._ask_user_no_raise�s����!�!��J�J���T�"�"����
�
�������
�
��5�6��9�9�"�"�$��y�y�~�~�&�&�d�i�i�.>�.>�.J�.J�&�-�-�c�2�>�CX�CX�Y\�C]�/K�/_��rc�x�|j||�s(tjjt	d���y)NzSafe and good answer. Exiting.)r�rdr�r�rr�s   rr�zCoprCommand._ask_user�s2���&�&�t�S�1��.�.�&�&�q�)I�'J�K�K�2rc��tj�dk7r(tjj	td���y)Nrz/This command has to be run under the root user.)rX�geteuidrdr�r�r)�clss rr�zCoprCommand._need_root�s9���:�:�<�1���.�.�&�&��C�D�F�
F�rc��|j}|�|ddus|ddur
t�}|jjjd}d|dvr6d|vrd|z}|Sdtd	�vrd|z}|Sd
j
|d|�}|Sd|vrCtjd�}d
|vrdj
|�}|Sdj
|d|�}|Sd|vrCtjd�}d|vrdj
|�}|Sdj
|d|�}|Sdj
|djdd�d|r|nd�}|S)z2 Guess which chroot is equivalent to this machine rFr5�basearch�Fedora�Rawhidezfedora-rawhide-�rawhide�redhat_support_product_versionzfedora-{0}-{1}�Mageiaz%{distro_arch}�Cauldronzmageia-cauldron-{}zmageia-{0}-{1}�openSUSEz%{_target_cpu}�
Tumbleweedzopensuse-tumbleweed-{}zopensuse-leap-{0}-{1}z
epel-{}-{}�.�x86_64)
r�rrUrV�
substitutionsrr��rpm�expandMacror)rp�dist�distarchr�s    rr�zCoprCommand._guess_chroot�s����!�!���<�D��G�u�,�$�q�'�U�2B�%�'�D��9�9�>�>�/�/�
�;���t�A�w���D� �+�h�6��2�
�-�o�.N�O�O�+�h�6��*�
�'+�1�1�$�q�'�8�D��&�
�%��
����'7�8�H��T�!�.�5�5�h�?���
�+�1�1�$�q�'�8�D���
��4�
����'7�8�H��t�#�2�9�9�(�C��
�
�2�8�8��a��(�K���
�#�)�)�$�q�'�-�-��Q�*?��*B�PX�H�^f�g�F��
rc�.	�dj|jdd�}|jd}dj|||�}	t|j|z�}t
jj|�rtj|�|j5�}|j)d�}t7j8d|�rGt
jj|j:j<j>d|ddzdz�}|j|j@k(r�|jCddd�jC|jDd�jCddd�jCdd�jCdd�}
t
jj|
�rtj|
�tG|d�5}|jI|�|jK�D]}|jI|��	ddd�tjL|tNjPtNjRztNjTztNjVz�y#t$�r�}|jdk7r[td�j|j|z|jt|��}tjj|��td�}|j j#d�}	|	r�t%j&|	�j)d�}
t+j,|
�}
|td	�jdj|j�|�z
}|
j#d
�rG|td�djd
�|
d
D��zz
}|td�j|�z
}tjj|��|td�j|�z
}tjj|��d}~wt.$r`}td�j|j|z|j0j2�}tjj|��d}~wwxYw#1swY���xYw)Nr�r�z%/coprs/{0}/repo/{1}/dnf.repo?arch={2}i�z Request to {0} failed: {1} - {2}z+It wasn't possible to enable this project.
zCopr-Error-Datazutf-8z1Repository '{0}' does not exist in project '{1}'.zavailable chrootsz
Available repositories: z, c3�>K�|]}dj|����y�w)z'{}'N�r�)�.0�xs  r�	<genexpr>z-CoprCommand._download_repo.<locals>.<genexpr>s ����M[�2Y�Q��
�
�a�(�2Y�s�z�

If you want to enable a non-default repository, use the following command:
  'dnf copr enable {0} <repository>'
But note that the installed repo file will likely need a manual modification.zProject {0} does not exist.zFailed to connect to {0}: {1}z\[copr:rr5���z.repor��_coprrrQ�group_�@�wb),rZr�r�r+rirXrY�existsr9r,�coder�strrdr�r��headersr|�base64�	b64decode�decoder�r�r-�reason�strerror�readliner�r�rUrVr�rh�replacergrr��	readlines�chmod�stat�S_IRUSR�S_IWUSR�S_IRGRP�S_IROTH)rpr�r��short_chroot�archr��response�e�	error_msg�
error_data�error_data_decoded�
first_liner �old_repo_filename�fs               rr�zCoprCommand._download_repo�s����x�x�� 1� 1�#�2� 6�7��� � ��$��:�A�A�,�P\�^b�c��	2��t�}�}�x�7�8�H��w�w�~�~�m�,��	�	�-�(�8�&�&�(�
�� � ��)��
�8�8�J��%��G�G�L�L������)D�)D�c�D�QR�SU�J�FV�Y`�F`�a�M��=�=�D�,�,�,� -� 5� 5�h��� K����+�+�R�0����c�1�1E�g�g�c�SV�FW����3�'�
��w�w�~�~�/�0��	�	�+�,�
�-��
&�!�
�G�G�J�� �*�*�,������
�-�'�	�������t�|�|� ;�d�l�l� J�T�\�\� Y�Z��[�	6��v�v��}��@�A�H�H����Ya�Ia�cd�ci�ci�kn�op�kq�r�	��n�n�*�*�9�5�5��H�I�I������'8�9�J��%+�%5�%5�j�%A�%H�%H��%Q�"�%)�Z�Z�0B�%C�"��Q�R�S�Z�Z��H�H�T�.�.�/��?�?�	�%�)�)�*=�>���#?�!@�4�9�9�M[�2D�EX�2Y�M[�D[�"[�[�I���$3�"4�5;�F�<�4H�I�I��n�n�*�*�9�5�5��Q�<�=�D�D�\�R�R�	��n�n�*�*�9�5�5���	2��9�:�A�A�$�-�-�RZ�BZ�\]�\d�\d�\m�\m�n�I��.�.�&�&�y�1�1��	2��&'�
&�s3�AI�8R
�
R�&F5P�R�'AR�R�
Rc�:�|jjd��|jj�|j|j	|�|�}g}|j
j
�D]%}|jd�r�|j|��'|sytd�}tjd�}|jdj|D�cgc]9}djt|�||j
j|d	��
���;c}��}|j!|td��sZ|D]T}	|jj"j%|j&|	|jj"j(dd
i��Vyycc}w)a,
        In addition to the main copr repo (that has repo ID prefixed with
        `copr:`), the repofile might contain additional repositories that
        serve as runtime dependencies. This method informs the user about
        the additional repos and provides an option to disable them.
        T)r�r�Na�Maintainer of the enabled Copr repository decided to make
it dependent on other repositories. Such repositories are
usually necessary for successful installation of RPMs from
the main Copr repository (they provide runtime dependencies).

Be aware that the note about quality and bug-reporting
above applies here too, Fedora Project doesn't control the
content. Please review the list:

{0}

These repositories have been enabled automatically.r5z

z){num:2}. [{repoid}]
    baseurl={baseurl}�baseurl)�num�repoidr*z!Do you want to keep them enabled?r��0)rU�reset�read_all_repos�_get_copr_repor��cfg�sections�
startswithr]r�	itertools�countr�rZ�next�getValuer�rV�write_raw_configfiler�r�)
rpr�r�r��runtime_depsr�r��counterr,�deps
          rr�z!CoprCommand._runtime_deps_warning&su��	
�	�	���d��#��	�	� � �"��"�"�4�#:�#:�=�#I�K[�\�����x�x�(�(�*�G��!�!�'�*������(�+�
���	
B�
���/�/�!�$���{�{�6�;�;�
'�(
�
'��	
9�?�?���M�����)�)�&�)�<�
@�
>�'�(
�����&�&�t�Q�/R�-S�T�#���	�	���3�3�D�M�M�3�48�I�I�N�N�4P�4P�5>��4D�F�$�U��(
s�>Fc��dj|jjdd�d|j|�|�}||jj
vr�dj|j|�|�x}}||jj
vr�d|jj
|jvro|jj
|jjd�d}	|jdd	�djdd�d}||jk7ryny|jj
|S#t$rY�$wxYw)
Nzcopr:{0}:{1}:{2}rQr5rz{0}-{1}r	rJr�r�)	r�rgr�r�rUr�r�rr�)rpr�r�r�r�rgs      rr0zCoprCommand._get_copr_repoXs:��$�+�+�D�,>�,>�,E�,E�c�1�,M�a�,P�,0�,C�,C�M�,R�,<�>���$�)�)�/�/�)� )� 0� 0��1H�1H��1W�1A�!C�
C�G�g��$�)�)�/�/�)�g�������9Q�9Z�9Z�.Z� �I�I�O�O�G�4�=�=�C�C�C�H��L�	��$-�$4�$4�S�!�$<�Q�$?�$E�$E�c�1�$M�a�$P�M�$��(:�(:�:�#�;���y�y���w�'�'��
"����s�.7E�	E
�E
c	�d�|j||�}|sCtjjt	dj|j||����	tj|j�y#t$r-}tjjt|���d}~wwxYw)Nz&Failed to remove copr repo {0}/{1}/{2})r0rdr�r�rr�rgrXr9r��OSErrorr)rpr�r�r�r"s     rr�zCoprCommand._remove_repons����"�"�=�2B�C����.�.�&�&��:��6�$�,�,�m�=M�N�P�Q�
Q�	/��I�I�d�m�m�$���	/��.�.�&�&�s�1�v�.�.��	/�s�A9�9	B/�(B*�*B/c�~�|j||�}|�8tjjt	dj||����|jj�D]T}|jjj|j||jjjddi��Vy)Nz!Failed to disable copr repo {}/{}r�r-)
r0rdr�r�rr�r1r2rUrVr8r�r�)rpr�r�r�r�s     rr�zCoprCommand._disable_repozs����"�"�=�2B�C���<��.�.�&�&��5��6�-�)9�:�<�=�
=�
�x�x�(�(�*�G��I�I�N�N�/�/��
�
�w�04�	�	���0L�0L�y�Z]�N^�
`�+rc��	tj|j��}|S#t$r+tj
j
td��YywxYw)z� Wrapper around response from server

        check data and print nice error in case of some error (and return None)
        otherwise return json object.
        �Unknown response from server.N)r�r�rjrrdrRrer)r�r(r�s   r�	_get_datazCoprCommand._get_data�sN��	��Z�Z�����)�F��
���	��G�G���Q�>�?�@��	�s�#'�1A�Ac�n�d|vr1tjjdj|d���y)N�errorz{})rdr�r�r�)r��json_objs  rr�zCoprCommand._check_json_output�s2���h���.�.�&�&�t�{�{�8�G�3D�'E�F�F�rc�>�|ddk(rdj|dd�S|S)Nrrzgroup_{}r5r)r�r�s  rr�zCoprCommand._sanitize_username�s-�����s�"��$�$�]�1�2�%6�7�7� � r)(�__name__�
__module__�__qualname__�__doc__r�rf�default_hubrmrnrh�aliasesr�summaryr��usage�staticmethodrHrzrlr^r�r�r�r�r�r�r�r�r��classmethodr�r�r�r�r0r�r�rBr�r�rrrr/r/Ps#����M�2���K����L�"�U�*�-=�=�K��G��2�3�G��M�
��
	�E�$�.��.�&I)�V�4�&7�]@�~/�b;��*�(�
�L��F��F�#�J6[�p0F�d(�,
/�
`������G��G��!��!rr/c�J�eZdZdZdZed�ZdZd�Zd�Z	e
d��Zd�Zy	)
�PlaygroundCommandz Playground plugin for DNF )�
playgroundz$Interact with Playground repository.z [enable|disable|upgrade]c��|j�|jtd�td��dj|j�}|j
j
|d��}|j|�}|j�|ddk7r(tjjtd���|d	D]�}d
j|d|d�}d
j|j
jj|jdd��}	||dvr�ddj|j||�}|j
j
|d��}|j|�}|j�|rd|vr|ddk(r|j||���y#tj j"$rY��wxYw)Nz!Enabling a Playground repository.zDo you want to continue?z{0}/api/playground/list/r�r�r��okrAr�z{0}/{1}�username�coprnamez{}/_playground_{}.reporJr��chrootsz{0}/api/coprs/{1}/detail/{2}/)r�r�rr�rirUr+rB�closerdrRrerVr�rr�r�r�)	rpr��api_urlr(r�r�r�r��output2s	         r�_cmd_enablezPlaygroundCommand._cmd_enable�s����������
�1�2�
�(�)�	
�-�3�3��M�M����I�I���g�D��1������"��	���	��(��t�#��'�'�"�"�1�%D�#E�F�F��7�O�D�$�+�+�D��,<�,0��,<�>�L�4�;�;�D�I�I�N�N�<W�<W�Ye�Ym�Ym�nq�sv�Yw�x�M�

���i��0��9�@�@��M�M�<��9���I�I�%�%�g�D�%�9���.�.��+�����	���W�!4�$�X�.�$�6��'�'��m�D��$���>�>�'�'�
��
�s�F%�'A;F%�%G�Gc���|j�tjdj|jjj
��D]}|j
|��y)Nz{}/_playground_*.repo)r��globr�rUrVr�r�)rpr�s  r�_cmd_disablezPlaygroundCommand._cmd_disable�sH������!�Y�Y�'>�'E�'E�d�i�i�n�n�Fa�Fa�'b�c�M����m�,�drc�0�|jddgd���y)Nr4r5)r7r8�upgrader<)rD)rFs rrHzPlaygroundCommand.set_argparser�s�����L��$D�	�	Frc�@�tjjd��)Nz%Playground is temporarily unsupported)rdr�r�rTr4r�r\rr�rr_r�)rpr4r�s   rr�zPlaygroundCommand.run�s���n�n�"�"�#J�K�KrN)
rGrHrIrJrLrrMrNr\r_rOrHr�rrrrRrR�sA��%��G��6�7�G�'�E��@-�
�F��F�@rrR)/�
__future__rr^r4r�rXr��shutilrr�r�dnfpluginscorerrrd�
dnf.pycompr�dnf.i18nrr��distrorr	r
rr�ImportError�platformr[�set�YES�NO�configparserr(r)r*�urllib.requestr+r,r-�urllib2�plugin�register_commandrR�Commandr/rRrrr�<module>rts-��(&����	�	�
��
�
��$�
���
�
V�?�?�/�,��	�1�U�8�Q�s�V�
����!�D�'�1�S�6�2�	����H�H�;�;�H�H�4�4������M	!�#�'�'�/�/�M	!��M	!�`�����A@��A@��A@��e�V��V�/���
V�	V�
V��V�s6�D�D3�D"�!D3�"D-�*D3�,D-�-D3�2D3

Youez - 2016 - github.com/yon3zu
LinuXploit