Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 107770 - FEATURES="noauto" ebuild <ebuild> clean setup unpack causes ${A} not to be set
Summary: FEATURES="noauto" ebuild <ebuild> clean setup unpack causes ${A} not to be set
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 108082
  Show dependency tree
 
Reported: 2005-10-01 04:08 UTC by Petteri Räty (RETIRED)
Modified: 2005-10-05 13:16 UTC (History)
0 users

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


Attachments
ebuild.sh.patch (patch,587 bytes, patch)
2005-10-04 07:17 UTC, Brian Harring (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petteri Räty (RETIRED) gentoo-dev 2005-10-01 04:08:38 UTC
pena linux-wlan-ng-modules # FEATURES="noauto" USE="debug pcmcia usb plx pci"
ebuild linux-wlan-ng-modules-0.2.2.ebuild clean setup unpack
foo

>>> md5 files   ;-) linux-wlan-ng-modules-0.2.2.ebuild
>>> md5 files   ;-) files/digest-linux-wlan-ng-modules-0.2.2
>>> md5 files   ;-) files/linux-wlan-ng-0.2.2-module_param.patch
>>> md5 src_uri ;-) linux-wlan-ng-0.2.2.tar.bz2
>>> Unpacking source...
foo


!!! ERROR: net-wireless/linux-wlan-ng-modules-0.2.2 failed.
!!! Function unpack, Line 350, Exitcode 0
!!! Nothing passed to the 'unpack' command
!!! If you need support, post the topmost build error, NOT this status message.

I have this in the ebuild in the beginning of pkg_setup and src_unpack:
    echo "foo"
    echo ${A}

I know that the functions are not run in the order they are probably meant to be
as looking at man ebuild I should do ebuild setup clean unpack which works
without problems. But I don't see any reason why I shouldn't be able to run
setup clean in any order I wan't. A warning would be nice if I indeed can't run
the functions in reverse order to avoid hair pulling when thinking what is wrong. 

pena linux-wlan-ng-modules # emerge info
Portage 2.0.52-r1 (!/usr/portage/profiles/default-linux/x86/2005.1, gcc-3.4.4,
glibc-2.3.5-r1, 2.6.13-gentoo-r2 i686)
=================================================================
System uname: 2.6.13-gentoo-r2 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.12.0_pre8
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5, 2.4.2
sys-apps/sandbox:    1.2.13
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe -mfpmath=sse -ffast-math -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env
/usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/init.d /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -pipe -mfpmath=sse -ffast-math -fomit-frame-pointer"
DISTDIR="/usr/src/distfiles"
FEATURES="autoaddcvs autoconfig ccache cvs distlocks fixpackages noauto sandbox
sfperms sign strict"
GENTOO_MIRRORS=" http://trumpetti.atm.tut.fi/gentoo 
http://lame.lut.fi/linux/gentoo "
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LINGUAS="fi"
MAKEOPTS="-j2"
PKGDIR="/home/pkg/"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/mnt/checkouts/gentoo-x86"
PORTDIR_OVERLAY="/mnt/checkouts/overlays/betelgeuse
/mnt/checkouts/overlays/gentopia"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X aac acl acpi alsa apm arts audiofile avi bash-completion berkdb
bitmap-fonts bluetooth browserplugin bzip2 bzlib cdb cddb cdparanoia cdr crypt
cups dbus divx4linux dts dvd dvdr dvdread emboss esd fam firefox foomaticdb
freetype gif gstreamer gtk2 hal java jpeg kde kdeenablefinal libg++ libwww
logitech-mouse lzo mad makecheck mikmod mjpeg mmx mmx2 mp3 mpeg mysql ncurses
network nptl nptlonly nsplugin nvidia offensive ogg oggvorbis opengl pam pdflib
png qt quicktime readline real rtc ruby samba slang spell sse sse2 ssl
subversion svg symlink tcpd tiff truetype truetype-fonts type1-fonts unicode usb
userlocales vorbis win32codecs xine xml xml2 xv xvid zlib video_cards_nvidia
linguas_fi userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS
Comment 1 Marius Mauch (RETIRED) gentoo-dev 2005-10-01 04:40:01 UTC
as this doesn't seem to be in the tree, please attach the actual ebuild,
otherwise we have to guess too much.
Comment 2 Brian Harring (RETIRED) gentoo-dev 2005-10-01 04:44:31 UTC
It'll trigger on 
FEATURES="noauto"ebuild $PORTDIR/dev-util/diffball/diffball-0.6.5.ebuild clean
setup unpack

