File: //lib/yum-plugins/search-disabled-repos.pyc
�
L��ec @` s� d d l m Z m Z m Z d d l Z d d l Z d d l m Z d d l m Z m
Z
d d l m Z d d l
m Z d Z e e
f Z d Z d Z e a g a d
� Z d � Z d � Z d � Z d � Z d � Z d S( i ( t print_functiont divisiont absolute_importN( t api( t TYPE_COREt TYPE_INTERACTIVE( t TS_INSTALL_STATES( t Errorss 2.7s0 /etc/yum/pluginconf.d/search-disabled-repos.confs *debug-rpmss *source-rpmss
*beta-rpmss *htb-rpmsc ` sp | j s
d S| j � } | j d d d t �� t � f d � t | j j � � D� � } | sf d S| j d d d t �} | r� t
| � d St | � rl| j t
j d � t a t d � | j � D� � a x� | D]| } | j � y1 | j d | j � | j t
j d | j � Wq� t j k
rU| j � | j t
j d
| j � q� Xq� Wt | j � _ n d S( Nt maint
ignored_repost defaultc 3` s. | ]$ } | j r t | � � r | Vq d S( N( t enabledt is_repo_important( t .0t repo( R ( s- /usr/lib/yum-plugins/search-disabled-repos.pys <genexpr>. s t notify_onlysL Depsolving failed due to missing dependencies, temporarily enabling repos...c s` s | ] } | j Vq d S( N( t id( R
R ( ( s- /usr/lib/yum-plugins/search-disabled-repos.pys <genexpr>= s t whichs Repo temporarily enabled: %ss% Failed to temporarily enable repo: %s( t missing_requirest getRepost confListt DEFAULT_IGNORED_REPOSt sett listt repost valuest confBoolt Truet suggest_enablingt prompt_temporarily_enable_repost infot loggingt DEBUGt attemptedt listEnabledt old_enabled_repost enablet populateSackR R t RepoErrort disablet getTsInfot changed( t conduitt repo_storaget disabled_reposR R ( ( R s- /usr/lib/yum-plugins/search-disabled-repos.pyt postresolve_hook( s0 +
"c C` s� t s
d St d � | j � j d t � D� � } | t } t | | � r� xu | D]j } y t j | � } Wn t k
r� d } n X| r� | j
t j d | � qR | j
t j d | � qR Wn d S( Nc s` s | ] } | j Vq d S( N( t repoid( R
t p( ( s- /usr/lib/yum-plugins/search-disabled-repos.pys <genexpr>M s t
output_statesi s Repo permanently enabled: %ss% Failed to permanently enable repo: %s(
R! R R( t getMembersWithStateR R# t prompt_permanently_enable_reposR t enable_yum_repositoriest ExceptionR R R ( R* t
used_repost helpful_new_reposR R ( ( s- /usr/lib/yum-plugins/search-disabled-repos.pyt postverifytrans_hookI s (
c ` s. � j d k r t St � f d � | D� � S( Ns /etc/yum.repos.d/redhat.repoc 3` s$ | ] } t j � j | � Vq d S( N( t fnmatchR ( R
t pattern( R ( s- /usr/lib/yum-plugins/search-disabled-repos.pys <genexpr>a s ( t repofilet Falset any( R R ( ( R s- /usr/lib/yum-plugins/search-disabled-repos.pyR ] s c C` s( | j � d t } | j d | � d S( NsP
**********************************************************************
yum can be configured to try to resolve such errors by temporarily enabling
disabled repos and searching for missing dependencies.
To enable this functionality please set 'notify_only=0' in %s
**********************************************************************
i ( t pretty_output_restringt PLUGIN_CONF_PATHR ( R* t msg( ( s- /usr/lib/yum-plugins/search-disabled-repos.pyR d s c C` s) | j � d } d } | j | d | �S( Ns�
**********************************************************************
Dependency resolving failed due to missing dependencies.
Some repositories on your system are disabled, but yum can enable them
and search for missing dependencies. This will require downloading
metadata for disabled repositories and may take some time and traffic.
**********************************************************************
s. Enable all repositories and try again? [y/N]: t prompt( R= t promptYN( R* R? R@ ( ( s- /usr/lib/yum-plugins/search-disabled-repos.pyR m s c C` s<