stefan-langenmaier / brother-overlay

Portage overlay for Brother printer and scanner software
GNU General Public License v3.0
34 stars 41 forks source link

eutils: EAPI 5 not supported #108

Open amano-kenji opened 1 year ago

amano-kenji commented 1 year ago
     Reading category 135|187 ( 72): net-print... * ERROR: net-print/brother-dcp9020cdw-bin-1.1.2-r1::brother-overlay failed (depend phase):
 *   eutils: EAPI 5 not supported
     Reading category 135|187 ( 72): net-print... * ERROR: net-print/brother-dcp9022cdw-bin-1.1.3::brother-overlay failed (depend phase):
 *   eutils: EAPI 5 not supported
     Reading category 135|187 ( 72): net-print... * ERROR: net-print/brother-dcp9055cdn-bin-1.1.1::brother-overlay failed (depend phase):
 *   eutils: EAPI 5 not supported
     Reading category 135|187 ( 72): net-print... * ERROR: net-print/brother-dcpj715w-bin-1.1.3::brother-overlay failed (depend phase):
 *   eutils: EAPI 5 not supported
     Reading category 135|187 ( 72): net-print... * ERROR: net-print/brother-mfc9340cdw-bin-1.1.2::brother-overlay failed (depend phase):
 *   epatch: EAPI 5 not supported
Anard commented 1 year ago

Hi Same problem, while cleaning distfiles with eclean distfiles, I've lots of errors about ebuilds which still uses EAPI 5. Are there any changes for these ebuilds to switch to EAPI 6 ?

stefan-langenmaier commented 1 year ago

Hi everyone, thanks for all the feedback and the pull request.

Sorry for being so inactive but unfortunately I'm a little bit short on time. :) I'm out of the loop of the current supported EAPI versions. Obviously EAPI=5 is no longer supported. Does somebody have recommendations on the EAPI version the ebuilds should be migrated to? Or in other words what is the best compromise of newest EAPI with minimal changes to the existing ebuilds?

Is somebody interested or able to test this?

UnixRonin commented 1 year ago

Stefan, I use only one of these drivers, net-print/brother-hll8350cdw-bin, and was able to change it locally to EAPI=7 with no other changes required except to regenerate the manifest. It's not like any of these ebuilds use a lot of advanced Portage features.

