Template pour le pinning de dépôt
This commit is contained in:
parent
91b4eefd24
commit
a4ab03368f
|
@ -0,0 +1,15 @@
|
|||
%import re
|
||||
%def repository_identification(%%repository)
|
||||
|
||||
%set %%repository_re = re.compile(r'^((deb)|(deb-src)) (\[ .* \] )?(((http)|(https)|(ftp)|(ftps))://(?P<url>\S+)) (?P<suite>(\S+))(?P<components>(( \S+)+)?)')
|
||||
%set %%elements = %%repository_re.match(%%repository).groupdict()
|
||||
%return 'o={},a={},c={}'.format(%%elements['url'].split('/')[0], %%elements['suite'], %%elements['components'].strip())
|
||||
%return %%repository
|
||||
%end def
|
||||
|
||||
%for %%repository in %%getVar('additional_repository_name', [])
|
||||
Package: *
|
||||
Pin: release %%repository_identification(%%repository.additional_repository_source)
|
||||
Pin-Priority: %%additional_repository_global_priority
|
||||
|
||||
%end for
|
Loading…
Reference in New Issue