Jump to content
Funtoo Linux
  • 0
Sign in to follow this  
pytony

Development - Test process / how to test?

Question

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

3 answers to this question

Recommended Posts

  • 0

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

PORTDIR_OVERLAY="${PORTDIR_OVERLAY} $YOUR_OVERLAY_DIR"
 
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
Guest
You are commenting as a guest. If you have an account, please sign in.
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum 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.

Loading...
Sign in to follow this  

×