HEX
Server: Apache
System: Linux dinesh8189 5.15.98-grsec-sharedvalley-2.lc.el8.x86_64 #1 SMP Thu Mar 9 09:07:30 -03 2023 x86_64
User: cgmgerenciamento1 (814285)
PHP: 8.1.26
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: //usr/lib/python3.6/site-packages/dnf/automatic/__pycache__/main.cpython-36.pyc
3

_��g�9�@svddlmZddlmZddlmZddlZddlZddlZddlZddlZddl	Z	ddl
mZmZm
Z
ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZejd�Zdd�Zd	d
�ZGdd�de�Z Gd
d�de�Z!Gdd�de!�Z"Gdd�de!�Z#Gdd�de!�Z$Gdd�de$�Z%Gdd�de!�Z&dd�Z'dd�Z(dd�Z)dd �Z*dS)!�)�absolute_import)�print_function)�unicode_literalsN)�_�ucd�P_�dnfcCs�tjjg�}|jj}|jj}|r�x�|D]�}|dkrPtjjj||j	�}|j
|�q&|dkrrtjjj|�}|j
|�q&|dkr�tjjj|�}|j
|�q&|dkr�tjjj
||j�}|j
|�q&|dkr�tjjj||j�}|j
|�q&tjjd|��q&W|S)N�email�stdioZmotd�command�
command_emailzUnknown emitter option: %s)r�utilZ
MultiCallList�emitters�system_name�emit_viaZ	automatic�emitterZEmailEmitterr	�appendZStdIoEmitterZMotdEmitterZCommandEmitterrZCommandEmailEmitterr�
exceptions�ConfigError)�confrrr�namer�r�/usr/lib/python3.6/main.py�build_emitters1s,
rcCs�tj�}|jddd�|jddd�|jdddd	�|jd
ddd	�|jddd
d	�|jddd
d	�|jdd�|jdd�|j|�|fS)N�	conf_path�?)�nargsz--timer�
store_true)�actionz--installupdates�installupdates)�destrz--downloadupdates�downloadupdatesz--no-installupdatesZstore_falsez--no-downloadupdates)r)r!)�argparse�ArgumentParser�add_argumentZset_defaults�
parse_args)�args�parserrrr�parse_argumentsKsr(c@s&eZdZddd�Zdd�Zdd�ZdS)	�AutomaticConfigNcCs�|rHtj|tj�r4tj|tj�sFtjjdj|���qPtjjdj|���ntjj	}t
�|_t�|_
t�|_t�|_t�|_d|_|j|�|r�d|j_n|dkr�d|j_|r�d|j_n|dkr�d|j_|jj�||_dS)Nz(Configuration file "{}" is not readable.z"Configuration file "{}" not found.TF)�os�access�F_OK�R_OKrr�Error�format�constZCONF_AUTOMATIC_FILENAME�CommandsConfig�commands�EmailConfigr	�EmittersConfigr�
CommandConfigr�CommandEmailConfigr�_parser�_load�download_updates�
apply_updates�imply�filename)�selfr<r!rrrr�__init__Zs2



