Bug 65729 - pingus doesn't merge properly with bash-3.0-r6 [with fix]
Bug#: 65729 Product:  Gentoo Linux Version: 2004.2 Platform: All
OS/Version: All Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: games@gentoo.org Reported By: cbm@m.fsf.org
Component: Ebuilds
URL: 
Summary: pingus doesn't merge properly with bash-3.0-r6 [with fix]
Keywords:  
Status Whiteboard: 
Opened: 2004-09-28 14:42 0000
Description:   Opened: 2004-09-28 14:42 0000
After building, emerge pingus dies with the following error:
make[1]: Leaving directory `/var/tmp/portage/pingus-0.6.0-r1/work/pingus-0.6.0'
mv: missing file argument
Try `mv --help' for more information.
nls
man:
gzipping man page: pingus.6
.
.
.
(but processes finishes "successfully")

An I ended up with a "/usr/games/games" dir with the pingus executable in their instead of in "/usr/games/bin" with some other games I have installed.

This is related to the "POS install process" :)

src_install() {
        make install DESTDIR=${D} || die "make install failed"
        # pos install process ... FIXME
        mv "${D}/usr/games/"{games,bin}
        cd "${D}/usr/share/games"
        use nls && mv locale ../
        mv games/pingus .
        rm -rf games
        # end pos install process
        prepgamesdirs
}

The mv line expands correctly on my desktop system but not on my desktop:

LAPTOP:
nilok@belladonna ~ $ echo "${D}/usr/games/"{games,bin}
temp/usr/games/{games,bin}
nilok@belladonna ~ $ bash --version
GNU bash, version 3.00.13(1)-release (i686-pc-linux-gnu)
Copyright (C) 2004 Free Software Foundation, Inc.

DESKTOP:
nilok@aconite ~ $ echo "${D}/usr/games/"{games,bin}
temp/usr/games/games temp/usr/games/bin
nilok@aconite ~ $ bash --version
GNU bash, version 3.00.0(1)-release (i686-pc-linux-gnu)
Copyright (C) 2004 Free Software Foundation, Inc.
nilok@aconite ~ $

So I guess its a bash version thing.  Anyway, long story short, change the mv line from:
mv "${D}/usr/games/"{games,bin}
to
mv ${D}/usr/games/games ${D}/usr/games/bin
and stop trying to use fancy bash script that I don't understand ;-)

Also, should mv commands and stuff like that have a "| die" after them.  This bug wouldn't been a lot more obivious if they did...

------- Comment #1 From Lars Wendler (Polynomial-C) 2004-09-29 18:49:47 0000 -------
Created an attachment (id=40743) [details]
bash-3.0-braceexpansion-fix.patch

Hi,

Aron Griffis already reported this bug to Chet Ramey (bash maintainer). And
Chet already provided a fix for this. It's short but not yet reported here, so
I do this :)

Poly

------- Comment #2 From Mr. Bones. 2004-09-30 04:38:29 0000 -------
straight-forward is better.  I just changed it to bash code that'll work with
both versions.