Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Issues writing a -meta ebuild (Solved)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 518
Location: Wales, UK

PostPosted: Sun May 26, 2024 10:50 am    Post subject: Issues writing a -meta ebuild (Solved) Reply with quote

I am playing around with making meta ebuilds to simplify setting up new systems according to my "usual" configuration (see https://forums.gentoo.org/viewtopic-t-1169109-highlight-.html for more details).

Unfortunately, I am stumbling at the first step!
I have created the following ebuild as a test (modelled on kdegames-meta.ebuild):
Code:
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DESCRIPTION="electronics-meta - merge this in to pull all the electronics"
HOMEPAGE="https://teulu.org"

LICENSE="metapackage"
SLOT="0"
KEYWORDS="amd64"
IUSE="doc"

RDEPEND="
        sci-electronics/kicad-meta
        doc? ( app-doc/kicad-doc)
"

So, very simple indeed. It should merge kicad-meta, and if the doc flag is set, then also emerge the documentation.

I have put this in a directory called sys-config in a new local overlay (created with eselect repository create...). When I run "ebuild electronics-meta.ebuild manifest", I get an error:
Code:
Appending /var/db/repos to PORTDIR_OVERLAY...
!!! Repository 'x-repos' is missing masters attribute in '/var/db/repos/metadata/layout.conf'
!!! Set 'masters = gentoo' in this file for future compatibility
ebuild: /var/db/repos/local-config/sys-config/electronics-meta.ebuild: local-config/electronics-meta: does not follow correct package syntax

I don't think the first three lines are relevant, but the last line leaves me puzzled, as I cannot see what is incorrect in the file or the way it has been named. I can also not see how I can get ebuild to be more descriptive about the error.
Can any of you give me some hints?


Last edited by paulj on Sun May 26, 2024 5:35 pm; edited 1 time in total
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1744

PostPosted: Sun May 26, 2024 1:29 pm    Post subject: Reply with quote

Move /var/db/repos/local-config/sys-config/electronics-meta.ebuild to /var/db/repos/local-config/sys-config/electronics-meta/electronics-meta-0.ebuild

Also, since sys-config isn't a Gentoo category, you will need to create the file /var/db/repos/local-config/profiles/categories with sys-config as its contents.
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9559
Location: beyond the rim

PostPosted: Sun May 26, 2024 1:36 pm    Post subject: Reply with quote

To be clear:
- You must use a category name known to portage, you can't make it up on the fly (this has technical reasons)
- Every ebuild must specify a version, even if it doesn't install any content itself

Also in the ebuild itself, make sure you have a whitespace before the closing parentheses of the doc? conditional.
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 518
Location: Wales, UK

PostPosted: Sun May 26, 2024 5:35 pm    Post subject: Reply with quote

grknight wrote:
Move /var/db/repos/local-config/sys-config/electronics-meta.ebuild to /var/db/repos/local-config/sys-config/electronics-meta/electronics-meta-0.ebuild

Doh - of course!!!
grknight wrote:

Also, since sys-config isn't a Gentoo category, you will need to create the file /var/db/repos/local-config/profiles/categories with sys-config as its contents.


I did wonder if this was an issue, and tried with a known category instead without success (due to the issue above).

Thanks for pointing out my error, and also the detail behind the category naming (also thanks Genone).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum