eselect-repository icon indicating copy to clipboard operation
eselect-repository copied to clipboard

Feature Suggestion: Having an overlay depend on another overlay for a specific ebuild

Open lima-limon-inc opened this issue 1 year ago • 10 comments

It has happened to me a couple of times that my personal overlay makes use of packages that are present in other overlays (that are not in the main gentoo or even guru tree) As far as I am concerned, the best way to handle this situation is to copy the necessary ebuild. However this approach has a couple of problems:

  1. Having to sync the copied ebuild
  2. There are 2 ebuilds that do the same thing, which can get out of sync fairly easily

My humble suggestion: Having an optional parameter on the profiles directory called dependecies. Said file could be a list of names / links to the overlays that the selected overlay depends on. This does imply an update to the overlay standard; however it should be backwards compatible (if the file is not present, then it is assumed that it is self contained)

Would this cause any problems? Are there any technical limitations? Does this feature already exist? Is my approach of copying and pasting ebuild wrong?

Thanks in advance!

PS: Thank you gorny for all of your work! I'm a big fan of the eselect repository tool

lima-limon-inc avatar Jun 06 '23 16:06 lima-limon-inc

masters in metadata/layout.conf can already be used for this purpose. Admittedly, it also allows eclass usage but I don't think that's going to be a problem for you.

What's really lacking here is support for specifying dependencies via repositories.xml. Once such a thing is implemented, We can look into having eselect-repository handle that once it's specified.

That would probably mean filing a bug for repositories.xml format in Gentoo Bugzilla, and making patches for DTD and XML Schema. There's also the matter of UI but I think it's secondary to that.

mgorny avatar Jun 06 '23 16:06 mgorny

I completely forgot about the masters key. Thank you!

Do you think adding the dependencies to repositories.xml is doable?

PS: I'll submit the bug!

lima-limon-inc avatar Jun 06 '23 16:06 lima-limon-inc

Update: Submitted! https://bugs.gentoo.org/907959

I submitted it to the "overlays" section of Gentoo. I hope it was the correct section

Thanks for the help! :blush:

lima-limon-inc avatar Jun 06 '23 16:06 lima-limon-inc

Doable, sure. However, I'm not sure if anyone has time to work on that right now.

mgorny avatar Jun 06 '23 18:06 mgorny

I could try to make a template/proof of concept thing when I have the time. It's a feature I'd really like to have.

Any recommendations of things I should keep in mind?

lima-limon-inc avatar Jun 06 '23 18:06 lima-limon-inc

I'd say start with sending a sketch of your idea to gentoo-dev. I suppose we'd want some XML-y list, like "0 or more elements", each one specifying one dependent repository. Thinking about it, if you needed only packages from another repo, you wouldn't even have to list them as masters, just in this XML.

A bit of a problem is how to design UI in eselect-repository. I'm not 100% sure that having it automatically install dependent repositories without confirmation is a good idea.

mgorny avatar Jun 06 '23 18:06 mgorny

Great! I was thinking exactly the same thing. I was thinking something a la portage, where overlay dependencies get listed and it asks for confirmation.

I'll think of something and I'll send it!

Thanks for the help

lima-limon-inc avatar Jun 06 '23 19:06 lima-limon-inc

Hello @mgorny , sorry to bother you I have the sketch written down.

When you said "gentoo-dev", what did you mean? The IRC chat? A mailing list?

Thanks in advance

lima-limon-inc avatar Jun 18 '23 16:06 lima-limon-inc

The mailing list.

mgorny avatar Jun 18 '23 17:06 mgorny

The mailing list.

Done, sent! Thanks for the help

lima-limon-inc avatar Jun 18 '23 22:06 lima-limon-inc