ó
È”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 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-DEB Repositorys#   
Repositories created for APT-DEB.
t   baseurls   Base URLs0   Base URL of repository, where dists/ is located.t   distributiont   Distributions   Distribution to use.t
   componentst
   Componentst    s#   Space separated list of components.t   fingerprintt   Fingerprints+   GPG fingerprint of key signing the channel.t   keyringt   Keyrings^   If provided, channel must necessarily be signed by a key in the GPG keyring at the given path.t   trustdbt   Trustdbs[   If provided, channel will be checked for a key in the GPG trust database at the given path.c         C   sQ  d d  l  } g  } | j j |  d ƒ } | j j | ƒ s= g  Sxd  g | j | ƒ D]õ} | rx | j j | | ƒ } n | } | j j | j j | d ƒ ƒ s¥ qT n  i  } xi t | j j | d ƒ ƒ D]L } | j d ƒ rÇ | d } x* | j	 ƒ  j
 d ƒ D] }	 t | |	 <qü WqÇ qÇ Wx? | j ƒ  D]1 }	 | j j | j j | |	 ƒ ƒ s$| |	 =q$q$W| rT | rˆd }
 |
 |  t | j ƒ  ƒ 7}
 n d }
 |
 |  7}
 d j | j ƒ  ƒ } i |
 d	 6| d
 6} | rÔ| | d <n  | r9| j j | j ƒ  d ƒ } | j j | ƒ r9t | ƒ } | j ƒ  j	 ƒ  | d <| j ƒ  q9n  | j | ƒ qT qT W| S(   Niÿÿÿÿt   distst   Releases   Components: i   t    s   localmedia://s   file://R   R   R   s
   .disk/infot   name(   t   ost   patht   joint   isdirt   Nonet   listdirt   isfilet   opent
   startswitht   stript   splitt   Truet   keyst   lent   getMountPointt   readt   closet   append(   R   t   mediaR   t   channelst	   distspatht   distt   distpathR   t   entryt	   componentR   t   channelt   infofilet   file(    (    s?   /usr/lib/python2.7/dist-packages/smart/channels/apt_deb_info.pyt   detectLocalChannels/   sL    !"
!
N(	   t   smartR    t   kindR   t   descriptiont   strR   t   fieldsR.   (    (    (    s?   /usr/lib/python2.7/dist-packages/smart/channels/apt_deb_info.pyt   <module>   s"   	