aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2019-10-17 14:05:30 +0200
committerMichał Górny <mgorny@gentoo.org>2019-10-17 20:08:58 +0200
commit4e9f04a1e11e84a8c513ee334cf2bc1c013d8c11 (patch)
tree3d865904ba4d4d17057e30df867d7098fa024e03 /lib/portage/_emirrordist/DeletionTask.py
parentAdd python-3.8, drop python-3.4 from testing (diff)
downloadportage-4e9f04a1e11e84a8c513ee334cf2bc1c013d8c11.tar.gz
portage-4e9f04a1e11e84a8c513ee334cf2bc1c013d8c11.tar.bz2
portage-4e9f04a1e11e84a8c513ee334cf2bc1c013d8c11.zip
emirrordist: Delete potential symlinks for all layouts
Unlink for all distfile layouts rather than for all but primary. This wrongly assumed that the primary layout will always be removed as a result of earlier code. However, the rename() call correctly assumes that the primary layout may be an old symlink, and operates on realpath(). Therefore, the real file from a secondary layout may be renamed, leaving dangling symlink. Bug: https://bugs.gentoo.org/697906 Reviewed-by: Zac Medico <zmedico@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'lib/portage/_emirrordist/DeletionTask.py')
-rw-r--r--lib/portage/_emirrordist/DeletionTask.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/portage/_emirrordist/DeletionTask.py b/lib/portage/_emirrordist/DeletionTask.py
index db5ac5ffb..a4bb29419 100644
--- a/lib/portage/_emirrordist/DeletionTask.py
+++ b/lib/portage/_emirrordist/DeletionTask.py
@@ -102,7 +102,7 @@ class DeletionTask(CompositeTask):
def _delete_links(self):
success = True
- for layout in self.config.layouts[1:]:
+ for layout in self.config.layouts:
distfile_path = os.path.join(
self.config.options.distfiles,
layout.get_path(self.distfile))