Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 766012 - sys-apps/portage: entry for old package remains in ${PKGDIR}/Packages following package move
Summary: sys-apps/portage: entry for old package remains in ${PKGDIR}/Packages followi...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Binary packages support (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 766117
Blocks:
  Show dependency tree
 
Reported: 2021-01-18 16:20 UTC by Zac Medico
Modified: 2021-03-31 20:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2021-01-18 16:20:50 UTC
This is easiest to observer when FEATURES=pkgdir-index-trusted is enabled. I ran emaint --fix movebin to apply this package move:

profiles/updates/1Q-2021:move app-emulation/libpod app-emulation/podman

Afterwards, emaint --check binhost shows that ${PKGDIR}/Packages still contains an entry for the old package:

# emaint --check binhost
Emaint: check binhost      100% [============================================>]

'app-emulation/libpod-2.2.1' is not in the repository
Comment 2 Larry the Git Cow gentoo-dev 2021-01-19 11:04:59 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=79106b8bbce8b7b27db14877ca63c75a1a4a32d3

commit 79106b8bbce8b7b27db14877ca63c75a1a4a32d3
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2021-01-19 09:23:50 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2021-01-19 11:02:53 +0000

    binarytree.move_ent: copy on write for package move
    
    Copy on write when applying package moves, and silently
    skip package moves when the same move has already been
    applied to the same build of the package. Since the old
    package instance is preserved, it avoids the problem
    of having entries for deleted packages remain in the
    package index. We can simply assume that the package
    will be deleted by eclean-pkg when its time comes.
    
    Bug: https://bugs.gentoo.org/766012
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/portage/dbapi/bintree.py              | 44 +++++++++++++++++++++++--------
 lib/portage/emaint/modules/move/move.py   | 13 +++++++--
 lib/portage/tests/update/test_move_ent.py |  7 ++---
 3 files changed, 48 insertions(+), 16 deletions(-)
Comment 3 Larry the Git Cow gentoo-dev 2021-01-19 11:16:59 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b03adb22f0432ee992aab733ce5dfa13e9b6801a

commit b03adb22f0432ee992aab733ce5dfa13e9b6801a
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2021-01-19 11:07:56 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2021-01-19 11:16:53 +0000

    sys-apps/portage: Bump to version 3.0.14
    
     #571126 KeyError during package moves "global updates" triggered by
             FEATURES=binpkg-multi-instance (same root cause as bug 765847)
     #739004 Add @changed-subslot package set
     #765847 Spurious package file renames during application of
             package moves with FEATURES=binpkg-multi-instance
     #766012 Copy on write when applying a package move to a binary
             package, so that the old version of a binary package
             will remain available until eclean-pkg deletes it
    
    Bug: https://bugs.gentoo.org/766117
    Bug: https://bugs.gentoo.org/571126
    Bug: https://bugs.gentoo.org/739004
    Bug: https://bugs.gentoo.org/765847
    Bug: https://bugs.gentoo.org/766012
    Package-Manager: Portage-3.0.14, Repoman-3.0.2
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-3.0.14.ebuild | 268 +++++++++++++++++++++++++++++++++
 2 files changed, 269 insertions(+)