+
    é
4iV$  ã                   óâ   € R t ^ RIt^ RIt^ RIHtHtHtHtHtH	t	 ^t
RRRRRRR	R
/t]P                  ! R4      t ! R R]4      t ! R R]4      tR R ltR R lt ! R R4      t ! R R4      tR# )z'Functions for working with watch files.N)ÚIterableÚIteratorÚListÚOptionalÚSequenceÚTextIOz@ANY_VERSION@z[-_]?(\d[\-+\.:\~\da-zA-Z]*)z@ARCHIVE_EXT@z2(?i)\.(?:tar\.xz|tar\.bz2|tar\.gz|zip|tgz|tbz|txz)z@SIGNATURE_EXT@zL(?i)\.(?:tar\.xz|tar\.bz2|tar\.gz|zip|tgz|tbz|txz)\.(?:asc|pgp|gpg|sig|sign)z	@DEB_EXT@z%[\+~](debian|dfsg|ds|deb)(\.)?(\d+)?$zdebian.watchc                   ó   € ] tR t^7tRtRtR# )ÚMissingVersionzThe version= line is missing.© N©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__r
   ó    Ú./usr/lib/python3/dist-packages/debian/watch.pyr	   r	   7   s   † Ý'r   r	   c                   ó   € ] tR t^;tRtRtR# )ÚWatchFileFormatErrorz(Raised when the input is not valid.
    r
   Nr   r
   r   r   r   r   ;   s   † õr   r   c                ó<   € V ^8„  d   QhR\         R\         R\         /# )é   ÚtextÚpackageÚreturn©Ústr)Úformats   "r   Ú__annotate__r   @   s!   € ÷ ñ ”ð œsð ¤sñ r   c                óœ   € \        \        P                  4       4      pWR&   VP                  4        F  w  r4V P                  W44      p K  	  V # )z Apply substitutions to a string.

:param text: text to apply substitutions to
:param package: package name, as a string
:return: text with subsitutions applied
z	@PACKAGE@)ÚdictÚSUBSTITUTIONSÚitemsÚreplace)r   r   ÚsubstsÚkÚvs   &&   r   Úexpandr'   @   sF   € ô ”-×%Ñ%Ó'Ó(€Fð "ˆ;ÑØ—‘–‰ˆØ�|‰|˜AÓ!Šñ à€Kr   c                ó4   € V ^8„  d   QhR\         R\        RR/# )r   ÚmsgÚstrictr   N)r   Úbool)r   s   "r   r   r   P   s!   € ÷ ñ ”3ð ¤ð ¨ñ r   c                 óV   € V'       d   \        V 4      h\        P                  V 4       R # ©N)r   ÚloggerÚwarning)r)   r*   s   &&r   Ú	_complainr0   P   s   € ßÜ" 3Ó'Ð'Ü
‡N�N�3Ör   c                   óT   a € ] tR t^Vt o RtRR]3R ltR tR t]	RR l4       t
RtV tR# )	Ú	WatchFilez®A Debian watch file.

:ivar entries: list of Watch entries
:ivar options: optional list of global options, applied to all Watch
    entries
:ivar version: watch file version
Nc                óB   € W0n         Vf   . pWn        Vf   . pW n        R # r-   )ÚversionÚentriesÚoptions)Úselfr5   r6   r4   s   &&&&r   Ú__init__ÚWatchFile.__init___   s'   € ð
 ŒØŠ?ØˆGØŒØŠ?ØˆGØŽr   c                ó,   € \        V P                  4      # r-   )Úiterr5   ©r7   s   &r   Ú__iter__ÚWatchFile.__iter__l   s   € ä�D—L‘LÓ!Ð!r   c                ó  € R pV P                   e#   VP                  RV P                   ,          4       V P                  '       d)   VP                  V! V P                  4      R,           4       V P                   EF  pVP                  '       d)   VP                  V! VP                  4      R,           4       VP                  VP                  4       VP
                  '       d#   VP                  RVP
                  ,           4       VP                   '       d#   VP                  RVP                   ,           4       VP                  '       d#   VP                  RVP                  ,           4       VP                  R4       EK	  	  R# )a'  Write the contents of a watch file to a file-like object.

Note that this will not preserve the formatting of the original file,
and thus it is currently not possible to use this function to
parse and reserialize a file and end up with the same contents.

