Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/_emirrordist/
Date: Thu, 17 Oct 2019 18:09:29
Message-Id: 1571335738.4e9f04a1e11e84a8c513ee334cf2bc1c013d8c11.mgorny@gentoo
1 commit: 4e9f04a1e11e84a8c513ee334cf2bc1c013d8c11
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Oct 17 12:05:30 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 17 18:08:58 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=4e9f04a1
7
8 emirrordist: Delete potential symlinks for all layouts
9
10 Unlink for all distfile layouts rather than for all but primary. This
11 wrongly assumed that the primary layout will always be removed
12 as a result of earlier code. However, the rename() call correctly
13 assumes that the primary layout may be an old symlink, and operates
14 on realpath(). Therefore, the real file from a secondary layout may
15 be renamed, leaving dangling symlink.
16
17 Bug: https://bugs.gentoo.org/697906
18 Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>
19 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
20
21 lib/portage/_emirrordist/DeletionTask.py | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24 diff --git a/lib/portage/_emirrordist/DeletionTask.py b/lib/portage/_emirrordist/DeletionTask.py
25 index db5ac5ffb..a4bb29419 100644
26 --- a/lib/portage/_emirrordist/DeletionTask.py
27 +++ b/lib/portage/_emirrordist/DeletionTask.py
28 @@ -102,7 +102,7 @@ class DeletionTask(CompositeTask):
29
30 def _delete_links(self):
31 success = True
32 - for layout in self.config.layouts[1:]:
33 + for layout in self.config.layouts:
34 distfile_path = os.path.join(
35 self.config.options.distfiles,
36 layout.get_path(self.distfile))