Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 697890

Summary: emirrordist: DeletionTask._start() wrongly assumes layout 0 will always have the file
Product: Portage Development Reporter: Michał Górny <mgorny>
Component: UnclassifiedAssignee: Portage team <dev-portage>
Severity: normal Keywords: InVCS
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 697734    

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-10-16 21:03:47 UTC
Just a note to self: I've made a mistake of assuming that file from layout[0] will always be present.  I've generally assumed that it may be a symlink (hence the realpath()) but entirely missed the possibility that only layout[n>0] could exist.

This is not urgent but worth fixing for consistency with DeletionIterator.
Comment 2 Larry the Git Cow gentoo-dev 2019-10-21 13:38:54 UTC
The bug has been referenced in the following commit(s):

commit af9c77bd037694164755d06034a74456ec45e3ab
Author:     Michał Górny <>
AuthorDate: 2019-10-21 08:41:54 +0000
Commit:     Michał Górny <>
CommitDate: 2019-10-21 13:38:26 +0000

    emirrordist: Pass path from DeletionIterator to DeletionTask
    Since DeletionIterator needs to stat the distfile and therefore find
    one working path for it, pass it to DeletionTask instead of recomputing
    it there.  This also fixes wrongly assuming that first layout will
    always be correct.
    Reviewed-by: Zac Medico <>
    Signed-off-by: Michał Górny <>

 lib/portage/_emirrordist/ |  2 ++
 lib/portage/_emirrordist/     | 14 +++++---------
 2 files changed, 7 insertions(+), 9 deletions(-)
Comment 3 Larry the Git Cow gentoo-dev 2019-10-21 19:16:11 UTC
The bug has been referenced in the following commit(s):

commit ecbfeae408f1bdcfa4241a3f4001d57cf30c3405
Author:     Zac Medico <>
AuthorDate: 2019-10-21 19:12:06 +0000
Commit:     Zac Medico <>
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
    Package-Manager: Portage-2.3.78, Repoman-2.3.17
    Signed-off-by: Zac Medico <>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-2.3.78.ebuild | 261 +++++++++++++++++++++++++++++++++
 2 files changed, 262 insertions(+)