:param f: File-like object to write to
c                 ór   € R P                  V 4      pRV9   g   RV9   d   RV,           R,           # RV,           # )Ú,Ú Ú	zopts="Ú"úopts=)Újoin)ÚoptsÚss   & r   Úserialize_optionsÚ)WatchFile.dump.<locals>.serialize_optionsz   s5   € à—‘˜“ˆAØ�aŒx˜4 1œ9Ø !•| cÕ)Ð)Ø˜Q•;Ðr   Nzversion=%d
Ú
rB   )r4   Úwriter6   r5   ÚurlÚmatching_patternÚscript)r7   ÚfrI   Úentrys   &&  r   ÚdumpÚWatchFile.dumpp   sø   € ò	ð �<‰<Ò#Ø�G‰G�N T§\¡\Õ1Ô2Ø�<�<ˆ<Ø�G‰GÑ% d§l¡lÓ3°dÕ:Ô;Ø—\•\ˆEØ�}�}ˆ}Ø—‘Ñ)¨%¯-©-Ó8¸3Õ>Ô?Ø�G‰G�E—I‘IÔØ×%×%Ð%Ø—‘˜˜e×4Ñ4Õ4Ô5Ø�}�}ˆ}Ø—‘˜˜eŸm™mÕ+Ô,Ø�|�|ˆ|Ø—‘˜˜eŸl™lÕ*Ô+Ø�G‰G�D�Mó "r   c                óÖ  € . p. pV F   pVP                  R4      '       d   K  VP                  4       '       g   K4  VP                  R4      P                  R4      '       d#   VP	                  VP                  R4      4       K|  VP	                  V4       VP	                  V4       . pK¢  	  V'       d   \        RV4       VP	                  V4       V'       g   R# RP                  VP                  ^ 4      4      p VP                  R^4      w  rxTP                  4       R	8w  d   \        4       h\        TP                  4       4      p	. p
. pT EF¾  pT	^8”  d   T Uu. uF  qÝP                  4       NK  	  ppRP                  T4      P                  4       pT'       g   KR  TP                  R
4      '       dy   T^,          R8X  d=   TP                  R^4      pTR8X  d   \        RT,          4      hT^T pY^^,           R pM TR,          P                  R^4      w  rõTP                  R4      pM. pT'       dÃ    TP                  R^4      w  pp\        P                  ! RT4      pT'       dR   \!        T^ ,          4      3\#        TP                  R^4      4      ,           pTR\%        T^ ,          4      ) ^,
           pM\#        TP                  R^4      4      pTP	                  \'        T.TO5RT/ 4       EK­  T
P)                  T4       EKÁ  	  T ! YºT	R7      #   \         d    \        4       hi ; iu upi   \         d    TR,          pRp EL5i ; i  \         d	    TpRp ELi ; i)a  Parse from the contents that make up a watch file.

:param lines: watch file lines to parse
:return: instance or None if there are no non-comment lines in the file
:raise MissingVersion: if there is no version number declared
:raise ValueError: when syntax errors are encountered
Ú#rK   Ú\z
\z*watchfile ended with \; skipping last lineNÚ Ú=r4   rE   rD   zNot matching " in %r:é   NNrA   z/([^/]*\([^/]*\)[^/]*)$rG   ©r5   r6   r4   éÿÿÿÿ)Ú
startswithÚstripÚrstripÚendswithÚappendr0   rF   ÚpopÚsplitÚ
ValueErrorr	   ÚintÚlstripÚindexÚreÚfindallr   ÚtupleÚlenÚWatchÚextend)ÚclsÚlinesr*   Újoined_linesÚ	continuedÚlineÚ	firstlineÚkeyÚvaluer4   Úpersistent_optionsr5   ÚchunkedÚchunkÚoptendÚopts_strrG   rM   ÚmÚpartss   &&&                 r   Ú
from_linesÚWatchFile.from_lines�   s  € ð ˆØˆ	ÛˆDØ�‰˜s×#Ò#ÙØ—:‘:—<’<ÙØ�{‰{˜4Ó ×)Ñ)¨$×/Ò/Ø× Ñ  §¡¨VÓ!4Ö5à× Ñ  Ô&Ø×#Ñ# IÔ.Ø’	ñ ÷ äÐCÀVÔLØ×Ñ 	Ô*ßÙØ—G‘G˜L×,Ñ,¨QÓ/Ó0ˆ	ð	#Ø"Ÿ™¨¨aÓ0‰JˆCð �9‰9‹;˜)Ô#Ü Ó"Ð"Ü�e—k‘k“mÓ$ˆØÐØˆÜ#ˆGØ˜Œ{ñ 8?Ó?±w¨eŸ<™<ž>±w�Ð?Ø—7‘7˜7Ó#×)Ñ)Ó+ˆDßÙØ�‰˜w×'Ò'Ø˜•7˜c”>Ø!ŸZ™Z¨¨QÓ/�FØ ”|Ü(Ð)?À$Õ)FÓGÐGØ# A f˜~�HØ q¥ 	˜?‘Dð"Ø+/°­8¯>©>¸$ÀÓ+BÑ(˜ð  —~‘~ cÓ*‘à�ßðØ $§
¡
¨4°Ó 3‘I�C˜ô —J’JÐ9¸3Ó?�ßÜ   1¥›Y˜M¬E°$·*±*¸TÀ1Ó2EÓ,FÕF�EØ˜m¤ A a¥D£	˜z¨!�|Ð,‘Cä! $§*¡*¨T°1Ó"5Ó6�EØ—‘œu SÐ<¨5Ò<°tÑ<×=à"×)Ñ)¨$×/ñM $ñN ØÀôJð 	Jøô] ô 	#Ü Ó"Ð"ð	#üò @øô &ô "Ø#'¨¥8˜Ø!›ð"ûô "ô Ø�CØ“Dðús6   Ã;L ÅL3ÈL8È9MÌL0Ì8MÍMÍM(Í'M(rZ   ©F)r   r   r   r   r   ÚDEFAULT_VERSIONr8   r=   rR   Úclassmethodr|   r   Ú__classdictcell__©Ú__classdict__s   @r   r2   r2   V   s=   ø‡ € ñð ØØ(ôò"òð@ óNJó öNJr   r2   c                   óF   a € ] tR t^ât o RtRR ltV 3R lR ltR tRtV t	R# )	rk   a3  Watch line entry.

