Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 658638 - gnome2.eclass: adapt GNOME2_LA_PUNT to ltprune.eclass deprecation
Summary: gnome2.eclass: adapt GNOME2_LA_PUNT to ltprune.eclass deprecation
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gnome2.eclass
  Show dependency tree
 
Reported: 2018-06-21 09:32 UTC by Pacho Ramos
Modified: 2020-12-07 22:06 UTC (History)
1 user (show)

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 Pacho Ramos gentoo-dev 2018-06-21 09:32:05 UTC
ltprune.eclass was deprecated and, instead, people are suggested to run:
# @DESCRIPTION:
# A function to locate and remove unnecessary .la files.
#
# Discouraged. Whenever possible, please use much simpler:
# @CODE
# find "${D}" -name '*.la' -delete || die
# @CODE

I guess we will need to migrate to it then.

Currently, when GNOME2_LA_PUNT is not set at all it runs "prune_libtool_files", that ends up being a good default as it removes most of .la files. Even, we have a "yes" option that runs "prune_libtool_filess --modules", for the case we need to remove all .la files. At the end we have "no" for not removing them.

I guess we could move to simply:
- yes (default if nothing is set) -> remove all with find "${D}" -name '*.la' -delete
- no -> for the really few cases we don't want to remove .la files
Comment 1 Pacho Ramos gentoo-dev 2018-06-21 09:41:03 UTC
I see the logic is still there for old EAPIs (running a slightly different find command):
        if has ${EAPI:-0} 4; then
                if [[ "${GNOME2_LA_PUNT}" != "no" ]]; then
                        ebegin "Removing .la files"
                        if ! use_if_iuse static-libs ; then
                                find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed"
                        fi
                        eend
                fi
        else
                case "${GNOME2_LA_PUNT}" in
                        yes)    prune_libtool_files --modules;;
                        no)     ;;
                        *)      prune_libtool_files;;
                esac
        fi

Maybe we could simply switch to the new find command (for consistency) for change the EAPI conditional to run prune_libtool_files stuff for EAPIs 5 and 6 while the other for the rest of EAPIs (at the end it will be 7 and newer as gnome2.eclass has no consumers for older EAPIs... even its support could be removed finally -> bug 596674)
Comment 2 Larry the Git Cow gentoo-dev 2020-12-07 22:06:54 UTC
The bug has been closed via the following commit(s):

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

commit ac2c67038daeca32c856a57925f22a5503ffa128
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2020-12-06 16:30:14 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2020-12-07 22:06:33 +0000

    gnome2.eclass: Add EAPI=7 support
    
    Closes: https://bugs.gentoo.org/658638
    Closes: https://bugs.gentoo.org/717100
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 eclass/gnome2.eclass | 29 ++++++++++++++++++-----------
 1 file changed, 18 insertions(+), 11 deletions(-)