Re: [gentoo-dev] rfc: Remove inherit eutils from font.eclass for EAPI=6
On 2018-02-15 13:07, Mart Raudsepp wrote: > On Thu, 2018-02-15 at 08:46 +0100, Guilherme Amadio wrote: >> Most of the above only use usex, and terminus-font uses einstalldocs >> as well. >> I think these should be pretty easy to fix to not use eutils, or >> simply >> add 'inherit eutils' for these ebuilds, then remove from the eclass. >> >> I can help with testing by reading ebuilds more carefully and >> emerging >> them after the change in font.eclass. > > einstalldocs is part of EAPI-6 and inherit eutils isn't needed for that > if it's EAPI-6. In fact, eutils doesn't define it for EAPI-6, only 0-5. > > Same with usex, except that's builtin already in EAPI-5. Thank you all for your ideas and contributions. I have looked at all ebuilds which are EAPI=6 and depend on eutils, and do not inherit it directly but rely on the eutils via fonts.eclass. They are all fixed now. All ebuilds, which inherit fonts.eclass and EAPI=6 will still work fine now, if we drop inherit eutils from font.eclass for EAPI=6 My suggesion is: diff --git a/eclass/font.eclass b/eclass/font.eclass index 7214c99854a..e212004bc44 100644 --- a/eclass/font.eclass +++ b/eclass/font.eclass @@ -1,12 +1,11 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # @ECLASS: font.eclass -# @MAINTAINER: -# fo...@gentoo.org +# @MAINTAINER: fo...@gentoo.org # @BLURB: Eclass to make font installation uniform -inherit eutils +[[ ${EAPI} == [012345] ]] && inherit eutils EXPORT_FUNCTIONS pkg_setup src_install pkg_postinst pkg_postrm -- Best, Jonas signature.asc Description: OpenPGP digital signature
Re: [gentoo-dev] rfc: Remove inherit eutils from font.eclass for EAPI=6
On Thu, 2018-02-15 at 08:46 +0100, Guilherme Amadio wrote: > Most of the above only use usex, and terminus-font uses einstalldocs > as well. > I think these should be pretty easy to fix to not use eutils, or > simply > add 'inherit eutils' for these ebuilds, then remove from the eclass. > > I can help with testing by reading ebuilds more carefully and > emerging > them after the change in font.eclass. einstalldocs is part of EAPI-6 and inherit eutils isn't needed for that if it's EAPI-6. In fact, eutils doesn't define it for EAPI-6, only 0-5. Same with usex, except that's builtin already in EAPI-5. Mart
Re: [gentoo-dev] rfc: Remove inherit eutils from font.eclass for EAPI=6
Hi Mart, Ulrich and Guilherme, thank you very much for your helpful review and the nice grep. Sounds like a good plan. I will discuss with Guilherme how to proceed in detail on IRC and report back here. -- Best, Jonas signature.asc Description: OpenPGP digital signature
Re: [gentoo-dev] rfc: Remove inherit eutils from font.eclass for EAPI=6
On Thu, Feb 15, 2018 at 03:16:22AM +0200, Mart Raudsepp wrote: > On Wed, 2018-02-14 at 23:43 +0100, Jonas Stein wrote: > > Did I miss something? > > Who can help to check with (an automatic) testenvironment, if these > > packages will survive? > > Don't check with test environments, read the ebuilds. I agree with this. Font ebuilds are usually quite trivial, so it might even be faster to just read them. The font.eclass has not been touched since the move to git, but I suspected few fonts would actually use eutils, so here is another grep that shows it may be easier than we think to get rid of inherit eutils, even if for all EAPIs: https://devmanual.gentoo.org/eclass-reference/eutils.eclass/index.html gentoo $ export eutils_funcs=(eqawarn ecvs_clean esvn_clean \ egit_clean emktemp edos2unix strip-linguas built_with_use make_wrapper \ path_exists use_if_iuse optfeature epause ebeep usex einstalldocs \ in_iuse) gentoo $ for func in ${eutils_funcs[@]}; do grep -rI 'inherit.*font' --include='*.ebuild' -l | \ xargs grep $func; done | cut -d: -f1 | sort | uniq app-office/lyx/lyx-2.2.3-r1.ebuild app-office/lyx/lyx-2.2.3-r2.ebuild media-fonts/terminus-font/terminus-font-4.39-r1.ebuild media-fonts/terminus-font/terminus-font-4.40.ebuild media-fonts/terminus-font/terminus-font-4.46.ebuild media-fonts/unifont/unifont-10.0.04.ebuild media-fonts/unifont/unifont-10.0.05.ebuild media-fonts/unifont/unifont-10.0.06.ebuild media-fonts/unifont/unifont-9.0.06.ebuild net-misc/suite3270/suite3270-3.4_p10.ebuild net-misc/suite3270/suite3270-3.5_p10.ebuild net-misc/suite3270/suite3270-3.5_p12.ebuild net-misc/suite3270/suite3270-3.6_p4.ebuild Most of the above only use usex, and terminus-font uses einstalldocs as well. I think these should be pretty easy to fix to not use eutils, or simply add 'inherit eutils' for these ebuilds, then remove from the eclass. I can help with testing by reading ebuilds more carefully and emerging them after the change in font.eclass. Cheers, -Guilherme
Re: [gentoo-dev] rfc: Remove inherit eutils from font.eclass for EAPI=6
> On Wed, 14 Feb 2018, Jonas Stein wrote: > I think we do not need > inherit eutils > https://github.com/gentoo/gentoo/blob/master/eclass/font.eclass#L9 > for the case that EAPI=6 What is eutils needed for in EAPIs 0 to 5? Ulrich pgpnMLnuhBQTB.pgp Description: PGP signature
Re: [gentoo-dev] rfc: Remove inherit eutils from font.eclass for EAPI=6
On Wed, 2018-02-14 at 23:43 +0100, Jonas Stein wrote: > Did I miss something? > Who can help to check with (an automatic) testenvironment, if these > packages will survive? Don't check with test environments, read the ebuilds. Test environments will find it hard to catch changes in the installed files. For example the first issue in that list I found was relying on the inherit for a make_desktop_entry call. In a test environment, it'll just not install a desktop entry while outputting a function not found call or something I suspect. You are lucky if that message is somehow parsed out, and then there are other similar issues possible. (In this example, inheriting desktop.eclass should be added to the ebuild before eclass drops the eutils inherit) If you want to do it, really should just read over all these ebuilds manually. A test environment has a hard time to catch some sort of conditional calls to eutils functions as well, when they don't enter that conditional block for any reason. I suspect most others than this xmind are rather simple ones that don't even have anything beyond declaring the DEPEND and other variables. Also start with the patch to bail out on unknown EAPI's that you were planning to do. This can be separate commit done before this change, once checks are done. Of course ideally pushed together (if the eutils drop pans out) to minimize cache regenerations for developers. Mart
[gentoo-dev] rfc: Remove inherit eutils from font.eclass for EAPI=6
Hi, I think we do not need inherit eutils https://github.com/gentoo/gentoo/blob/master/eclass/font.eclass#L9 for the case that EAPI=6 I suggest to change the line to [[ ${EAPI:-0} == [012345] ]] && inherit eutils we would have to test the following packages (the grep line does not list matches with '\' line breaks) $ grep -rI 'inherit.*font' --include='*.ebuild' -l |xargs grep EAPI |grep ':.*6' |cut -d: -f1 app-misc/xmind/xmind-3.7.6_p201801311814.ebuild media-fonts/essays1743/essays1743-2.000.ebuild media-fonts/essays1743/essays1743-2.001.ebuild media-fonts/fontawesome/fontawesome-5.0.4.ebuild media-fonts/fontawesome/fontawesome-4.7.0.ebuild media-fonts/baekmuk-fonts/baekmuk-fonts-2.2-r2.ebuild media-fonts/terminus-font/terminus-font-4.46.ebuild media-fonts/terminus-font/terminus-font-4.40.ebuild media-fonts/unifont/unifont-10.0.05.ebuild media-fonts/unifont/unifont-10.0.04.ebuild media-fonts/unifont/unifont-9.0.06.ebuild media-fonts/unifont/unifont-10.0.06.ebuild media-fonts/jisx0213-fonts/jisx0213-fonts-20040425-r2.ebuild media-fonts/paratype-astra/paratype-astra-1001.ebuild media-fonts/ahem/ahem-1.0.ebuild media-fonts/nunito/nunito-1.0-r1.ebuild media-fonts/stix-fonts/stix-fonts-2.0.0.ebuild media-fonts/dina/dina-2.93.ebuild media-fonts/mplus-outline-fonts/mplus-outline-fonts-0_pre062.ebuild media-fonts/mplus-outline-fonts/mplus-outline-fonts-0_pre063.ebuild media-fonts/umeplus-fonts/umeplus-fonts-20160402.ebuild media-fonts/opendesktop-fonts/opendesktop-fonts-1.4.2.ebuild media-fonts/noto/noto-20170403.ebuild media-fonts/roboto/roboto-2.138.ebuild media-fonts/hack/hack-3.001.ebuild media-fonts/noto-cjk/noto-cjk-20150615.ebuild media-fonts/cm-unicode/cm-unicode-0.7.0-r1.ebuild media-fonts/comic-neue/comic-neue-2.3.ebuild media-fonts/dejavu/dejavu-2.37.ebuild media-fonts/source-han-sans/source-han-sans-1.004.ebuild media-fonts/croscorefonts/croscorefonts-1.31.0.ebuild media-fonts/open-sans/open-sans-1-r1.ebuild media-fonts/heuristica/heuristica-1.0.2.ebuild media-fonts/source-pro/source-pro-20170111.ebuild media-fonts/source-pro/source-pro-20160608.ebuild kde-plasma/oxygen-fonts/oxygen-fonts-5.4.3.ebuild app-office/wps-office/wps-office-10.1.0.5707_alpha21-r1.ebuild app-office/lyx/lyx-2.2.3-r1.ebuild app-office/lyx/lyx-2.2.3-r2.ebuild Did I miss something? Who can help to check with (an automatic) testenvironment, if these packages will survive? -- Best, Jonas signature.asc Description: OpenPGP digital signature