stefan-langenmaier / brother-overlay

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

eclass for shared code #54

Open automorphism88 opened 6 years ago

automorphism88 commented 6 years ago

As suggested in the comments on this PR, it might be useful to create an eclass to share code between ebuilds for different printers. Specifically, I think the following could be shared:

I'm willing to help in creating this eclass, and think much of the code could be copy/pasted from my net-print/brother-mfc7460dn-bin ebuild, with appropriate adaptation. However, before actually creating the eclass, I thought it'd be useful to discuss what exactly it should do, to maximize its usefulness. The drivers for different models are similar enough that I envision the possibility of individual ebuilds not having to do much more than inherit a common eclass.

stefan-langenmaier commented 6 years ago

Sorry, I still haven't looked into this, but I find it a highly interesting direction and a very good approach. By now this repository contains a lot more scanner and printer then I would have assumed and I'm not able to test the ebuilds on only on a fraction of the devices. So already from the point of maintenance I think it would be good to centralise some of this functionality.

At the moment it's not clear for me which printer drivers are affected by issue #48 . I think these should be the first that profit from the eclass to start working properly.

In the long run all/most of the other existing ebuilds should be updated, but this should happen in an automated way as there are just too many. For me the question is more in the way of "for which subset of printers" should this eclass be useful and how can the script generator/brother-generator.sh be used to regenerate up-to-date ebuilds?

I don't know if this helps but that's currently in my head. :)