[Blends-commit] [Git][blends-team/blends][master] 3 commits: Basically add Conflicts and Breaks relationships

Andreas Tille (@tille) gitlab at salsa.debian.org
Sun Aug 27 18:39:33 BST 2023



Andreas Tille pushed to branch master at Debian Blends Team / blends


Commits:
4da66604 by Dominik George at 2023-08-27T09:28:58+00:00
Basically add Conflicts and Breaks relationships

- - - - -
388be5bc by Dominik George at 2023-08-27T10:18:24+00:00
Amend d/changelog

- - - - -
4408f93e by Andreas Tille at 2023-08-27T17:39:26+00:00
Merge branch 'feature/support-conflicts' into 'master'

Support Conflicts and Breaks

See merge request blends-team/blends!14
- - - - -


3 changed files:

- blends.py
- debian/changelog
- devtools/tasks_diff


Changes:

=====================================
blends.py
=====================================
@@ -252,8 +252,8 @@ class Task:
             self.format_upgraded = True
 
         # Create package dependencies
-        dep_types = ["Depends", "Recommends", "Suggests"]
-        dep_attrs = ["dependencies", "recommends", "suggests"]
+        dep_types = ["Depends", "Recommends", "Suggests", "Conflicts", "Breaks"]
+        dep_attrs = ["dependencies", "recommends", "suggests", "conflicts", "breaks"]
         for dep_type, dep_attr in zip(dep_types, dep_attrs):
             setattr(self, dep_attr, list(itertools.chain(
                 *(list(Dependency(dep_type, s.strip(), par)
@@ -380,6 +380,14 @@ class Task:
             d['Suggests'] = ",\n          ".join(sorted(
                 set(d.rawstr for d in self.suggests)
             ))
+        if self.conflicts:
+            d['Conflicts'] = ",\n           ".join(sorted(
+                set(d.rawstr for d in self.conflicts)
+            ))
+        if self.breaks:
+            d['Breaks'] = ",\n        ".join(sorted(
+                set(d.rawstr for d in self.breaks)
+            ))
         d['Description'] = self.summary + '\n ' + \
             "\n ".join(self.description.replace("\n\n", "\n.\n").split("\n"))
         return d


=====================================
debian/changelog
=====================================
@@ -1,7 +1,12 @@
 blends (0.7.6) UNRELEASED; urgency=medium
 
+  [ Gianfranco Costamagna ]
   * Add "ubuntu devel", an alias for the latest development release
 
+  [ Dominik George ]
+  * Add support for Conflicts and Breaks in task meta-packages
+    (Closes: #1050621)
+
  -- Gianfranco Costamagna <locutusofborg at debian.org>  Mon, 06 Jun 2022 09:32:29 +0200
 
 blends (0.7.5) unstable; urgency=medium


=====================================
devtools/tasks_diff
=====================================
@@ -76,7 +76,7 @@ def load_task(path_to_task):
 	task = os.path.basename(path_to_task)
 	taskinfo = {}
 
-	for header in ["depends", "suggests", "recommends", "ignore", "avoid"]:
+	for header in ["depends", "suggests", "recommends", "conflicts", "breaks", "ignore", "avoid"]:
 		taskinfo[header] = []
 
 	for paragraph in deb822.Sources.iter_paragraphs(ftask, shared_storage=False):
@@ -89,6 +89,12 @@ def load_task(path_to_task):
 		if "recommends" in paragraph:
 			taskinfo["recommends"] += clean_up_packages(paragraph["recommends"])
 
+        if "conflicts" in paragraph:
+			taskinfo["conflicts"] += clean_up_packages(paragraph["conflicts"])
+
+        if "breaks" in paragraph:
+			taskinfo["breaks"] += clean_up_packages(paragraph["breaks"])
+
 		if "ignore" in paragraph:
 			taskinfo["ignore"] += clean_up_packages(paragraph["ignore"])
 
@@ -111,7 +117,7 @@ def compare_tasks(tasks, tasks_compare, taskprefix):
 		
 		task_first = True 
 		first_add = True
-		for header in ["depends", "recommends", "suggests", "ignore", "avoid"]:
+		for header in ["depends", "recommends", "suggests", "conflicts", "breaks", "ignore", "avoid"]:
 			added =  set(tasks[task][header]) - set(tasks_compare[task][header])
 			if added:
 				if first_print:
@@ -128,7 +134,7 @@ def compare_tasks(tasks, tasks_compare, taskprefix):
 				print(", ".join(added))
 		
 		first_remove = True
-		for header in ["depends", "recommends", "suggests", "ignore", "avoid"]:
+		for header in ["depends", "recommends", "suggests", "conflicts", "breaks", "ignore", "avoid"]:
 			removed =  set(tasks_compare[task][header]) - set(tasks[task][header])
 			if removed:
 				if first_print:



View it on GitLab: https://salsa.debian.org/blends-team/blends/-/compare/b643bb0b41a5de3c3f1e002e360b5a48d486b0b7...4408f93e5cd4eb7d65eb7611ce24f018c56ffa86

-- 
View it on GitLab: https://salsa.debian.org/blends-team/blends/-/compare/b643bb0b41a5de3c3f1e002e360b5a48d486b0b7...4408f93e5cd4eb7d65eb7611ce24f018c56ffa86
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/blends-commit/attachments/20230827/4434b0a6/attachment-0001.htm>


More information about the Blends-commit mailing list