Summary: | emirrordist: DeletionTask removes only real file but not symlink | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Michał Górny <mgorny> |
Component: | Unclassified | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | InVCS |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 697734 |
Description
Michał Górny
2019-10-17 04:18:34 UTC
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=4e9f04a1e11e84a8c513ee334cf2bc1c013d8c11 commit 4e9f04a1e11e84a8c513ee334cf2bc1c013d8c11 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2019-10-17 12:05:30 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2019-10-17 18:08:58 +0000 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> lib/portage/_emirrordist/DeletionTask.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e441cb24d4c4c35fec539158904dd7093e4874d commit 6e441cb24d4c4c35fec539158904dd7093e4874d Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2019-10-18 04:13:57 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2019-10-18 04:16:33 +0000 sys-apps/portage: Revbump to 2.3.77-r1 for bug 697906 Closes: https://bugs.gentoo.org/697906 Package-Manager: Portage-2.3.77, Repoman-2.3.17 Signed-off-by: Zac Medico <zmedico@gentoo.org> sys-apps/portage/{portage-2.3.77.ebuild => portage-2.3.77-r1.ebuild} | 3 +++ 1 file changed, 3 insertions(+) (In reply to Michał Górny from comment #0) > 2. DeletionIterator operates based on the result of stat(). However, > stat()'s going to fail for stale symlinks. I think we should special-case > that to support stale symlink cleanup. The DeletionTask patch should prevent stale symlinks yes? I suppose we could still change DeletionIterator to handle stale symlinks anyway... (In reply to Zac Medico from comment #3) > (In reply to Michał Górny from comment #0) > > 2. DeletionIterator operates based on the result of stat(). However, > > stat()'s going to fail for stale symlinks. I think we should special-case > > that to support stale symlink cleanup. > > The DeletionTask patch should prevent stale symlinks yes? I suppose we could > still change DeletionIterator to handle stale symlinks anyway... Yes, that's why I said it's sufficient for a bugfix release. But I'd like to fix it fully anyway. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=dc095fc06d323849a6fe47ae3391bc0356439b65 commit dc095fc06d323849a6fe47ae3391bc0356439b65 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2019-10-20 10:22:11 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2019-10-21 08:09:31 +0000 emirrordist: Clean dangling symlinks up Bug: https://bugs.gentoo.org/697906 Reviewed-by: Zac Medico <zmedico@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org> lib/portage/_emirrordist/DeletionIterator.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ecbfeae408f1bdcfa4241a3f4001d57cf30c3405 commit ecbfeae408f1bdcfa4241a3f4001d57cf30c3405 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2019-10-21 19:12:06 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2019-10-21 19:16:01 +0000 sys-apps/portage: Bump to version 2.3.78 #697566 fetch: Use FETCHCOMMAND to fetch mirror layout.conf #697890 emirrordist: Fix DeletionTask layout assumptions #697906 emirrordist: Delete potential symlinks for all layouts #698046 make.globals: Change FETCHCOMMAND_RSYNC to --copy-links Bug: https://bugs.gentoo.org/697734 Bug: https://bugs.gentoo.org/697566 Bug: https://bugs.gentoo.org/697890 Bug: https://bugs.gentoo.org/697906 Bug: https://bugs.gentoo.org/698046 Package-Manager: Portage-2.3.78, Repoman-2.3.17 Signed-off-by: Zac Medico <zmedico@gentoo.org> sys-apps/portage/Manifest | 1 + sys-apps/portage/portage-2.3.78.ebuild | 261 +++++++++++++++++++++++++++++++++ 2 files changed, 262 insertions(+) |