Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 95903 - Ebuilds fail when /bin/sh-Link isn't set to bash
Summary: Ebuilds fail when /bin/sh-Link isn't set to bash
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Quality Assurance Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-12 15:23 UTC by Heinz Striebeck
Modified: 2005-10-17 18:30 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 Heinz Striebeck 2005-06-12 15:23:02 UTC
When using e.g. dash as /bin/sh, many ebuilds fail, because they are dependent
on bash.
Mostly, it's an error like this (output of "emerge nano" with dash as /bin/sh):

if test "nano" = "gettext"; then \
  /bin/sh `case "./mkinstalldirs" in /*) echo "./mkinstalldirs" ;; *) echo
".././mkinstalldirs" ;; esac`
/var/tmp/portage/nano-1.3.7/image//usr/share/gettext/po; \
  for file in Makefile.in.in Makevars remove-potcdate.sin quot.sed boldquot.sed
en@quot.header en@boldquot.header insert-header.sin Rules-quot  ; do \
    /bin/install -c -m 644 ./$file \
                    /var/tmp/portage/nano-1.3.7/image//usr/share/gettext/po/$file; \
  done; \
else \
  : ; \
fi
/bin/sh: 1: :: not found
make[1]: *** [install-data] Error 127
make[1]: Leaving directory `/var/tmp/portage/nano-1.3.7/work/nano-1.3.7/po'
make: *** [install-recursive] Error 1

!!! ERROR: app-editors/nano-1.3.7 failed.
!!! Function src_install, Line 51, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.


I think this should be changed. Either by setting the interpreter from /bin/sh
to /bin/bash in the ebuilds or by removing bash-only-syntax from the ebuilds

Reproducible: Always
Steps to Reproduce:
1. emerge <any other shell than bash>
2. rm /bin/sh && ln -s /bin/<shell> /bin/sh
3. ...
Actual Results:  
Got error message

Expected Results:  
There should be no error message

Using tcsh, the problem gets even worse (errors occur in the first steps of an
ebuild):

 * econf: updating nano-1.3.7/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating nano-1.3.7/config.sub with /usr/share/gnuconfig/config.sub
./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man
--infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
--localstatedir=/var/lib --bindir=/bin --enable-color --enable-multibuffer
--enable-nanorc --enable-spell --disable-justify --disable-debug --enable-nls
--enable-utf8
Missing }.

!!! ERROR: app-editors/nano-1.3.7 failed.
!!! Function econf, Line 485, Exitcode 0
!!! econf failed
!!! If you need support, post the topmost build error, NOT this status message.

But I think that's the fault of tcsh!? I never used it really, just tested...
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2005-06-15 07:28:16 UTC
You hand-edited a very important sym link that was installed by a system package
and then things broke.  That's pretty firmly in the "you break it, you buy it"
category.  It's your system, so you can do whatever you want to it, but it's not
a bug in Gentoo.
Comment 2 Tom 2005-10-17 18:15:55 UTC
Wrong! Designating #!/bin/sh as interpreter while using bash elements for sh
scripts, breaks with almost all Unix-world standards.

Using bash features while calling /bin/sh IS a bug, one that spreads like cancer.

Result: b0orken
Comment 3 SpanKY gentoo-dev 2005-10-17 18:30:07 UTC
you didnt prove that dash or tcsh are the ones to blame here

autoconf is designed to be written in portable sh so i'd be highly doubtful that
it's the one to blame here ... much more likely the shell you're dropping in
place of /bin/sh is the thing that's broken

do some research before you start complaining loudly