ebuild module reexports functions from the class module and modules included in this section, that is: ebuild/ebuild, ebuild/metadata, ebuild/package and ebuild/repository
constructor
[ [yearyear][EAPIEAPI][customcustom][inheritsinherits][DESCRIPTIONDESCRIPTION][HOMEPAGEHOMEPAGE][SRC_URISRC_URI][SS][LICENSELICENSE][SLOTSLOT][KEYWORDSKEYWORDS][IUSEIUSE][REQUIRED_USEREQUIRED_USE][RESTRICTRESTRICT][COMMON_DEPENDCOMMON_DEPEND][RDEPENDRDEPEND][DEPENDDEPEND][BDEPENDBDEPEND][IDEPENDIDEPEND][PDEPENDPDEPEND][DOCSDOCS][PATCHESPATCHES][QA_PREBUILTQA_PREBUILT][QA_TEXTRELSQA_TEXTRELS][QA_EXECSTACKQA_EXECSTACK][QA_WX_LOADQA_WX_LOAD][QA_FLAGS_IGNOREDQA_FLAGS_IGNORED][QA_MULTILIB_PATHSQA_MULTILIB_PATHS][QA_PRESTRIPPEDQA_PRESTRIPPED][QA_SONAMEQA_SONAME][QA_SONAME_NO_SYMLINKQA_SONAME_NO_SYMLINK][QA_AM_MAINTAINER_MODEQA_AM_MAINTAINER_MODE][QA_CONFIGURE_OPTIONSQA_CONFIGURE_OPTIONS][QA_DT_NEEDEDQA_DT_NEEDED][QA_DESKTOP_FILEQA_DESKTOP_FILE][bodybody]])HOMEPAGE : string?= "https://wiki.gentoo.org/wiki/No_homepage"method
(send an-ebuild create-list )→list?
Creates a list that contains string s or false as elements. The elaments of the list are created using the "unroll" functions which are not exposed to the user.Also, concatenates values that custom and body arguments return.
Takes non-false elemets of the list created by create-list method and turns them into one string ready to be written into a file (by save for example).name:string?Creates a file named name in the given location pth (or current directory). Internally uses the interfece implemented by this object’s printable<%> to dispaly this to file.Uses dynamic-get-field and dynamic-set-field! . Sets the field-name represented by sym symbol of this object to that field appended with lst list .Like append! but a list is automatically generated from v.Examples:# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="A package description"
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
LICENSE="all-rights-reserved"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug test"
RESTRICT="test? ( debug ) mirror"
It is automatically set when require ing the ebuild/ebuild module (or the ebuild/private/ebuild/default-values module).
Not re-exported by ebuild/ebuild (nor ebuild) and not intened to by accessed by the user.
Currently it is equal to 2025.
The value is hardcoded and periodically updated, if a user wishes to change it, then they should set it for each ebuild% object themselves, create a ebuild% subclass or mixin .
Re-exported by ebuild/ebuild and ebuild modules.
Currently it is equal to 8.
constructor
[ [maintainersmaintainers][longdescriptionslongdescriptions][slotsslots][stabilize-allarchesstabilize-allarches][usesuses][upstreamupstream]])Creates a XML document ready to be written into a file.Creates a file named "metadata.xml" in the given location (or current directory). Internally uses the interfece implemented by this object’s printable<%> to dispaly object to file.Examples:[maintainers#f#f#f<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>me@me.com</email>
<name>Me</name>
</maintainer>
<upstream>
<remote-id type="gitlab">me/myproject</remote-id>
</upstream>
</pkgmetadata>
constructor
[ [CATEGORYCATEGORY][PNPN][ebuildsebuilds]By default if ebuilds are not given the default ebuild% object (with PN set to "unknown" is used) and if metadata is not given default "empty" metadata% object is used.method
(send a-package get-versions )→(listof package-version? )
Example:Example:method
(send a-package get-CATEGORY/PN )→string?
Example:Example:[CATEGORY"dev-scheme"][PN"bytes"][ebuildsget-Ps)'("dev-scheme/bytes-1" "dev-scheme/bytes-2")
Display ebuilds and metadata.Example:CATEGORY/PN: app-misc/unknown
PV: 9999
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="A package description"
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
LICENSE="all-rights-reserved"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RESTRICT="mirror"
METADATA:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
</pkgmetadata>
Creates (uses their save methods) ebuilds and metadata of this package. The names of ebuilds are equal to so-called P ebuild variable which is composed of PN (taken from this package% object) and PV (version, taken from the ebuilds hash). So ebuilds will be saved as "P.ebuild".
class
superclass:object%
constructor
[namename][ [layoutlayout]]name:string?By default if layout is not given default-layout (parameter variable) is used.method
(send a-repository layout-string )→string?
Wrapper for layout->string .method
(send a-repository save-layout [pth])→void
Creates directory "metadata" with a file "layout.conf" in the given location (or current directory).Creates directory "profiles" with a file "repo_name" in the given location (or current directory).method
(send a-repository save-packages [pth])→void
Creates directory "CATEGORY/PN" with a "metadata.xml" file and "P.ebuild" ebuilds in the given location (or current directory).Creates a full ebuild repository directory structure. (uses save-layout , save-name and save-packages ).
masters = gentoo
cache-formats = md5-dict
sign-commits = true
update-changelog = false
eapis-banned = 0 1 2 3 4 5 6
eapis-deprecated =
manifest-hashes = BLAKE2B SHA512
manifest-required-hashes = BLAKE2B
sign-manifests = false
thin-manifests = true
Repository name:
test
Repository layout:
masters = gentoo
cache-formats = md5-dict
sign-commits = true
update-changelog = false
eapis-banned = 0 1 2 3 4 5 6
eapis-deprecated =
manifest-hashes = BLAKE2B SHA512
manifest-required-hashes = BLAKE2B
sign-manifests = false
thin-manifests = true
Repository packages:
CATEGORY/PN: sys-devel/asd
PV: 1.1.1
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="A package description"
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
LICENSE="all-rights-reserved"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RESTRICT="mirror"
METADATA:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<upstream>
<remote-id type="gitlab">asd/asd</remote-id>
</upstream>
</pkgmetadata>