Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 698462 - app-portage/portage-utils - qmerge lacks preserve_old_lib/preserve_old_lib_notify pre/post hooks
Summary: app-portage/portage-utils - qmerge lacks preserve_old_lib/preserve_old_lib_no...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Fabian Groffen
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-24 17:34 UTC by Joakim Tjernlund
Modified: 2020-08-17 15:05 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 Joakim Tjernlund 2019-10-24 17:34:05 UTC
qmerge lacks pkg_preinst/pkg_postinst hooks for
preserve_old_lib and preserve_old_lib_notify

qmerge of sys-libs/readline-7.0 removes the *.so.6 libs that should
be preserved which is a pain experience
Comment 1 Arfrever Frehtes Taifersar Arahesis 2019-10-24 23:42:46 UTC
preserve_old_lib and preserve_old_lib_notify are functions defined in preserve-libs.eclass.

To not interfere with Portage's built-in functionality of preservation of libraries, these functions do nothing when FEATURES="... preserve-libs ..." is set:
https://gitweb.gentoo.org/repo/gentoo.git/tree/eclass/preserve-libs.eclass?id=e7b3670e435e5e4a7119bce5feaecc27ad46d097#n28
https://gitweb.gentoo.org/repo/gentoo.git/tree/eclass/preserve-libs.eclass?id=e7b3670e435e5e4a7119bce5feaecc27ad46d097#n53

Either qmerge needs to drop "preserve-libs" from ${FEATURES} value exported to ebuild environment (much easier) or qmerge needs to implement functionality equivalent to Portage's functionality (much harder).
Comment 2 Fabian Groffen gentoo-dev 2019-10-27 07:51:17 UTC
qmerge doesn't source eclasses afaict, it emulates a few minimal functions, such that it can install binpkgs without any dependencies (= tree).

Perhaps we can provide somewhat working versions for preserve_old_lib* functions, but I'm not sure if it's really feasible.
Comment 3 Joakim Tjernlund 2019-10-31 15:16:50 UTC
preserve_old_lib() and preserve_old_lib_notify() looks simple enough for including in qmerge I think.
But why were these integrated into FEATURES="... preserve-libs ..." ?
What difference is there?
Comment 4 Joakim Tjernlund 2019-11-01 15:59:17 UTC
(In reply to Fabian Groffen from comment #2)
> qmerge doesn't source eclasses afaict, it emulates a few minimal functions,
> such that it can install binpkgs without any dependencies (= tree).
> 
> Perhaps we can provide somewhat working versions for preserve_old_lib*
> functions, but I'm not sure if it's really feasible.

hmm, don't qmerge source envionment.bz2 in the binpkg ?
environment has all the pkg needs, including the definition of
preserve_old_lib and preserve_old_lib_notify

qmerge should just mask preserve-libs in FEATURES so the pkg can use
preserve_old_lib/preserve_old_lib_notify instead.
Comment 5 Joakim Tjernlund 2019-12-06 16:50:22 UTC
I think this is an serious problem with a simple workaround.
Any chance you can filter out preserve-libs form now?
Comment 6 Joakim Tjernlund 2020-08-11 12:19:30 UTC
ping
Comment 7 Fabian Groffen gentoo-dev 2020-08-11 12:21:31 UTC
patches/suggestions are welcome ...
Comment 8 Joakim Tjernlund 2020-08-11 13:03:41 UTC
(In reply to Fabian Groffen from comment #7)
> patches/suggestions are welcome ...

Right, the easy way in comment #1 is to drop preserve-libs
from FEATURES.

Perhaps auto appending "-preserve-libs" to FEATURES ?

Actually impl. preserve-libs, I have no idea ...
Comment 9 Fabian Groffen gentoo-dev 2020-08-11 13:05:26 UTC
hmmm, ok, that doesn't sound too hard to implement
Comment 10 Larry the Git Cow gentoo-dev 2020-08-17 13:08:54 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=48cbbded273c08965cd33a74048596339f6d61be

commit 48cbbded273c08965cd33a74048596339f6d61be
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2020-08-17 12:30:21 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2020-08-17 12:30:21 +0000

    qmerge: force FEATURES=-preserve-libs, bug #698462
    
    We do not support/implement preserve-libs feature (we could), so drop
    it from FEATURES such that preserve_old_libs kicks in for some of the
    crucial libs around.
    
    Bug: https://bugs.gentoo.org/698462
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 qmerge.c | 3 +++
 1 file changed, 3 insertions(+)
Comment 11 Larry the Git Cow gentoo-dev 2020-08-17 15:05:51 UTC
The bug has been closed via the following commit(s):

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

commit aa66d89f08797cc9d4f48e670fc277a57d1873bf
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2020-08-17 15:05:29 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2020-08-17 15:05:29 +0000

    app-portage/portage-utils-0.89: version bump
    
    Closes: https://bugs.gentoo.org/711896
    Closes: https://bugs.gentoo.org/698462
    Closes: https://bugs.gentoo.org/723422
    Package-Manager: Portage-2.3.103, Repoman-2.3.23
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 app-portage/portage-utils/Manifest                     |  2 +-
 ...age-utils-0.80.ebuild => portage-utils-0.89.ebuild} | 18 +-----------------
 2 files changed, 2 insertions(+), 18 deletions(-)