zAutomaticConfig.__init__cCs�tjj�}y|j|�Wn`tk
rN}ztjjd||f��WYdd}~Xn,tk
rx}zt	j
|�WYdd}~XnX|jj|d|tjj
j�|jj|d|tjj
j�|jj|d|tjj
j�|jj|d|tjj
j�|jj|d|tjj
j�||_dS)NzParsing file "%s" failed: %sr2r	rrr)�libdnfrZConfigParser�read�RuntimeErrorrrr�IOError�logger�warningr2�populate�OptionZPriority_AUTOMATICCONFIGr	rrrr7)r=r<r'�errrr8|s"
$zAutomaticConfig._loadcCs|j|jd|jtjj�dS)N�base)Z	_populater7r<rrZPRIO_AUTOMATICCONFIG)r=Zbaseconfrrr�update_baseconf�szAutomaticConfig.update_baseconf)NNN)�__name__�
__module__�__qualname__r>r8rIrrrrr)Ys
!r)c@s$eZdZdd�Zdd�Zdd�ZdS)�ConfigcCs
i|_dS)N)�_options)r=rrrr>�szConfig.__init__cs<||j�<�fdd�}�fdd�}tt|��t||��dS)Ncs|j�j�S)N)rN�getValue)�obj)rrr�prop_get�sz#Config.add_option.<locals>.prop_getcs|j�jtjjj|�dS)N)rN�setr?rrFZPriority_RUNTIME)rP�val)rrr�prop_set�sz#Config.add_option.<locals>.prop_set)rN�setattr�type�property)r=rZ	optionobjrQrTr)rr�
add_option�s
zConfig.add_optionc	Cs�|j|�r�x�|j|�D]�}|j||�}|s4|dkr8d}|jj|d�}|r�y|j||�Wq�tk
r�}z,tjt	d�t
|�t
|�t
|�t|��WYdd}~Xq�Xqtjt	d�t
|�t
|�t
|��qWdS)z+Set option values from an INI file section.�None�Nz,Unknown configuration value: %s=%s in %s; %sz+Unknown configuration option: %s = %s in %s)Z
hasSectionZoptionsrOrN�getrRrArC�debugrr�str)	r=r'Zsectionr<Zpriorityr�value�optrGrrrrE�s

0zConfig.populateN)rJrKrLr>rXrErrrrrM�srMcs$eZdZ�fdd�Zdd�Z�ZS)r1cs�tt|�j�|jdtjjd��|jdtjjd��|jdtjjd��|jdtjjdtjj	ddg���|jd	tjj
d
��|jdtjj
d��dS)
Nr:FZbase_config_filez/etc/dnf/dnf.confr9�upgrade_type�default�security�random_sleepi,�network_online_timeout�<)�superr1r>rXr?rZ
OptionBool�OptionStringZOptionEnumString�VectorString�OptionNumberInt32)r=)�	__class__rrr>�szCommandsConfig.__init__cCs|jrd|_dS)NT)r:r9)r=rrrr;�szCommandsConfig.imply)rJrKrLr>r;�
__classcell__rr)rjrr1�s
r1cseZdZ�fdd�Z�ZS)r3csltt|�j�|jdtjjtjjdg���|jdtjjd��|jdtjjd��|jdtjj	d��dS)N�email_to�root�
email_fromZ
email_hostZ	localhostZ
email_port�)
rfr3r>rXr?r�OptionStringListrhrgri)r=)rjrrr>�szEmailConfig.__init__)rJrKrLr>rkrr)rjrr3�sr3cs$eZdZdZdZ�fdd�Z�ZS)r5�catz{body}cs>tt|�j�|jdtjj|j��|jdtjj|j��dS)NZcommand_formatZstdin_format)	rfr5r>rXr?rrg�_default_command_format�_default_stdin_format)r=)rjrrr>�s
zCommandConfig.__init__)rJrKrLrrrsr>rkrr)rjrr5�sr5cs eZdZdZ�fdd�Z�ZS)r6z7mail -Ssendwait -s {subject} -r {email_from} {email_to}csDtt|�j�|jdtjjtjjdg���|jdtjjd��dS)Nrlrmrn)	rfr6r>rXr?rrprhrg)r=)rjrrr>�szCommandEmailConfig.__init__)rJrKrLrrr>rkrr)rjrr6�sr6cseZdZ�fdd�Z�ZS)r4cs^tt|�j�|jdtjjtjjddg���|jdtjjd��|jdtjj	t
j���dS)Nrr	r
Zoutput_width�Pr)rfr4r>rXr?rrprhrirg�socketZgethostname)r=)rjrrr>�s
zEmittersConfig.__init__)rJrKrLr>rkrr)rjrr4�sr4cCsNd}x0|D](}|j|�\}}|dkr
d}tj|�q
W|sJtjjtd���dS)NTrFzGPG check FAILED)Zpackage_signature_checkrCZcriticalrrr.r)rHZpkgs�okZpo�result�errmsgrrr�gpgsigcheck�s
ryc	s|dkrdSdddddd���fdd	�}t�}x^|j�D]R}|jrV|j||jg��q8|j||j��|j||jg��|j||jg��q8W|s�dStjt	d
��t
j
�}xht
j
�||k�rxF|D]>\}}ytj||fd�}|j
�dStjk
�rYq�Xq�Wt
jd�q�WdS)
a8
    Wait up to <timeout> seconds for network connection to be available.
    if <timeout> is 0 the network availability detection will be skipped.
    Returns True if any remote repository is accessible or remote repositories are not enabled.
    Returns False if none of remote repositories is accessible.
    rTrti��i8)ZhttpZhttpsZftpZsocksZsocks5c3sTxN|D]F}tjjj|�}|js|jr4|j�kr4q|j|jpF�|jfVqWdS)N)rZpycompZurlparseZhostname�port�scheme)Zurl_listZurlZ
parsed_url)�remote_schemesrr�remote_address
s
z(wait_for_network.<locals>.remote_addressz"Waiting for internet connection...�F)rRZiter_enabled�proxy�updateZbaseurlZ
mirrorlistZmetalinkrCr\r�timeruZcreate_connection�close�error�sleep)	�reposZtimeoutr~Z	addressesZrepoZtime_0�hostr{�sr)r}r�wait_for_network�s:
r�c
Cs&t|�\}}d}d}�y�t|j|j|j�}tj����}tjj|�}|j	�d|j
_|j|j
�|j|d�tjtd��|jr�tjd|jj�}tjtdd|�j|��tj|�|j�|j�t|j|jj�s�tj td��|j!�|j"�t#||jj$�|j%�tjj&j'||j
�}|j(}	|	�s&dS|j)|	dd	�}
t*|�}|j+|
�|jj,�s\|j-�dS|j.|	j/�|j0�|jj1�s�|j-�dSt2||	j/�|j3�x.|	D]&}|j4t5j(j6k�r�tj7j8td
����q�W|j9�|j-�WdQRXWn:tj7j8k
�r }ztj:td�t;|��dSd}~XnXdS)
NT)�clizStarted dnf-automatic.rzSleep for {} secondzSleep for {} secondszSystem is off-line.rt)Ztotal_widthzTransaction failedz	Error: %sr)<r(r)rr!rrZBaser�ZCliZ_read_conf_fileZdemandsZ	resolvingrIrZinit_pluginsrCr\rZtimer�randomZrandintr2rcrr/r�r�Zpre_configure_pluginsZread_all_reposr�r�rdrDZconfigure_pluginsZ	fill_sack�upgrader`Zresolve�outputZOutputZtransactionZlist_transactionrZnotify_availabler9ZcommitZdownload_packagesZinstall_setZnotify_downloadedr:ryZdo_transaction�stater?ZTransactionItemState_ERRORrr.Znotify_appliedr�r)
r&Zoptsr'rrrHr�Zsleeperr�ZtransZlstZtsi�excrrr�main3sf





r�cCsX|dkr0|jj|jj�j�jdd��|j�n$|dkrB|j�ntjj	dj
|���dS)Nrb)Z
advisory_typerazFUnsupported upgrade_type "{}", only "default" and "security" supported)Z_update_security_filtersrZsackZqueryZupgradesZfiltermZupgrade_allrrr.r/)rHr`rrrr�ys


r�)+Z
__future__rrrr"Zloggingr*r�rur�Zdnf.i18nrrrrZdnf.automatic.emitterZdnf.cliZdnf.cli.cliZdnf.cli.outputZdnf.confZ	dnf.constZdnf.exceptionsZdnf.utilZdnf.loggingZ
dnf.pycompZlibdnf.confr?Z	getLoggerrCrr(�objectr)rMr1r3r5r6r4ryr�r�r�rrrr�<module>sF
;#

	8F