[elbe-devel] [PATCH v3 10/52] repomanager: add force option to RepoBase.include()

dion at linutronix.de dion at linutronix.de
Thu Jun 27 14:44:24 CEST 2019


From: Torben Hohn <torben.hohn at linutronix.de>

analogue to how pbuilder operates, before changes are inserted,
the relevant packages are removed first.

Do that in any case, because adding old packages results in NOP
instead of an error. So we really want to remove em first.

Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
Reviewed-by: Kurt Kanzenbach <kurt at linutronix.de>
---
 elbepack/repomanager.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/elbepack/repomanager.py b/elbepack/repomanager.py
index 34319bfc..1969c8f9 100644
--- a/elbepack/repomanager.py
+++ b/elbepack/repomanager.py
@@ -306,7 +306,9 @@ class RepoBase(object):
             else:
                 raise ce
 
-    def include(self, path, component="main"):
+    def include(self, path, component="main", force=False):
+        if force:
+            self._remove(path, self.repo_attr.codename, component)
         self._include(path, self.repo_attr.codename, component)
 
     def remove(self, path, component="main"):
-- 
2.11.0




More information about the elbe-devel mailing list