This will contain the attributes documented in uscan(1):

:ivar url: The URL (possibly including the filename regex)
:ivar matching_pattern: a filename regex, optional
:ivar version: version policy, optional
:ivar script: script to run, optional
:ivar opts: a list of options, as strings
Nc                óN   € Wn         W n        W0n        W@n        Vf   . pWPn        R # r-   )rM   rN   r4   rO   r6   )r7   rM   rN   r4   rO   rG   s   &&&&&&r   r8   ÚWatch.__init__î   s(   € ð ŒØ 0ÔØŒØŒØŠ<ØˆDØŽr   c                ó    <€ V ^8„  d   QhRS[ /# )r   r   r   )r   rƒ   s   "€r   r   ÚWatch.__annotate__ý   s   ø€ ÷ :ñ :™#ñ :r   c                óÂ   € V P                   P                  : R V P                  : RV P                  : RV P                  : RV P
                  : RV P                  : R2# )Ú(z, matching_pattern=z
, version=z	, script=z, opts=Ú))Ú	__class__r   rM   rN   r4   rO   r6   r<   s   &r   Ú__repr__ÚWatch.__repr__ý   s<   € ð —‘×'Ô'¨¯¬°4×3HÔ3HØ—”˜dŸkœk¨4¯<¬<ð9ð	:r   c                ól  € \        V\        4      '       g   R # VP                  V P                  8H  ;'       d}    VP                  V P                  8H  ;'       d\    VP                  V P                  8H  ;'       d;    VP
                  V P
                  8H  ;'       d    VP                  V P                  8H  # r~   )Ú
isinstancerk   rM   rN   r4   rO   r6   )r7   Úothers   &&r   Ú__eq__ÚWatch.__eq__  s—   € ä˜%¤×'Ò'ÙØ—	‘	˜TŸX™XÑ%÷ .ð .Ø×&Ñ&¨$×*?Ñ*?Ñ?÷.ð .à—‘ §¡Ñ-÷.ð .ð —‘ §¡Ñ+÷.ð .ð —‘ §¡Ñ-ð		/r   )rN   r6   rO   rM   r4   )NNNN)
r   r   r   r   r   r8   r�   r’   r   r�   r‚   s   @r   rk   rk   â   s#   ø‡ € ñ	ô÷:ð :÷/ð /r   rk   )r   Úloggingrg   Útypingr   r   r   r   r   r   r   r!   Ú	getLoggerr.   Ú	Exceptionr	   rc   r   r'   r0   r2   rk   r
   r   r   Ú<module>r˜      s—   ðñ$ .ã Û 	÷÷ ð €ð
 Ð4ð ÐJð ð	&ð Ð9ð€ð  
×	Ò	˜>Ó	*€ô(�Yô (ô˜:ô õ
õ ÷IJñ IJ÷X)/ó )/r   