I'm kind of inclined to just state noauto is broke and be on my merry way...
with noauto off, this is fixed in p.masked 2.0.53, horked in <.53
Comment 3 Petteri Räty (RETIRED) gentoo-dev 2005-10-01 05:02:20 UTC
(In reply to comment #2)
> I'm kind of inclined to just state noauto is broke and be on my merry way...
> with noauto off, this is fixed in p.masked 2.0.53, horked in <.53

If we go the way of stating noauto being broken/unsupported, we should make all
the documentation reflect this.
Comment 4 SpanKY gentoo-dev 2005-10-01 20:28:52 UTC
i also really hate taking that stance

FEATURES=noauto is invaluable to developers
Comment 5 Jason Stubbs (RETIRED) gentoo-dev 2005-10-01 20:38:37 UTC
It's not really broken. It just requires expert knowledge. This bug is either 
INVALID or can only be fixed by reordering specified phases and hence removing 
power/flexibility. 
Comment 6 SpanKY gentoo-dev 2005-10-01 20:41:56 UTC
i dont really see how `ebuild <ebuild> clean setup unpack ...` is using it wrong
Comment 7 Jason Stubbs (RETIRED) gentoo-dev 2005-10-01 21:17:14 UTC
You're assuming "clean" and "setup" should be independent of each other. This 
is a natural assumption, which I'd also make the mistake of making. However, 
`ebuild <ebuild> setup` does more than just run pkg_setup, which is where 
expert knowledge comes into it. 
 
Having said that, I had a quick look at the code and can't see why ${A} isn't 
being passed down to the ebuild env. 
Comment 8 Petteri Räty (RETIRED) gentoo-dev 2005-10-02 01:52:24 UTC
I think it would be best to add loud warnings if people try to run functions out
of order and be done with it.
Comment 9 Brian Harring (RETIRED) gentoo-dev 2005-10-04 07:17:57 UTC
Created attachment 69851 [details, diff]
ebuild.sh.patch

Don't set A (via declare -r) if it's unset.
Comment 10 Brian Harring (RETIRED) gentoo-dev 2005-10-04 07:37:15 UTC
Comment on attachment 69851 [details, diff]
ebuild.sh.patch

>Index: bin/ebuild.sh
>===================================================================
>--- bin/ebuild.sh	(revision 2082)
>+++ bin/ebuild.sh	(working copy)
>@@ -1733,8 +1733,10 @@
> 
> unset E_IUSE E_DEPEND E_RDEPEND E_CDEPEND E_PDEPEND
> 
>-declare -r T P PN PV PVR PR A D EBUILD EMERGE_FROM O PPID FILESDIR
>-declare -r PORTAGE_TMPDIR
>+for x in T P PN PV PVR PR A D EBUILD EMERGE_FROM O PPID FILESDIR PORTAGE_TMPDIR; do
>+	[[ ${!x-UNSET_VAR} != UNSET_VAR ]] && declare -r ${x}
>+done
>+unset x
> 
> # Turn of extended glob matching so that g++ doesn't get incorrectly matched.
> shopt -u extglob
Comment 11 Brian Harring (RETIRED) gentoo-dev 2005-10-04 07:37:44 UTC
Note the difference between declare -r ${!x} and declare -r ${x}
:)
Comment 12 Jason Stubbs (RETIRED) gentoo-dev 2005-10-05 13:16:50 UTC
Fixed in portage-2.0.53_rc4