Anons79 Mini Shell

Directory : /usr/lib/python2.7/site-packages/dnf/cli/
Upload File :
Current File : //usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyc

�
7�m`c@s�ddlmZddlmZddlmZddlZddlZddl	Zddl
ZddlZddlZ
ddlZddlZejd�Zdejfd��YZdS(i����(tunicode_literals(t_(t_parse_specsNudnftOptionParsercBsHeZdZd�Zd�Zdejfd��YZdejfd��YZdej	fd��YZ
d	ejfd
��YZdejfd��YZd
ejfd��YZ
dejfd��YZdejfd��YZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zdd�Zdd�ZRS(u5ArgumentParser like class to do things the "yum way".cCsDtt|�j�i|_t�|_|j�|_d|_	dS(N(
tsuperRt__init__t
_cmd_usagetsett_cmd_groupst_main_parsertmain_parsertNonetcommand_arg_parser(tself((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyR's
	cCs1|j�tjtd�|�tjd�dS(u�Output an error message, and exit the program.
           This method overrides standard argparser's error
           so that error output goes to the logger.

        :param msg: the error message to output
        uCommand line error: %siN(tprint_usagetloggertcriticalRtsystexit(R
tmsg((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyterror.s
t
_RepoCallbackcBseZd�ZRS(csW|dkrdnd�t||j�}|j�fd�tjd|�D��dS(Nu
--disablerepoudisableuenablec3s|]}|�fVqdS(N((t.0tx(t	operation(s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pys	<genexpr>=su\s*[,\s]\s*(tgetattrtdesttextendtretsplit(R
tparsert	namespacetvaluestopt_strtl((Rs9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyt__call__:s(t__name__t
__module__R#(((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyR9st_RepoCallbackEnablecBseZd�ZRS(cCs.|jj|ddf�t|d|�dS(Niuenableureponame(trepos_edtappendtsetattr(R
RRR R!((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyR#@s(R$R%R#(((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyR&?st_SplitCallbackcBseZdZd�ZRS(uN Split all strings in seq, at "," and whitespace.
        Returns a new list. cCsCx<tjd|�D](}ttj|�j||||�qWdS(Nu\s*[,\s]\s*(RRRRR*R#(R
RRR R!tval((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyR#Gs	(R$R%t__doc__R#(((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyR*Dst_SplitExtendDictCallbackcBseZdZd�ZRS(u[ Split string at "," or whitespace to (key, value).
        Extends dict with {key: value}.c	Cs�y0|jd�\}}|s&|r/t�nWn3tk
retd�|}tj||��nXt||j�}|||<dS(Nu,ubad format: %s(Rt
ValueErrorRtargparset
ArgumentErrorRR(	R
RRR R!tkeyR+Rtdct((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyR#Os

(R$R%R,R#(((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyR-Lst_SetoptsCallbackcBseZdZd�ZRS(uY Parse setopts arguments and put them into main_<setopts>
            and repo_<setopts>.cCs[|jd�}t|�dkr;tjtd�|�dSt|�dkrgtjtd�|�dS|\}}|jd�}|dkr|| }	||d}t|d�r�|j}
ni}
|
j|	i�j|g�j	|�t
|d	|j|
�nQt|d
�r!|j}ni}|j|g�j	|�t
|d|j|�dS(Nu=iu'Setopt argument has multiple values: %su Setopt argument has no value: %su.i����iurepo_setoptsurepo_umain_setoptsumain_(
RtlenRtwarningRtfindthasattrtrepo_setoptst
setdefaultR(R)Rtmain_setopts(R
RRR R!tvalstktvtperiodtrepotrepooptstmainopts((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyR#]s,
%(R$R%R,R#(((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyR3ZstParseSpecGroupFileCallbackcBseZd�ZRS(cCst||�dS(N(R(R
RRR R!((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyR#ys(R$R%R#(((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyRBxstPkgNarrowCallbackcBseZd�Zd�ZRS(cOs�i|_y3x,ddgD]}|||j|<||=qWWn/tk
rm}td|jj|f��nXg|d<ttj|�j||�dS(Nuchoicesudefaultu"%s() missing mandatory argument %s(	t	pkgnarrowtKeyErrort	TypeErrort	__class__R$RRRCR(R
targstkwargsR<te((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyR}s	
cCsq|jd}|s+|d|jdkr;|jd}n|jd�}t|||�t||j|�dS(Nu_actioniuchoicesudefault(RRDtpopR)(R
RRR R!tdest_actiontnarrow((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyR#�s
(R$R%RR#(((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyRC|s	tForceArchActioncBseZd�ZRS(cCst|_||_dS(N(tTruet
ignorearchtarch(R
RRR R!((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyR#�s	(R$R%R#(((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyRN�scCs�tjtjjdt�}td�|j_|j	dddddd�dd	d
td��|j	dd
dddddd�d
td��|j	dddddd�d
td��|j	ddddd�d
td��|j	dd
td�dd�|j	dddddgddd
td��|j	d dd!dd�dd"d
td#��|j	d$dd%dgd|jd
td&�dd'�|j	d(dd)dgd|jd
td*�dd'�|j	d+dd�d
td,��|j	d-dd.dgd|jd
td/��|j	d0dd1dddd�d
td2��|j	d3d4d5dddd6d
td7��|j	d8dddd�d
td9��|j	d:d;dddd�d
td<��|j	d=d>dd?dddd�d
td@��|j	dAdBddCdDt
dd�ddEd
tdF��|j	dGdHddIddJdd�d
tdK�dDt
�|j	dLdddd�d
tdM��|j	dNddOdddd�d
tdP��|j	dQdRdd�dDt
d
tdS��|j	dTdd�ddUddd
tdV��|j	dWdd�d
tdX�ddY�|j	dZd[dddd�d
td\��|j	d]dddd�d
td^��|j	d_d|jdd`dgdda�|j�}|j	dbd|jdd`dgdda�|j	dcddddadded|jdgd
tdf��|j�}|j	dgdhdtddiddd
tdj��|j	dkdldtddmddd
tdn��|j	dodpdqdgddrd|jd
tds�ddt�|j	dudvdgddwd|jd
tdx�dda�|j	dydid|jddzd
td{��|j	d|dd!dd�dd}d
td~��|j	ddd!dd�dd�d
td���|j	d�dd�dd�d
td���|j	d�dd�ddd
td���|j	d�dd�dd�d
td��dddd��|j	d�dd�dd�d
td��dddd��|j	d�d�dd�dd�d
td���|j	d�dd�dddtd
td���|j	d�dd�dd�d
td���|j	d�ddd
td���|j	d�ddd
td���|j	d�ddd
td���|j	d�ddd
td���|j	d�d�dd�dgdd�d
td���|j	d�dgdd�dd�d
td���|j	d�dgdd�d
td���|j	d�d�d�d�d�d�d�gdgdd�dd�d
td���|j	d�dd�dtjd|jd�ttjjj��d
td���|S(�u0 Standard options known to all dnf subcommands. tadd_helpuOptional argumentsu-cu--configRuconfig_file_pathtdefaulttmetavaru
[config file]thelpuconfig file locationu-qu--quietuquiettactionu
store_trueuquiet operationu-vu	--verboseuverbose operationu	--versionushow DNF version and exitu
--installrootuset install rootu[path]u--nodocsustore_consttconstunodocsutsflagsudo not install documentationsu--nopluginsustore_falseupluginsudisable all pluginsu--enablepluginuenablepluginuenable plugins by nameu[plugin]u--disablepluginu
disablepluginudisable plugins by nameu--releaseveru:override the value of $releasever in config and repo filesu--setoptusetoptsu%set arbitrary config and repo optionsu
--skip-brokenuskip_brokenu.resolve depsolve problems by skipping packagesu-hu--helpu
--help-cmduhelpushow command helpu--allowerasingu;allow erasing of installed packages to resolve dependenciesu-bu--bestu8try the best available package versions in transactions.u-Cu--cacheonlyu	cacheonlyu2run entirely from system cache, don't update cacheu-Ru--randomwaitu	sleeptimettypeu	[minutes]umaximum command wait timeu-du--debuglevelu
debuglevelu
[debug level]udebugging output levelu
--debugsolveru)dumps detailed solving results into filesu--showduplicatesushowdupesfromreposu2show duplicates, in repos, in list/search commandsu-eu--errorleveluerror output levelu--obsoletesu	obsoletesu�enables dnf's obsoletes processing logic for upgrade or display capabilities that the package obsoletes for info, list and repoqueryu--rpmverbosityudebugging output level for rpmu[debug level name]u-yu--assumeyesu*automatically answer yes for all questionsu
--assumenou)automatically answer no for all questionsu--enablerepourepos_edu[repo]u
--disablerepou--repou--repoidurepouUenable just specific repositories by an id or a glob, can be specified multiple timesu--enableu
--set-enableduset_enabledu>enable repos with config-manager command (automatically saves)u	--disableu--set-disableduset_disabledu?disable repos with config-manager command (automatically saves)u-xu	--excludeu
--excludepkgsuexcludepkgsu exclude packages by name or globu	[package]u--disableexcludesu--disableexcludepkgsudisable_excludesudisable excludepkgsu--repofrompathu[repo,path]uIlabel and path to additional repository, can be specified multiple times.u--noautoremoveuclean_requirements_on_removeu7disable removal of dependencies that are no longer usedu--nogpgcheckugpgchecku5disable gpg signature checking (if RPM policy allows)u--colorucolorucontrol whether color is usedu	--refreshufreshest_metadatau2set metadata as expired before running the commandu-4u
ip_resolveuresolve to IPv4 addresses onlyuipv4u-6uresolve to IPv6 addresses onlyuipv6u	--destdiru
--downloaddirudestdiru!set directory to copy packages tou--downloadonlyudownloadonlyuonly download packagesu	--commentucommentuadd a comment to transactionu--bugfixu,Include bugfix relevant packages, in updatesu
--enhancementu1Include enhancement relevant packages, in updatesu--newpackageu0Include newpackage relevant packages, in updatesu
--securityu.Include security relevant packages, in updatesu
--advisoryu--advisoriesuadvisoryuappendu=Include packages needed to fix the given advisory, in updatesu--bzsubugzillau7Include packages needed to fix the given BZ, in updatesu--cvesu8Include packages needed to fix the given CVE, in updatesu--sec-severityu
--secseveritytchoicesuCriticalu	ImportantuModerateuLowuseverityuDInclude security relevant packages matching the severity, in updatesu--forcearchuARCHu Force the use of an architectureN(R/tArgumentParsertdnfRWtPROGRAM_NAMEtFalseRt
_optionalsttitletadd_argumentRR*R3tintRtadd_mutually_exclusive_groupR-tSUPPRESSRNtsortedtrpmt
_BASEARCH_MAPtkeys(R
R
t
repo_grouptenable_group((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyR	�s2	


!


	













		














	

	
		
cCs�dtjj|jf}tt|�j|dtd|jgd|j	�tt|�j
ddddtj�tj
|dt�|_|j|j_|j|�|S(	Nu%s %sRRtparentstdescriptionucommandtnargsiRU(R[RWR\t_basecmdRRRR]R
tsummaryR`R/RcRZRRt
set_argparser(R
tcommandtprog((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyt_command_parserLs


cCsgtjj|j�}tjj|jd�}||jkrc||f|j|<|jj|�ndS(u- store usage info about a single dnf command.iN(R[ti18ntucdRntaliasesRRtadd(R
tcmdtgroupRntname((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyt_add_cmd_usageXs
cCs1x*t|j��D]}|j||�qWdS(u� store name & summary for dnf commands

        The stored information is used build usage information
        grouped by build-in & plugin commands.
        N(RR Rz(R
tcli_cmdsRxRw((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pytadd_commands`scCs�itd�d6td�d6}tjj}d|}x�ddgD]�}||jkr^qCn|d||7}xSt|jj��D]<}|j|\}}||kr�|d||f7}q�q�WqCW|S(u- get the usage information to show the user. uList of Main Commands:umainuList of Plugin Commands:upluginu%s [options] COMMAND
u
%s

u	%-25s %s
(RR[RWR\RRdRRg(R
tdescRytusagetgrpRxRn((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyt	get_usageis
cOs\tg|D]}|d|jk^q
�rEtt|�j||�S|jj||�SdS(Ni(talltprefix_charsRRR`R(R
RHRItarg((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyR`zs,cCs\tjtjjdtd|jg�}|jddddtj�|j	|�\}}|S(NRRRjucommandRlu?RU(
R/RZR[RWR\R]R
R`Rctparse_known_args(R
RHRRt_unused_args((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pytparse_main_args�s
cCsJ|j|�tt|�j|�\}}|jj||�|_|jS(N(RrRRR�Rt
parse_argstopts(R
RpRHRtextras((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pytparse_command_args�s

cCs/|j|jj7_tt|�j|�dS(N(t_actionsRRRR(R
tfile_((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyR�scCsc|r@|j|�}|j|jj7_tt|�j�n|j�|j_|jj�dS(N(	RrR�RRRt
print_helpR�R
R~(R
Rptcp((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyR��sN(R$R%R,RRR/tActionRR&t
_AppendActionR*R-R3RBRCRNR	RrRzR|R�R`R�R�RRR�(((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyR$s*			�								(t
__future__Rtdnf.i18nRtdnf.utilRR/tdnf.exceptionsR[tdnf.rpmtdnf.yum.misctloggingtos.pathtosRRt	getLoggerRRZR(((s9/usr/lib/python2.7/site-packages/dnf/cli/option_parser.pyt<module>s

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]