ó
È”Mc           @   s›   d  d l  m Z d Z e d ƒ Z e d ƒ Z d e d ƒ e d e d ƒ f d e d	 ƒ e d e d
 ƒ f d e d ƒ e d e d ƒ f g Z d „  Z d S(   iÿÿÿÿ(   t   _t   packages   APT-RPM Repositorys#   
Repositories created for APT-RPM.
t   baseurls   Base URLs7   Base URL of APT-RPM repository, where base/ is located.t
   componentst
   Componentss#   Space separated list of components.t   fingerprintt   Fingerprintt    s+   GPG fingerprint of key signing the channel.c         C   sê  d d  l  } g  } | j j | j j |  d ƒ ƒ ræi  } x„ | j | j j |  d ƒ ƒ D]d } | j d ƒ rX | d } | j d ƒ r“ | d  } n | j d ƒ r¯ | d	  } n  t | | <qX qX WxC | j ƒ  D]5 } | j j	 | j j |  d
 | ƒ ƒ sÍ | | =qÍ qÍ W| ræ| r5d } | |  t
 | j ƒ  ƒ 7} n d } | |  7} d j | j ƒ  ƒ } i | d 6| d 6} | rÓ| j j | j ƒ  d ƒ }	 | j j |	 ƒ rÓt |	 ƒ }
 |
 j ƒ  j ƒ  | d <|
 j ƒ  qÓn  | j | ƒ qæn  | S(   Niÿÿÿÿs   base/releaset   bases   pkglist.i   s   .bz2iüÿÿÿs   .gziýÿÿÿs   RPMS.s   localmedia://s   file://t    R   R   s
   .disk/infot   name(   t   ost   patht   isfilet   joint   listdirt
   startswitht   endswitht   Truet   keyst   isdirt   lent   getMountPointt   opent   readt   stript   closet   append(   R   t   mediaR   t   channelsR   t   entryt	   componentR   t   channelt   infofilet   file(    (    s?   /usr/lib/python2.7/dist-packages/smart/channels/apt_rpm_info.pyt   detectLocalChannels'   s>    !%
%
N(	   t   smartR    t   kindR
   t   descriptiont   strt   Nonet   fieldsR#   (    (    (    s?   /usr/lib/python2.7/dist-packages/smart/channels/apt_rpm_info.pyt   <module>   s   	