Jump to content

Photo

Development - Test process / how to test?

development test wiki

Best Answer j-g- , 02 October 2014 - 05:29 PM

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 Go to the full post »


3 replies to this topic

#1
pytony

pytony

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts
  • LocationScrew gravity!

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.



#2
j-g-

j-g-

    Advanced Member

  • Members
  • PipPipPip
  • 80 posts
✓  Best Answer
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
  • shaman and pytony like this

#3
pytony

pytony

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts
  • LocationScrew gravity!

Thank you j-g-, it looks like a good way to proceed. I'm gonna dive into it.



#4
drobbins

drobbins

    Administrator

  • Administrators
  • 137 posts

And please add this info to the wiki docs so everyone can benefit :)





Reply to this topic



  



Also tagged with one or more of these keywords: development, test, wiki

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users