/usr/lib/python3.9/site-packages/dnf/__pycache__
NameSizeModeActions
base.cpython-39.opt-1.pyc816190644editdlrm
base.cpython-39.pyc818610644editdlrm
callback.cpython-39.opt-1.pyc37330644editdlrm
callback.cpython-39.pyc37330644editdlrm
comps.cpython-39.opt-1.pyc257750644editdlrm
comps.cpython-39.pyc262880644editdlrm
const.cpython-39.opt-1.pyc14380644editdlrm
const.cpython-39.pyc14380644editdlrm
crypto.cpython-39.opt-1.pyc68910644editdlrm
crypto.cpython-39.pyc68910644editdlrm
dnssec.cpython-39.opt-1.pyc92700644editdlrm
dnssec.cpython-39.pyc92700644editdlrm
drpm.cpython-39.opt-1.pyc53590644editdlrm
drpm.cpython-39.pyc53590644editdlrm
exceptions.cpython-39.opt-1.pyc72630644editdlrm
exceptions.cpython-39.pyc72630644editdlrm
goal.cpython-39.opt-1.pyc2590644editdlrm
goal.cpython-39.pyc2590644editdlrm
history.cpython-39.opt-1.pyc2860644editdlrm
history.cpython-39.pyc2860644editdlrm
i18n.cpython-39.opt-1.pyc96450644editdlrm
i18n.cpython-39.pyc96450644editdlrm
lock.cpython-39.opt-1.pyc41820644editdlrm
lock.cpython-39.pyc41820644editdlrm
logging.cpython-39.opt-1.pyc84460644editdlrm
logging.cpython-39.pyc85100644editdlrm
match_counter.cpython-39.opt-1.pyc41380644editdlrm
match_counter.cpython-39.pyc41380644editdlrm
package.cpython-39.opt-1.pyc102570644editdlrm
package.cpython-39.pyc102570644editdlrm
persistor.cpython-39.opt-1.pyc42410644editdlrm
persistor.cpython-39.pyc42410644editdlrm
plugin.cpython-39.opt-1.pyc90640644editdlrm
plugin.cpython-39.pyc90640644editdlrm
pycomp.cpython-39.opt-1.pyc30160644editdlrm
pycomp.cpython-39.pyc30160644editdlrm
query.cpython-39.opt-1.pyc8680644editdlrm
query.cpython-39.pyc8680644editdlrm
repo.cpython-39.opt-1.pyc224290644editdlrm
repo.cpython-39.pyc224290644editdlrm
repodict.cpython-39.opt-1.pyc56340644editdlrm
repodict.cpython-39.pyc56340644editdlrm
sack.cpython-39.opt-1.pyc22990644editdlrm
sack.cpython-39.pyc22990644editdlrm
selector.cpython-39.opt-1.pyc2670644editdlrm
selector.cpython-39.pyc2670644editdlrm
subject.cpython-39.opt-1.pyc3020644editdlrm
subject.cpython-39.pyc3020644editdlrm
transaction.cpython-39.opt-1.pyc16730644editdlrm
transaction.cpython-39.pyc16730644editdlrm
transaction_sr.cpython-39.opt-1.pyc173450644editdlrm
transaction_sr.cpython-39.pyc173450644editdlrm
util.cpython-39.opt-1.pyc231260644editdlrm
util.cpython-39.pyc231810644editdlrm
__init__.cpython-39.opt-1.pyc5440644editdlrm
__init__.cpython-39.pyc5440644editdlrm
Edit: /usr/lib/python3.9/site-packages/dnf/__pycache__/package.cpython-39.pyc (10257B)
a j&,ã@s˜dZddlmZddlmZddlmZddlZddlZddl Zddl Zddl Z ddl Z ddlZ ddlZddlZddlZe d¡ZGdd„de jƒZdS) z! Contains the dnf.Package class. é)Úabsolute_import)Úunicode_literals)Ú_NÚdnfcsÌeZdZdZdZdZ‡fdd„Ze‡fdd„ƒZej dd„ƒZed d „ƒZ ed d „ƒZ ed d„ƒZ edd„ƒZ edd„ƒZe‡fdd„ƒZej dd„ƒZedd„ƒZedd„ƒZedd„ƒZedd„ƒZdd„Zed d!„ƒZed"d#„ƒZed$d%„ƒZed&d'„ƒZed(d)„ƒZej d*d)„ƒZed+d,„ƒZed-d.„ƒZed/d0„ƒZed1d2„ƒZed3d4„ƒZed5d6„ƒZed7d8„ƒZ d9d:„Z!d;d<„Z"d=d>„Z#d?d@„Z$dAdB„Z%dNdDdE„Z&dFdG„Z'edHdI„ƒZ(dJdK„Z)dLdM„Z*‡Z+S)OÚPackagez Represents a package. #:api z -debuginfoz -debugsourcecs,tt|ƒ |¡||_d|_d|_d|_dS©N)ÚsuperrÚ__init__ÚbaseÚ _priv_chksumÚ_repoÚ _priv_size)ÚselfZ initobjectr ©Ú __class__©ú//usr/lib/python3.9/site-packages/dnf/package.pyr 0s zPackage.__init__c sŒ|jr |jS|jr€tjj ¡}ztj ||j ¡}Wn8tj j yj}ztj   t|ƒ¡‚WYd}~n d}~00t |¡t |¡fStt|ƒjSr)r Ú _from_cmdlinerZyumZmiscZget_default_chksum_typeÚlibdnfÚutilsZchecksum_valueÚlocationÚerrorÚErrorÚ exceptionsÚ MiscErrorÚstrÚhawkeyÚ chksum_typeÚbinasciiZ unhexlifyrrÚchksum)rrZ chksum_valÚerrrÚ_chksum7s &ÿzPackage._chksumcCs ||_dSr)r ©rÚvalrrrr!EscCs |jtjkSr)ÚreponamerZCMDLINE_REPO_NAME©rrrrrIszPackage._from_cmdlinecCs |jtjkSr)r$rÚSYSTEM_REPO_NAMEr%rrrÚ _from_systemMszPackage._from_systemcCs*d}|jr|jj |¡}|r$d|S|jS)a9 For installed packages returns id of repository from which the package was installed prefixed with '@' (if such information is available in the history database). Otherwise returns id of repository the package belongs to (@System for installed packages of unknown origin) Nú@)r'r ÚhistoryÚrepor$)rZpkgreporrrÚ _from_repoQs zPackage._from_repocCs|jr|jj |¡SdS)NÚ)r'r r)r*r%rrrÚ from_repo`szPackage.from_repocCstj | ¡¡S)z» Returns the header of a locally present rpm package file. As opposed to self.get_header(), which retrieves the header of an installed package from rpmdb. )rÚrpmÚ_headerÚlocalPkgr%rrrr/gszPackage._headercs|jr |jStt|ƒjSr)r rrÚsizer%rrrÚ_sizepsz Package._sizecCs ||_dSr)r r"rrrr2vscCs"|jdurdS|j\}}t |¡Sr)Z hdr_chksumrÚhexlify)rrrrrrÚ_pkgidzs  zPackage._pkgidcCs4|jdur,tj |jd¡}| dd¡d}nd}|S)zO returns name of source package e.g. krb5-libs -> krb5 Nz.src.rpmú-ér)Z sourcerpmrÚutilZrtrimÚrsplit)rÚsrcnamerrrÚ source_name�s  zPackage.source_namecCsF|j |j¡r|jS|j}|j |j¡r<|dt|jƒ …}||jS)a) Returns name of the debuginfo package for this package. If this package is a debuginfo package, returns its name. If this package is a debugsource package, returns the debuginfo package for the base package. e.g. kernel-PAE -> kernel-PAE-debuginfo N)ÚnameÚendswithÚDEBUGINFO_SUFFIXÚDEBUGSOURCE_SUFFIXÚlen)rr;rrrÚ debug_name•s zPackage.debug_namecCs |jdur|jn|j}||jS)zv Returns name of the debugsource package for this package. e.g. krb5-libs -> krb5-debugsource N)r:r;r>©rZsrc_namerrrÚdebugsource_name¨szPackage.debugsource_namecCsN|js dSzt|jj tj|j¡ƒWStyHt j   dt |ƒ¡‚Yn0dS)a` Returns the rpm header of the package if it is installed. If not installed, returns None. The header is not cached, it is retrieved from rpmdb on every call. In case of a failure (e.g. when the rpmdb changes between loading the data and calling this method), raises an instance of PackageNotFoundError. Nz4Package not found when attempting to retrieve header) r'Únextr Z_tsZdbMatchr.ZRPMDBI_PACKAGESÚrpmdbidÚ StopIterationrrZPackageNotFoundErrorrr%rrrÚ get_header³s  zPackage.get_headercCs |jdur|jn|j}||jS)z€ returns name of debuginfo package for source package of given package e.g. krb5-libs -> krb5-debuginfo N)r:r;r=rArrrÚsource_debug_nameÄszPackage.source_debug_namecCs t|jƒS)z: Always type it to int, rpm bindings expect it like that. )ÚintrDr%rrrÚidxÏsz Package.idxcCs|jSr©r$r%rrrÚrepoidÔszPackage.repoidcCs|j|jt|jƒ|j|jfSr)r;Úarchrr ÚvÚrr%rrrÚpkgtupØszPackage.pkgtupcCs|jr |jS|jj|jSr)r r Zreposr$r%rrrr*Üsz Package.repocCs ||_dSr)r r"rrrr*âscCs |jtjkrdS|jjj |¡Sr)rKrr&r r)r.Zget_reason_namer%rrrÚreasonæs zPackage.reasoncCs|jSr)rr%rrrÚ relativepathìszPackage.relativepathcCs|jSr)rLr%rrrÚaðsz Package.acCs|jSr)Zepochr%rrrr ôsz Package.ecCs|jSr)Úversionr%rrrrMøsz Package.vcCs|jSr)Úreleaser%rrrrNüsz Package.rcCs|jSrrJr%rrrÚ ui_from_reposzPackage.ui_from_repocCs| |¡dkS©Nr©Zevr_cmp©rÚpkgrrrÚevr_eqszPackage.evr_eqcCs| |¡dkSrVrWrXrrrÚevr_gt szPackage.evr_gtcCs| |¡dkSrVrWrXrrrÚevr_lt szPackage.evr_ltcCs|jSr)Zmedianrr%rrrÚ getDiscNumszPackage.getDiscNumcCsr|jr |jS|j}|jj ¡rH|jrH|j d¡rHtj  |  ¡|  d¡¡S|  ¡s\tj  |¡}tj  |j|  d¡¡S)z› Package's location in the filesystem. For packages in remote repo returns where the package will be/has been downloaded. úfile://ú/)rrr*r ÚisLocalÚbaseurlÚ startswithÚosÚpathÚjoinZget_local_baseurlÚlstripÚ _is_local_pkgÚbasenameÚpkgdir)rÚlocrrrr0s zPackage.localPkg©ÚhttpÚftpÚfileÚhttpscCs>|js |jrdS|jr.tj |j|j d¡¡S|j  |j|¡S)a The location from where the package can be downloaded from. Returns None for installed and commandline packages. :param schemes: list of allowed protocols. Default is ('http', 'ftp', 'file', 'https') :return: location (string) or None Nr_) r'rrarcrdrerrfr*Úremote_location)rZschemesrrrrp$s zPackage.remote_locationcCsJ|jr dSd|jvr$|j d¡s$dS|jpH|jj ¡oH|j pH|j d¡S)NTz://r^F)r'rrbrr*r r`rar%rrrrg3sÿzPackage._is_local_pkgcCs*|jj ¡r| ¡s|j ¡S|jjSdSr)r*r r`rgZ cache_pkgdirrir%rrrri<s zPackage.pkgdircCs0|jdurdS|j\}}t |¡t |¡ ¡fS)z] Return the chksum type and chksum string how the legacy yum expects it. N)NN)r!rZ chksum_namerr3Údecode)rrrrrrÚ returnIdSumDs  zPackage.returnIdSumc Csx|jrtdƒ‚|jrdS| ¡\}}ztj || ¡|¡WStjj yr}zt j   t |ƒ¡‚WYd}~n d}~00dS)Nz$Can not verify an installed package.T)r'Ú ValueErrorrrrrrZchecksum_checkr0rrrrrr)rrrr rrrÚverifyLocalPkgNs zPackage.verifyLocalPkg)rk),Ú__name__Ú __module__Ú __qualname__Ú__doc__r=r>r Úpropertyr!Úsetterrr'r+r-r/r2r4r:r@rBrFrGrIrKrOr*rPrQrRr rMrNrUrZr[r\r]r0rprgrirrrtÚ __classcell__rrrrr*sˆ                              r)rxZ __future__rrZdnf.i18nrrZdnf.exceptionsrZdnf.rpmZ dnf.yum.miscrZ libdnf.errorrZ libdnf.utilsZloggingrcr.Z getLoggerÚloggerrrrrrÚs