Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 148615 - portage behaves really strangely if $@ is modified in global scope
Summary: portage behaves really strangely if $@ is modified in global scope
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 147007
  Show dependency tree
 
Reported: 2006-09-22 01:10 UTC by Harald van Dijk (RETIRED)
Modified: 2006-09-22 19:24 UTC (History)
0 users

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 Harald van Dijk (RETIRED) gentoo-dev 2006-09-22 01:10:32 UTC
$ cat test-1.0.ebuild
KEYWORDS=~x86
set Hello, world
$ ebuild test-1.0.ebuild digest
Please specify a valid command.


Portage
Copyright 1999-2006 Gentoo Foundation

How to use the ebuild command:

The first argument to ebuild should be an existing .ebuild file.

One or more of the following options can then be specified.  If more
than one option is specified, each will be executed in order.

  help        : show this help screen
  setup       : execute package specific setup actions
  fetch       : download source archive(s) and patches
  digest      : creates a digest and a manifest file for the package
  manifest    : creates a manifest file for the package
  unpack      : unpack/patch sources (auto-fetch if needed)
  compile     : compile sources (auto-fetch/unpack if needed)
  test        : test package (auto-fetch/unpack/compile if needed)
  preinst     : execute pre-install instructions
  postinst    : execute post-install instructions
  install     : installs the package to the temporary install directory
  qmerge      : merge image into live filesystem, recording files in db
  merge       : does fetch, unpack, compile, install and qmerge
  prerm       : execute pre-removal instructions
  postrm      : execute post-removal instructions
  unmerge     : remove package from live filesystem
  config      : execute package specific configuration actions
  package     : create tarball package in /var/pkg/All
  rpm         : builds a RedHat RPM package
  clean       : clean up all source and temporary files

The following settings will be used for the ebuild process:

  package     : test-1.0
  slot        : 
  category    : test
  description : 
  system      : i686-pc-linux-gnu
  c flags     : -march=athlon-tbird -O2 -pipe -fomit-frame-pointer -Wimplicit-function-declaration
  c++ flags   : -march=athlon-tbird -O2 -pipe -fomit-frame-pointer
  make flags  : 
  build mode  : production (stripped)
  merge to    : /

Additionally, support for the following optional features will be enabled:

  x86 3dnow 3dnowext X alsa bindist cairo cdparanoia cjk crypt cups debugger divx dri dvd dvdr dvdread elibc_glibc flac ftp gcc-libffi gif gmedia gpgme graphviz gtk iconv idn immqt input_devices_keyboard input_devices_mouse ipv6 ithreads jpeg kde kdeenablefinal kdehiddenvisibility kdrive kernel_linux linguas_en linguas_en_GB lynxkeymap mbox mmx mmxext mozdevelop mudflap ncurses nethack nls no-old-linux noamazon nocxx nptl nptlonly nsplugin offensive ogg opengl pango paste64 pcre pdf perl png ppds qt3 quicktime readline real reiser4 rtc ssl svg tcl theora truetype ucs2 unicode userland_GNU video_cards_radeon vim-pager vorbis wmp xim xine xorg


aux_get(): (0) Error in test/test-1.0 ebuild. (1)
               Check for syntax error or corruption in the ebuild. (--debug)

$ emerge --info
Portage 2.1.2_pre1 (default-linux/x86/2006.0, gcc-4.1.1/vanilla, glibc-2.4-r3, 2.6.17.11 i686)
=================================================================
System uname: 2.6.17.11 i686 AMD Duron(tm) Processor
Gentoo Base System version 1.12.5
Last Sync: Unknown
app-admin/eselect-compiler: 2.0.0_rc2-r1
dev-java/java-config: [Not Present]
dev-lang/python:     2.4.3-r3, 2.5-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.60
sys-devel/automake:  1.9.6-r2
sys-devel/binutils:  2.17
sys-devel/gcc-config: [Not Present]
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-tbird -O2 -pipe -fomit-frame-pointer -Wimplicit-function-declaration"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /lib/rcscripts/addons /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/eselect/compiler /etc/gconf /etc/init.d /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=athlon-tbird -O2 -pipe -fomit-frame-pointer"
DISTDIR="/var/dist"
FEATURES="assume-digests autoconfig autopatch collision-protect cvs distlocks metadata-transfer notitles parallel-fetch sandbox sfperms sign strict stricter userpriv usersandbox"
GENTOO_MIRRORS="http://ftp.easynet.nl/mirror/gentoo"
LANG="en_GB.UTF-8"
LDFLAGS="-Xlinker --as-needed"
LINGUAS="en_GB en"
PKGDIR="/var/pkg"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/cvs/gentoo-x86"
PORTDIR_OVERLAY="/etc/portage/overlay /etc/portage/overlay/enlightenment /etc/portage/overlay/sunrise"
SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext X alsa bindist cairo cdparanoia cjk crypt cups debugger divx dri dvd dvdr dvdread elibc_glibc flac ftp gcc-libffi gif gmedia gpgme graphviz gtk iconv idn immqt input_devices_keyboard input_devices_mouse ipv6 ithreads jpeg kde kdeenablefinal kdehiddenvisibility kdrive kernel_linux linguas_en linguas_en_GB lynxkeymap mbox mmx mmxext mozdevelop mudflap ncurses nethack nls no-old-linux noamazon nocxx nptl nptlonly nsplugin offensive ogg opengl pango paste64 pcre pdf perl png ppds qt3 quicktime readline real reiser4 rtc ssl svg tcl theora truetype ucs2 unicode userland_GNU video_cards_radeon vim-pager vorbis wmp xim xine xorg"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS

I don't know if this is intended to be supported, but even if it's not, it would be nice if portage could give a clearer error message.

And yes, this occurred in a real attempt at writing an ebuild: upstream releases in DDMMYYYY format, and I wanted to convert the ebuild's 1.0.YYYY.MM.DD format to that like this:

set $(IFS=.; echo ${PV})
MY_PV=$5$4$3
Comment 1 Simon Stelling (RETIRED) gentoo-dev 2006-09-22 02:20:21 UTC
starting from rev 4495, ebuild.sh uses EBUILD_SH_ARGS instead of $*, which should fix this.
Comment 2 Zac Medico gentoo-dev 2006-09-22 19:24:38 UTC
This has been released in 2.1.2_pre1-r1.