Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 339668 - savedconfig.eclass restrictions breaks USE=savedconfig in sys-apps/busybox-1.17.1-r1
Summary: savedconfig.eclass restrictions breaks USE=savedconfig in sys-apps/busybox-1....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: ARM Linux
: High major (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
: 339256 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-10-04 03:16 UTC by Stuart Longland (RETIRED)
Modified: 2010-10-08 03:17 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Longland (RETIRED) gentoo-dev 2010-10-04 03:16:29 UTC
Hi... just discovered this little gem whilst trying to finalise a firmware build kit for an ARM device (Ka-Ro TX27 running kernel 2.6.28).  Trying to compile busybox resulted in this:

chroot "/home/stuartl/jacques/testmod-builder/root" arm-926ejs-linux-gnueabi-emerge -v \
                --noreplace \
                avahi dropbear fbgrab rsync ntp mtd-utils tslib greenend-sftp \
                mpg123 vorbis-tools mtd-utils testkit memedit evtest busybox

 * IMPORTANT: 1 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.


These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] sys-apps/busybox-1.17.1-r1 to /usr/arm-926ejs-linux-gnueabi/ USE="ipv6 make-symlinks mdev savedconfig -debug -pam (-selinux) -static" 0 kB                                                                    

Total: 1 package (1 new), Size of downloads: 0 kB


>>> Verifying ebuild manifests

>>> Emerging (1 of 1) sys-apps/busybox-1.17.1-r1 for /usr/arm-926ejs-linux-gnueabi/
 * busybox-1.17.1.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                               [ ok ]
 * checking ebuild checksums ;-) ...                                                                    [ ok ]
 * checking auxfile checksums ;-) ...                                                                   [ ok ]
 * checking miscfile checksums ;-) ...                                                                  [ ok ]
 * CPV:  sys-apps/busybox-1.17.1-r1
 * REPO: gentoo
 * USE:  elibc_glibc ipv6 kernel_linux make-symlinks mdev savedconfig userland_GNU
>>> Unpacking source...
>>> Unpacking busybox-1.17.1.tar.bz2 to /usr/arm-926ejs-linux-gnueabi/tmp/portage/sys-apps/busybox-1.17.1-r1/work
>>> Source unpacked in /usr/arm-926ejs-linux-gnueabi/tmp/portage/sys-apps/busybox-1.17.1-r1/work
>>> Preparing source in /usr/arm-926ejs-linux-gnueabi/tmp/portage/sys-apps/busybox-1.17.1-r1/work/busybox-1.17.1 ...
 * Applying busybox-1.17.0-bb.patch ...                                                                  [ ok ]
 * Applying busybox-1.17.1-date.patch ...                                                                [ ok ]
 * Applying busybox-1.17.1-grep.patch ...                                                                [ ok ]
 * Applying busybox-1.17.1-make.patch ...                                                                [ ok ]
 * Applying busybox-1.17.1-mdev.patch ...                                                                [ ok ]
 * Applying busybox-1.17.1-mktemp.patch ...                                                              [ ok ]
 * Applying busybox-1.17.1-sed.patch ...                                                                 [ ok ]
 * Applying busybox-1.17.1-shell.patch ...                                                               [ ok ]
>>> Source prepared.
>>> Configuring source in /usr/arm-926ejs-linux-gnueabi/tmp/portage/sys-apps/busybox-1.17.1-r1/work/busybox-1.17.1 ...
 * ERROR: sys-apps/busybox-1.17.1-r1 failed:
 *   Bad package!  restore_config only for use in src_{unpack,compile,prepare} functions!
 * 
 * Call stack:
 *     ebuild.sh, line   54:  Called src_configure
 *   environment, line 2754:  Called restore_config '.config'
 *   environment, line 2608:  Called die
 * The specific snippet of code:
 *               die "Bad package!  restore_config only for use in src_{unpack,compile,prepare} functions!"
 * 
 * If you need support, post the output of 'emerge --info =sys-apps/busybox-1.17.1-r1',
 * the complete build log and the output of 'emerge -pqv =sys-apps/busybox-1.17.1-r1'.
 * The complete build log is located at '/usr/arm-926ejs-linux-gnueabi/tmp/portage/sys-apps/busybox-1.17.1-r1/temp/build.log'.
 * The ebuild environment file is located at '/usr/arm-926ejs-linux-gnueabi/tmp/portage/sys-apps/busybox-1.17.1-r1/temp/environment'.
 * S: '/usr/arm-926ejs-linux-gnueabi/tmp/portage/sys-apps/busybox-1.17.1-r1/work/busybox-1.17.1'

>>> Failed to emerge sys-apps/busybox-1.17.1-r1 for /usr/arm-926ejs-linux-gnueabi/, Log file:

>>>  '/usr/arm-926ejs-linux-gnueabi/tmp/portage/sys-apps/busybox-1.17.1-r1/temp/build.log'

 * Messages for package sys-apps/busybox-1.17.1-r1 merged to /usr/arm-926ejs-linux-gnueabi/:

 * ERROR: sys-apps/busybox-1.17.1-r1 failed:
 *   Bad package!  restore_config only for use in src_{unpack,compile,prepare} functions!
 * 
 * Call stack:
 *     ebuild.sh, line   54:  Called src_configure
 *   environment, line 2754:  Called restore_config '.config'
 *   environment, line 2608:  Called die
 * The specific snippet of code:
 *               die "Bad package!  restore_config only for use in src_{unpack,compile,prepare} functions!"
 * 
 * If you need support, post the output of 'emerge --info =sys-apps/busybox-1.17.1-r1',
 * the complete build log and the output of 'emerge -pqv =sys-apps/busybox-1.17.1-r1'.
 * The complete build log is located at '/usr/arm-926ejs-linux-gnueabi/tmp/portage/sys-apps/busybox-1.17.1-r1/temp/build.log'.
 * The ebuild environment file is located at '/usr/arm-926ejs-linux-gnueabi/tmp/portage/sys-apps/busybox-1.17.1-r1/temp/environment'.
 * S: '/usr/arm-926ejs-linux-gnueabi/tmp/portage/sys-apps/busybox-1.17.1-r1/work/busybox-1.17.1'

 * IMPORTANT: 1 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.

make: *** [state/target-pkg/userland] Error 1

Further investigation reveals that in savedconfig.eclass we have:
restore_config() {
	use savedconfig || return

	case ${EBUILD_PHASE} in
		unpack|compile|prepare)
		;;
		*) die "Bad package!  restore_config only for use in src_{unpack,compile,prepare} functions!"
		;;
	esac
...

while in busybox-1.17.1-r1.ebuild:
src_configure() {
	# check for a busybox config before making one of our own.
	# if one exist lets return and use it.

	restore_config .config
...

Not sure which one is correct (and therefore who's bug this is) but the busybox ebuild used to work with USE=savedconfig, so I'm leaning towards a recent change in the savedconfig.eclass.  Either way, the package is broken for now.

Do we add configure to the valid ebuild phases?  Or do we move savedconfig somewhere else?
Comment 1 SpanKY gentoo-dev 2010-10-05 19:51:16 UTC
ive allowed it in src_configure

http://sources.gentoo.org/eclass/savedconfig.eclass?r1=1.13&r2=1.14
Comment 2 SpanKY gentoo-dev 2010-10-08 03:17:02 UTC
*** Bug 339256 has been marked as a duplicate of this bug. ***