(I'm actually using that driver with an L8250CDN, but it works.)

Anard commented 1 year ago

Hi. Nice. Current recommendation is using EAPI 8, but it seems to introduce more differences than EAPI 7 (list is longer). Maybe it's OK to switch to EAPI 8 without other changes, it should be supported for a longer time. I could test for my printer DCP-195C but it isn't concerned by obsolete EAPI 5. Anyway, it could be a nice idea to switch all ebuilds to EAPI 7 or 8, even these which are in EAPI 6 for this moment ? EDIT : it seems OK for media-gfx/brother-dcp195c to switch to EAPI 8 without other changes

stefan-langenmaier commented 1 year ago

Yes, if we touch a lot of ebuilds might as well update all of them. Thanks for your feedback. So looks like EAPI 8 is an option without changes.

Anard commented 1 year ago

Currently trying to update all EAPI 5 to 8 with sed -i "/^EAPI=5/c\EAPI=8" net-print/*/*.ebuild After what I update Gentoo header copyright and add -r1 or -r2 to ebuild name. I also followed gkunz PR advice who removes src_prepare { return } line. Repoman manifest returns 4 errors for DCP-9020CDW, DCPJ-715W, HL-3070CW and MFC-7440N:

 *   eutils: EAPI 8 not supported
 * 
 * Call stack:
 *                              ebuild.sh, line 618:  Called source '/home/anard/Applications/brother-overlay/net-print/brother-mfc7440n-bin/brother-mfc7440n-bin-3.1.0-r2.ebuild'
 *   brother-mfc7440n-bin-3.1.0-r2.ebuild, line   6:  Called inherit 'eutils' 'rpm' 'linux-info'
 *                              ebuild.sh, line 298:  Called __qa_source '/var/db/repos/gentoo/eclass/eutils.eclass'
 *                              ebuild.sh, line 114:  Called source '/var/db/repos/gentoo/eclass/eutils.eclass'
 *                          eutils.eclass, line  19:  Called die
 * The specific snippet of code:
 *      *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 * 
 * If you need support, post the output of `emerge --info '=net-print/brother-mfc7440n-bin-3.1.0-r2::brother-overlay'`,
 * the complete build log and the output of `emerge -pqv '=net-print/brother-mfc7440n-bin-3.1.0-r2::brother-overlay'`.
 * Working directory: '/usr/lib/python3.10/site-packages'
 * S: '/var/tmp/portage/net-print/brother-mfc7440n-bin-3.1.0-r2/work/brother-mfc7440n-bin-3.1.0'

... still searching why :)

Anard commented 1 year ago

OK : As said in EAPI 7 recommandations, Previously, this was contained in eutils eclass which is no longer necessary Simply removed eutils from inherit list and it's OK. I propose a pull request if it's OK for u.

stefan-langenmaier commented 1 year ago

Thanks for the research. Yes, a pull request would be great.

Anard commented 1 year ago

Done there, we have to choose if we update only EAPI5 ebuilds (my master branch), or if we update all ebuilds to EAPI8, which is done in my allEAPI8 branch. For this I can simply merge this branch to master one. Maybe preferable to have some test feedbacks before merging to your master branch.

UnixRonin commented 1 year ago

FYI the following are the ebuilds I still show as having EAPI=5:

/var/db/repos/brother-overlay/net-print/brother-dcp9020cdw-bin /var/db/repos/brother-overlay/net-print/brother-dcp9055cdn-bin /var/db/repos/brother-overlay/net-print/brother-hl3070cw-bin /var/db/repos/brother-overlay/net-print/brother-hl4150cdn-bin /var/db/repos/brother-overlay/net-print/brother-hl4570cdw-bin /var/db/repos/brother-overlay/net-print/brother-hll3270cdw-bin /var/db/repos/brother-overlay/net-print/brother-mfc7440n-bin /var/db/repos/brother-overlay/net-print/brother-mfc9130cw-bin /var/db/repos/brother-overlay/net-print/brother-mfc9320cw-bin /var/db/repos/brother-overlay/net-print/brother-mfc9330cdw-bin /var/db/repos/brother-overlay/net-print/brother-mfc9332cdw-bin /var/db/repos/brother-overlay/net-print/brother-mfc9340cdw-bin /var/db/repos/brother-overlay/net-print/brother-hl3040cn-bin /var/db/repos/brother-overlay/net-print/brother-dcpj715w-bin

UnixRonin commented 1 year ago

To @Anard's question above, I see no good reason NOT to go straight to EAPI 8 across the board. Doing only the EAPI=5 ebuilds just means we have to do this again when EAPI=6 is deprecated.

Anard commented 1 year ago

@UnixRonin: Have your synced your brother overlay ? # emerge --sync brother-overlay No problem at home, all ebuilds are updated to EAPI 8

$ grep -r EAPI /var/db/repos/brother-overlay/ | egrep "=5|=6|=7"
$
UnixRonin commented 1 year ago

It SHOULD be kept synced, but let me try forcing a manual resync

UnixRonin commented 1 year ago

Huh. For some reason it did not auto-sync.

Manually forced a resync and good now.

Anard commented 1 year ago

Nice. Check your /etc/portage/repos.conf or /etc/portage/repos.conf/brother.conf file is auto-sync is set to "no" : here is mine :

$ cat /etc/portage/repos.conf/brother.conf 
[brother-overlay]
location = /var/db/repos/brother-overlay
sync-type = git
sync-uri = https://github.com/stefan-langenmaier/brother-overlay.git
auto-sync = yes
UnixRonin commented 1 year ago

Yeah, mine was missing the auto-sync, I added it manually (and for one other repo similarly lacking)