1

We have some ebuilds that install things into a certain directory. As it stands, a few of the ebuilds create the directory, while others just assume its presence. To address this situation, I want to create an ebuild that ONLY creates the directory, so that the other ebuilds can just depend on that ebuild, and then everything is modular and encapsulated, etc.

1) Is this the right way to go about this kind of thing in gentoo-land?
2) Is there a specific ebuild function that should be used for this? Right now I've got

...
src_configure() {
    mkdir my/dir
    sudo fowners myuser my/dir
}

but it's complaining that the source directory does exist. I could explicitly create said directory, but since this ebuild isn't actually installing anything, I'd rather not.

1 Answer 1

1

Disclaimer: I am not a Gentoo developer and I have minimal experience with ebuilds and eclasses. I am just a long-time Gentoo user. This is my best attempt at an answer.

I would avoid creating a new ebuild just to add the functionality you are looking for.

Instead, you could set up a custom eclass which will set the destination directory.

At this point you could import your custom eclass into each of your ebuilds and change the destination directory either implicitly (just by loading the eclass) or explicitly (by calling a function set up in your eclass from your ebuild). Unfortunately, I don't know exactly how this would be done.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .