Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 318041

Summary: use test && KMEXTRACTONLY="plasma/desktop/shell/data" as LAST LINE breaks repoman
Product: Portage Development Reporter: Andreas K. Hüttel <dilfridge>
Component: Core - Ebuild SupportAssignee: Portage team <dev-portage>
Status: RESOLVED CANTFIX    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: ebuild
Output of emerge --info

Description Andreas K. Hüttel archtester gentoo-dev 2010-05-01 19:25:29 UTC
Please have a look at the attached ebuild, and try to generate a manifest with repoman.

If I try to generate a manifest, I get the error below.
After swapping the last two non-blank lines all works fine...

huettel@pinacolada ~/Gentoo/kde/kde-base/libplasmagenericshell $ repoman manifest
 * ERROR: kde-base/libplasmagenericshell-4.4.2 failed:
 *   error sourcing ebuild
 * 
 * Call stack:
 *   ebuild.sh, line 1881:  Called die
 * The specific snippet of code:
 *                      source "$EBUILD" || die "error sourcing ebuild"
 * 
 * If you need support, post the output of 'emerge --info =kde-base/libplasmagenericshell-4.4.2',
 * the complete build log and the output of 'emerge -pqv =kde-base/libplasmagenericshell-4.4.2'.
 * This ebuild used the following eclasses from overlays:
 *   /home/huettel/Gentoo/kde/eclass/kde4-meta.eclass
 *   /home/huettel/Gentoo/kde/eclass/kde4-base.eclass
 *   /home/huettel/Gentoo/kde/eclass/kde4-functions.eclass
 * This ebuild is from an overlay: '/home/huettel/Gentoo/kde/'
 * S: '/var/tmp/portage/kde-base/libplasmagenericshell-4.4.2/work/libplasmagenericshell-4.4.2'
!!! getFetchMap(): aux_get() error reading kde-base/libplasmagenericshell-4.4.2; aborting.
Unable to generate manifest.
huettel@pinacolada ~/Gentoo/kde/kde-base/libplasmagenericshell $
Comment 1 Andreas K. Hüttel archtester gentoo-dev 2010-05-01 19:26:21 UTC
Created attachment 229929 [details]
ebuild
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2010-05-01 19:26:57 UTC
Created attachment 229931 [details]
Output of emerge --info
Comment 3 Zac Medico gentoo-dev 2010-05-01 20:44:21 UTC
I don't think we can or want to ignore the return value from `source $EBUILD` so I guess you'll have to do something like add 'true' at the bottom of the ebuild.
Comment 4 Andreas K. Hüttel archtester gentoo-dev 2010-05-02 22:54:46 UTC
Ah I understand now... and I dont know either how to improve this. Maybe just a small note in the docs about useflags somewhere (since this is where the problem might turn up)?

Anyway, resolving as cantfix for now.
Comment 5 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-05-03 16:42:18 UTC
(In reply to comment #1)

You also shouldn't call use() in global scope.
Comment 6 Andreas K. Hüttel archtester gentoo-dev 2010-05-03 18:26:28 UTC
(In reply to comment #5)
> (In reply to comment #1)
> 
> You also shouldn't call use() in global scope.
> 

* where is that documented?
* can you suggest a (similarly readable and simple) alternative?
Comment 7 Zac Medico gentoo-dev 2010-05-04 19:26:28 UTC
(In reply to comment #6)
> * where is that documented?

Well, it's common practice to call it in global scope, expecially in eclasses. In the future we might add a phase hook registration interface so that functions can be registered in global scope but then called later (before or after a normal ebuild phase).

> * can you suggest a (similarly readable and simple) alternative?

pkg_setup() {
  use test && KMEXTRACTONLY="plasma/desktop/shell/data"
  kde4-meta_pkg_setup
}