emerge arch fails because head -1 is obsolete in coreutils-5.0.91 to fix it, use the following ebuild and patch: $ diff -u arch-1.0_pre17.ebuild arch-1.0_pre17-r2.ebuild --- arch-1.0_pre17.ebuild 2003-10-06 12:06:46.000000000 +0100 +++ arch-1.0_pre17-r2.ebuild 2003-11-12 23:11:49.000000000 +0000 @@ -33,6 +33,7 @@ cp ${t} ${t}.orig sed 's:/libexec:/share:g' ${t}.orig > ${t} || die "Patch failed for $t" + epatch ${FILESDIR}/arch-1.0pre17-head-option-patch.diff } src_compile() { $ cat files/arch-1.0pre17-head-option-patch.diff diff -ur arch-1.0pre17/src/build-tools/scripts/configure-top arch-1.0pre17-head-option-patch/src/build-tools/scripts/configure-top --- arch-1.0pre17/src/build-tools/scripts/configure-top 2003-02-04 23:24:43.000000000 +0000 +++ arch-1.0pre17-head-option-patch/src/build-tools/scripts/configure-top 2003-11-12 23:02:56.000000000 +0000 @@ -355,8 +355,13 @@ basere="([a-zA-Z]([a-zA-Z0-9]*(-[a-zA-Z0-9]+)?)*)" vsnre="([0-9]+\\.[0-9]+)" patchre="(base-0|patch-[0-9]+|version-0|version-fix-[0-9]+)" - - package=`grep -E -e "^[ ]*($basere)(--$basere)?(--$vsnre(--$patchre)?)?[ ]*(;.*)?\$" "$pkgfile" | head -1` + # head -2 is obsolete in coreutils-5.0.91 + if [ `echo "test"|head -1 2>/dev/null` ]; then + HEAD="head -" + else + HEAD="head -n " + fi + package=`grep -E -e "^[ ]*($basere)(--$basere)?(--$vsnre(--$patchre)?)?[ ]*(;.*)?\$" "$pkgfile" | $HEAD 1` if test "x$package" = x ; then echo "ERROR: ill-formed distribution name in =project ($pkgfile)." 1>&2
The test in the diff file should swallow stdout as well, viz: if [ `echo "test"|head -1 >/dev/null 2>/dev/null` ]; then
I didn't remember off the top of my head if /bin/sh supported the fd dupping syntax, but seeing as its at the bottom of the patch I guess it does. So the line would read better as if [ `echo "test"|head -1 >/dev/null 2>&1` ]; then Now, brain, you can stop thinking about this please.
This doesn't happen any more with dev-util/tla-1.2-r2