Jump to content
funtoo forums
Sign in to follow this  

Development - Test process / how to test?

Recommended Posts

Please excuse me if it happens that I just can't search, but it seems that neither How to dev nor the Developer Guide explains how to test changes you made.

Let's say I know the patch to apply, or changes to apply to an ebuild in order to fix FL-XXXX. How can I emulate the standard merging process to make sure once my fix will hit the tree, it will actually work?

I don't think I am supposed to move my changes to /usr/portage/ :P. So I wonder what is the common way to do this.


Thanks in advance.

Share this post

Link to post
Share on other sites

So far my experience has been, you can use /usr/local/portage, or an overlay of your own, I would recommend the overlay, since you can make changes to it as normal user. there's an skeleton overlay uploaded for funtoo in github, you can start from that.


Make the directory structure for the package you wan to test in your overlay dir:

$ mkdir -p ${OVERLAY_DIR}/cat/pkg/
# Edit your ebuild:
$ $EDITOR ${OVERLAY_DIR}/cat/pkg/pkg-0.0.ebuild
# generate a Manifest
$ ebuild ${OVERLAY_DIR}/cat/pkg/pkg-0.0.ebuild manifest
Add your overlay via making a overlay.xml file in /etc/layman/overlays/ (this is documented in the layman manual) or adding to your make.conf

If you don't have the package installed already or are adding new dependencies you can do:

$ sudo emerge --onlydeps '=cat/pkg-0.0'
and then you can test your ebuild step by step using the 'ebuild' command, I try before merging anything I edit, generating a package, this means all the build process is made except actually getting the package in your filesystem, you can inspect the tarball generated to see everything looks right and then merge.

$ sudo ebuild ${OVERLAY_DIR}/cat/pkg/pkg-0.0.ebuild package
That said you should read first and mainly refer to the gentoo dev documentation.[1] or 'emerge -av devmanual'


[1] http://devmanual.gentoo.org/index.html

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...