1 |
Unlink for all distfile layouts rather than for all but primary. This |
2 |
wrongly assumed that the primary layout will always be removed |
3 |
as a result of earlier code. However, the rename() call correctly |
4 |
assumes that the primary layout may be an old symlink, and operates |
5 |
on realpath(). Therefore, the real file from a secondary layout may |
6 |
be renamed, leaving dangling symlink. |
7 |
|
8 |
Bug: https://bugs.gentoo.org/697906 |
9 |
Signed-off-by: Michał Górny <mgorny@g.o> |
10 |
--- |
11 |
lib/portage/_emirrordist/DeletionTask.py | 2 +- |
12 |
1 file changed, 1 insertion(+), 1 deletion(-) |
13 |
|
14 |
diff --git a/lib/portage/_emirrordist/DeletionTask.py b/lib/portage/_emirrordist/DeletionTask.py |
15 |
index db5ac5ffb..a4bb29419 100644 |
16 |
--- a/lib/portage/_emirrordist/DeletionTask.py |
17 |
+++ b/lib/portage/_emirrordist/DeletionTask.py |
18 |
@@ -102,7 +102,7 @@ class DeletionTask(CompositeTask): |
19 |
|
20 |
def _delete_links(self): |
21 |
success = True |
22 |
- for layout in self.config.layouts[1:]: |
23 |
+ for layout in self.config.layouts: |
24 |
distfile_path = os.path.join( |
25 |
self.config.options.distfiles, |
26 |
layout.get_path(self.distfile)) |
27 |
-- |
28 |
2.23.0 |