Jump to content
Forums in Read-Only Mode - Please use Reddit ×

Development - Test process / how to test?


pytony

Recommended Posts

  • Funtoo Linux Developer

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.

Link to comment
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

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

Link to comment
Share on other sites

  • 2 weeks later...
×
×
  • Create New...