Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/dnf-plugins/
Upload File :
Current File : //lib/python2.7/site-packages/dnf-plugins/generate_completion_cache.pyc

�
	i/\c@@s�ddlmZddlmZddlmZddlmZddlZddlZ	ddl
Z
dejfd��YZdS(i(tabsolute_import(tunicode_literals(tucd(tloggerNtBashCompletionCachecB@s8eZdZd�Zed��Zd�Zd�ZRS(ugenerate_completion_cachecC@s/tt|�j||�||_d|_dS(Nu/var/cache/dnf/packages.db(tsuperRt__init__tbaset
cache_file(tselfRtcli((sI/usr/lib/python2.7/site-packages/dnf-plugins/generate_completion_cache.pyRs	cC@stjd|�dS(NuCompletion plugin: %s(Rtdebug(tmsg((sI/usr/lib/python2.7/site-packages/dnf-plugins/generate_completion_cache.pyt_out$sc		C@s]t}x?|jjj�D]+}|jdk	r|jjrt}PqqWtj	j
|j�sd|rYy�tj
|j���}|jd�|j�}|jd�|jd�|jd�|jjj�j�}g|D]$}|jdkr�t|�g^q�}|jd|�|j�WdQXWqYtjk
rU}|jdt|��qYXndS(	u& Generate cache of available packages uGenerating completion cache...u/create table if not exists available (pkg TEXT)uAcreate unique index if not exists pkg_available ON available(pkg)udelete from availableusrcu*insert or ignore into available values (?)Nu Can't write completion cache: %s(tFalseRtrepostiter_enabledtmetadatatNonetfreshtTruetostpathtexistsRtsqlite3tconnectR
tcursortexecutetsacktqueryt	availabletarchtstrtexecutemanytcommittOperationalErrorR(	R	Rtrepotconntcurt
avail_pkgstxtavail_pkgs_insertte((sI/usr/lib/python2.7/site-packages/dnf-plugins/generate_completion_cache.pyR(s,

1	cC@s|js
dSy�tj|j���}|jd�|j�}|jd�|jd�|jd�tjj	|j
�j�j�}g|D]$}|j
dkr�t|�g^q�}|jd|�|j�WdQXWn-tjk
r}|jdt|��nXdS(	u& Generate cache of installed packages NuGenerating completion cache...u/create table if not exists installed (pkg TEXT)uAcreate unique index if not exists pkg_installed ON installed(pkg)udelete from installedusrcu*insert or ignore into installed values (?)u Can't write completion cache: %s(ttransactionRRRR
RRtdnfRt_rpmdb_sackRRt	installedRR R!R"R#R(R	R%R&t	inst_pkgsR(tinst_pkgs_insertR*((sI/usr/lib/python2.7/site-packages/dnf-plugins/generate_completion_cache.pyR+Gs"	


!1	(t__name__t
__module__tnameRtstaticmethodR
RR+(((sI/usr/lib/python2.7/site-packages/dnf-plugins/generate_completion_cache.pyRs
		(
t
__future__RRtdnf.i18nRtdnfpluginscoreRR,tos.pathRRtPluginR(((sI/usr/lib/python2.7/site-packages/dnf-plugins/generate_completion_cache.pyt<module>s

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