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

Torben Hohn torben.hohn at linutronix.de
Wed May 29 16:34:11 CEST 2019


analogue to how pbuilder operates, before changes are inserted,
the relevant packages are remove 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>
---
 elbepack/repomanager.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/elbepack/repomanager.py b/elbepack/repomanager.py
index 34319bfc3..1969c8f91 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