grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026a ©!cËdã@sÀddlmZddlmZddlmZddlZddlZddlmZddlZ ddl Z dZ dZ de e fZ Gdd„de jjƒZGd d „d e jjƒZGd d „d eƒZd d„Zdd„ZGdd„deƒZdS)é)Úabsolute_import)Úprint_function)Úunicode_literalsN)Ú_ú%s.%scseZdZ‡fdd„Z‡ZS)ÚTransactionErrorcstt|ƒ |¡dS©N)ÚsuperrÚ__init__)ÚselfÚmsg©Ú __class__©ú6/usr/lib/python3.9/site-packages/dnf/transaction_sr.pyr /szTransactionError.__init__©Ú__name__Ú __module__Ú __qualname__r Ú __classcell__rrr rr.srcseZdZ‡fdd„Z‡ZS)ÚTransactionReplayErrorcsr||_t|ttfƒr||_n|g|_|r:tdƒj|d�}ntdƒ}|jD]}|dt|ƒ7}qHtt |ƒ  |¡dS)z§ :param filename: The name of the transaction file being replayed :param errors: a list of error classes or a string with an error description zWThe following problems occurred while replaying the transaction from file "{filename}":)Úfilenamez :returns: the loaded data of the transaction )r`©r rrrÚget_dataszTransactionReplay.get_datacCs|jS)zW :returns: an array of warnings gathered during the transaction replay )rTr¦rrrÚ get_warnings szTransactionReplay.get_warningsc Cs„|j}g}|jD]B}z| |¡WqtyP}z| |¡WYd}~qd}~00q|jD�]€}�z|d}|d}ztj |d¡}WnHtj j yÐ}z,| tt |ƒƒ¡WYd}~WqZWYd}~n d}~00|dkrî|  |||d¡nv|dk�r |  |||d¡nX|dk�r*| |||d¡n:|d k�rH| |||d¡n| ttd ƒj||d �ƒ¡WqZt�y¬}z,| ttd ƒj|jd d�ƒ¡WYd}~qZd}~0t�yÚ}z| |¡WYd}~qZd}~00qZ|jD�]ˆ} �z | d}| d} ztj | d¡}WnLtj j �y^}z.| tt |ƒƒ¡WYd}~W�qäWYd}~n d}~00|dk�r~| | || d¡nv|dk�rœ| | || d¡nX|dk�rº| | || d¡n:|d k�rØ| | || d¡n| ttdƒj|| d�ƒ¡Wntt�y<}z,| ttdƒj|jd d�ƒ¡WYd}~n8d}~0t�yj}z| |¡WYd}~n d}~00�qä|�r€t||ƒ‚dS)z* Replays the transaction. Nr*r.r0rrr/rsrxrvz@Unexpected value of group action "{action}" for group "{group}".)r*rAz&Missing object key "{key}" in a group.rrjr4zJUnexpected value of environment action "{action}" for environment "{env}".)r*rDz-Missing object key "{key}" in an environment.)rKrcr‡rr:rer<r=r�rrŽrr•r˜ršrœrrryrzrfr¡r£r¤r¥r) r r]rr†r(rBr*r�r�rEr�rrrÚruns‚ " $   ÿÿ ÿ" &    ÿÿ ÿ$zTransactionReplay.runc Cs>|jjs dSg}|jjD�] }z |j}Wn0tyX}zWYd}~qWYd}~n d}~00t|ƒ}||jvrÀ|jrŽ|jtjj tjj tjj fvrÀt dƒj |d�}|js´| t|ƒ¡n |j |¡z>|j|}|jtjjtjjfvsötj ||j¡dkrü||_Wqt�y$}z WYd}~qd}~00q|�r:t|j|ƒ‚dS)zÿ Sets reasons in the transaction history to values from the stored transaction. Also serves to check whether additional packages were pulled in by the transaction, which results in an error (unless ignore_extras is True). NzgPackage nevra "{nevra}", which is not present in the transaction file, was pulled into the transaction.rnr)rJr=rCryrrRrLr*r<ZTransactionItemAction_UPGRADEDZ TransactionItemAction_DOWNGRADEDZ!TransactionItemAction_REINSTALLEDrrrMr:rrTrSZTransactionItemAction_INSTALLZTransactionItemAction_REMOVEZTransactionItemReasonComparer,rrK)r rr@rCr(r+r Z replay_reasonrrrÚpost_transaction`sD "  ýþ  þý z"TransactionReplay.post_transaction)rINFFF)rrrÚ__doc__r rUrVrgrdrar‡r“r•r˜ršrœrŸr¡r£r¤r¥r§r¨r©rªrrrrrH·s6 ù '   a   (   OrH)Z __future__rrrr<r|Zdnf.i18nrZdnf.exceptionsr‚rZr&Z VERSION_MINORr8Ú exceptionsrŽrrrr)rGÚobjectrHrrrrÚs     K