diff --git a/dicos/04_maj.xml b/dicos/04_maj.xml
index c716de0..8d312e5 100644
--- a/dicos/04_maj.xml
+++ b/dicos/04_maj.xml
@@ -7,16 +7,24 @@
-
+
+
1500
+
+
+ additional_repository_global_priority
+ additional_repository_exempted_packages
+
+ Une valeur supérieure à 500 (valeur par défaut) rend moins prioritaire les paquets du dépôt, une valeur inférieure, plus prioritaire
+ Liste des paquets séparés par des espaces dont la priorité sera celle par défaut plutôt que celle définie globalement pour le dépôt
diff --git a/tmpl/99-additional_repositories b/tmpl/99-additional_repositories
index 05fe0ca..8ed6deb 100644
--- a/tmpl/99-additional_repositories
+++ b/tmpl/99-additional_repositories
@@ -7,9 +7,24 @@
%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
-
+%set %%repositories_detail = {'name': r.additional_repository_name, 'source': r.additional_repository_source, 'priority': 500, 'execptions': [] for r in %%getVar('additional_repository_name')}
+%for %%priority_target in %%getVar('additional_repository_priority_target', [])
+ %if %%priority_target.additional_priority_target in %%repositories_detail
+ %silent %%repositories_detail[%%priority_target.additional_repository_priority_target]['priority'] = %%priority_target.additional_repository_global_priority
+ %silent %%repositories_detail[%%priority_target.additional_repository_priority_target]['exceptions'] = %%priority_target.additional_repository_exempted_packages.split()
+ %end if
%end for
+
+
+%for %%repository in %%repositories_detail
+Package: *
+Pin: release %%repository_identification(%%repository['source'])
+Pin-Priority: %%repository['priority']
+
+ %for %%exception in %%repositories_detail[%%repository]['exceptions']
+Package: %%exception
+Pin: release %%repository_identification(%%repository['source'])
+Pin-Priority: 500
+ %end for
+%end for
+