a c8h@s|ddlZddlZddlmZddlmZddlZejdddZe edsPeje_ ej Z dd Z d d Z dd d ZddZdS)N)sstr) transactionzrhn-client-toolsT)fallbackugettextcKsNt}|}|D]}||tj||qg}|D]}||q:|S)z@ just cause this is such a potentially useful looking method... )rinitReadOnlyTransactiondbMatchkeyspatternrpmZ RPMMIRE_GLOBappend)kwargs_tsmikeywordZ headerListhr;/usr/lib/python3.9/site-packages/up2date_client/rpmUtils.pyinstalledHeaderByKeywords  rcCspi}g}g}|D]T}|d|d|d|dd}|D]"}||dksX||dkr<||=q|d rt|d | d <|dr2t|d| d<|| n || |dkr\||||d}qZ|jddd|S)z| Return list of packages. Package is hash with keys name, epoch, version, release and optionaly arch and cookie Nz0Getting list of packages installed on the systemrrrrrr installtime)rrrrr-rz%srZcookiecSs|d|d|d|dfS)Nrrrrr)xrrrz)getInstalledPackageList..)r&)_rrrrr sort) Z msgCallbackZprogressCallbackZgetArchZgetInfoZpkg_listr counttotalrr$rrrgetInstalledPackageListlsR                 r5cCs0zttjWnty*tdYn0dS)zSet rpm's verbosity mode z4extra verbosity not supported in this version of rpmN)r Z setVerbosityZ RPMLOG_DEBUGAttributeErrorprintrrrrsetDebugVerbositys r8)NNNN)rr Zrhn.i18nrZup2date_clientrgettext translationthasattrrr1rr,r5r8rrrrs    B :