[elbe-devel] [PATCH 4/4] virtapt/get_uri: return unique list

Manuel Traut manut at linutronix.de
Thu Feb 28 13:30:11 CET 2019


Currently the returned list can include the same URI multiple times.

This makes no sense and leads to a follow up error in the SDK
generation:

  - iterate over list and download packages
  - iterate over list
      - extract package
      - delete package

The extraction in the 2nd loop for the 2nd entry of the same
package is not possible, because the package was deleted before.

Signed-off-by: Manuel Traut <manut at linutronix.de>
---
 elbepack/virtapt.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elbepack/virtapt.py b/elbepack/virtapt.py
index 568779b0..e382c688 100644
--- a/elbepack/virtapt.py
+++ b/elbepack/virtapt.py
@@ -267,7 +267,7 @@ class VirtApt(object):
                     deps.append(lookup_uri(self, d, p))
                     togo.append(p)
 
-        return deps
+        return list(set(deps))
 
 class MyMan(BaseManager):
     pass
-- 
2.20.1




More information about the elbe-devel mailing list