Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eclass for shared code #54

Open
automorphism88 opened this issue Apr 21, 2018 · 1 comment
Open

eclass for shared code #54

automorphism88 opened this issue Apr 21, 2018 · 1 comment

Comments

@automorphism88
Copy link
Contributor

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:

  • Common dependencies (i.e. cups for net-print ebuilds, sane for media-gfx ebuilds)
  • Any necessary settings of RESTRICT or other global variables
  • Inherit linux-info and multilib eclasses to use in a shared pkg_setup phase function
  • Inherit rpm eclass to use in a shared src_unpack phase function
  • Low level functions to fix paths, extract PPD, etc.
  • Possibly shared src_prepare and src_install phase functions using the above low-level functions

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
Copy link
Owner

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. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants