PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  [/\c@@sddlmZddlmZddlmZddlZddlmZddlmZddl m Z m Z ddl Z ddl Z ddlZ ddlZddlZejdZd ejfd YZdS( i(tabsolute_import(tprint_function(tunicode_literalsN(tcommands(t OptionParser(tucdt_udnft SearchCommandcB@s\eZdZd ZedZedZdZdZ dZ dZ dZ RS( uTA class containing methods needed by the cli to execute the search command. usearchu+search package details for the given stringc C@sZ|jddddtd|jdddd td d d gd ddtjdS(Nu--alltactionu store_truethelpu'search also package description and URLu query_stringtnargsu+tmetavaru QUERY_STRINGtchoicesualltdefault(t add_argumentRtNoneRtPkgNarrowCallback(tparser((s;/usr/lib/python2.7/site-packages/dnf/cli/commands/search.pyt set_argparser0s  c @stjdtdfdtdfdtdfdtdfffd fd }tjj}x4|D],}j|d|j|d|qWjjrx|D],}j|d|j|d|qWnTt |}t |j }x3|D]+}t |j ||kr||=qqWd}d} t} t} d} jjjsjjjjd |j j} nx|jd td | D]}||j|kr|j|}t} n| |j |kr|j |} t} n| |j|| kkrX|j|| k} t} n| rw|| || t} njjj||j||qWt |dkrtjtdndS(u0Search for simple text tags in a package object.unameuNameusummaryuSummaryu descriptionu DescriptionuurluURLc@sy |SWn|SXdS(N((tattr(t TRANS_TBL(s;/usr/lib/python2.7/site-packages/dnf/cli/commands/search.pyt_translate_attrBs c@st|}tdj|}|r=td|}ntd|}jjj|dj|}tt|dS(Nu & u%s Exactly Matched: %%su%s Matched: %%su, (tmapRtjointbasetoutputt fmtSectiontprintR(t exact_matchtattrstkeyst trans_attrsttrans_attrs_strt section_textt formatted(Rtself(s;/usr/lib/python2.7/site-packages/dnf/cli/commands/search.pyt_print_section_headerHs"tpkgtreversetlimit_toiuNo matches found.N(t collectionst OrderedDictRtdnft match_countert MatchCountert_search_countedtoptstalltlentlistRtmatched_needlesRtFalseRtconftshowdupesfromrepostsacktquerytfiltermtlatesttsortedtTruet matched_keystmatched_haystacksRt matchcallbacktloggertinfo( R#targsR$tcountertargtneedlestpkgsR%t used_attrsR2Rtprint_section_headertlimit((RRR#s;/usr/lib/python2.7/site-packages/dnf/cli/commands/search.pyt_search8sV     -    &cC@si|d|6}tjj|r7i|d|6}n|jjjjtj|}x'|j D]}|j |||qeW|S(Nu %s__substru%s__glob( R*tutiltis_glob_patternRR6R7R8thawkeytICASEtruntadd(R#RBRtneedletfdicttqR%((s;/usr/lib/python2.7/site-packages/dnf/cli/commands/search.pyR-s!cC@s@|jj r<|jj r<|jjdtjdtjndS(Ntstdouttstderr(R.tverbosetquiettclitredirect_loggertloggingtWARNINGtINFO(R#((s;/usr/lib/python2.7/site-packages/dnf/cli/commands/search.pyt pre_configurescC@ss|jj r*|jj r*|jjn|jj}t|_t|_ t|_ |jj pf|jj |j_ dS(N( R.RURVRWtredirect_repo_progresstdemandsR;tavailable_reposR3tfresh_metadatatsack_activationR/tquery_string_action(R#R^((s;/usr/lib/python2.7/site-packages/dnf/cli/commands/search.pyt configures    cC@s&tjtd|j|jjS(NuSearching Packages: (R?tdebugRRIR.t query_string(R#((s;/usr/lib/python2.7/site-packages/dnf/cli/commands/search.pyRNs(usearch( t__name__t __module__t__doc__taliasesRtsummaryt staticmethodRRIR-R\RcRN(((s;/usr/lib/python2.7/site-packages/dnf/cli/commands/search.pyR(s  H  (t __future__RRRR(tdnf.cliRtdnf.cli.option_parserRtdnf.i18nRRR*tdnf.match_countertdnf.utilRLRYt getLoggerR?tCommandR(((s;/usr/lib/python2.7/site-packages/dnf/cli/commands/search.pyts