Package manager version: 0.28.5
Distribution version: selfupdate-rsync Mon Aug 11 03:06:41 2008, 10.5, i386

Copyright (c) 2001 Christoph Pfisterer
Copyright (c) 2001-2008 The Fink Package Manager Team
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5465)

Generated by following script:

#!/bin/bash
# This script never returns exit code 0 :-p
# $Id: fink-build-forever.bash,v 1.44 2008/02/09 06:03:46 okayama Exp $

# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.

# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with GCC; see the file COPYING.  If not, write to
# the Free Software Foundation, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.

. /sw/bin/init.sh

set -ex

LC_ALL=C; export LC_ALL
PATH=/sbin:/bin:/usr/sbin:/usr/bin:$PATH; export PATH
JAVA_HOME=/Library/Java/Home; export JAVA_HOME
ANT_HOME=/sw/lib/ant; export ANT_HOME

mypath=$0
myname=`echo "x$0"|sed 's,^.*/,,'`
mydir=`echo "x$0"|sed 's,^x,,; s,/[^/]*$,,'`
if test ! -x "$0" || test -z "$myname" || test -z "$mydir"; then
    echo "Cannot detect my path" >&2;
    exit 2;
fi
dontremove="$mydir/dontremove.sed"
tmpdir="${tmpdir:-/var/root}"
logbasedir="${logbasedir:-/var/log/fink-build-forever}"

buildlist="${tmpdir}/fink-build-list.tmp"
removelist="${tmpdir}/fink-remove-list.tmp"
skiptofile="${tmpdir}/fink-skipto.tmp"

skipto=
next_skipto=no
for arg in "$@"; do
    case $next_skipto in
        yes) skipto=$arg; next_skipto=no; continue;;
    esac
    case $arg in
        -skipto) next_skipto=yes;;
        -h|-help|--help) echo "usage: fink-build-forever.bash [-skipto package]";;
        *) echo "bad argument; try -help" >&2;;
    esac
done

if [ "${skipto}" == "" ]; then
    if [ ! -f "${skiptofile}" ]; then
        mv "${skiptofile}".bak "${skiptofile}" || true
    fi
    if [ -f "${skiptofile}" ]; then
        skipto=`cat "${skiptofile}"`
        mv "${skiptofile}" "${skiptofile}".bak
        if test "x$skipto" != x && test -f "${buildlist}" && \
            grep -q '^'"${skipto}"'$' "${buildlist}"; then
            exec "$mypath" -skipto "${skipto}"
        fi
    fi
fi

distribution=`grep -i '^distribution:' /sw/etc/fink.conf|sed -n '1s/^[^:]*: *//p' || :`
if test "x$distribution" = x; then
    echo "Cannot detect the distribution" >&2;
    exit 2;
fi

trap 'cleanup $?' 0

printlist() {
    fink list -t "$@" |
      awk -F'\t' '($1 !~ /p/ && $2 !~ /^system-/ && $4 !~ /\[virtual package/) {print $2}'
}

removeall() {
    printlist -i | sed -f "$dontremove" > "${removelist}"
    xargs -n 900 -t fink -y purge < "${removelist}"
    rm -f "${removelist}"
}

cleanup() {
    rm -f "${buildlist}"{,.bak.2} "${removelist}" "${errdir}/${pkg}.err"
    return $1
}

mkdir -p "${logbasedir}"
{
    echo "Generated by following script:"
    echo
    cat "$mypath"
    echo
    echo "The dontremove.sed is:"
    echo
    cat "$dontremove"
} > "${logbasedir}/README"

errdir="${logbasedir}/`date +%Y-%m-%d`"
if test -d "${errdir}"; then
    errdirno=2
    while test -d "${errdir}.${errdirno}"; do
        errdirno=`expr $errdirno + 1`
    done
    errdir=${errdir}.${errdirno}
fi
mkdir -p "${errdir}"
{
    fink -V
    echo
    gcc -v 2>&1
    echo
    cat "${logbasedir}/README"
} > "${errdir}/README"

if [ -f "${buildlist}.bak" ]; then
    cp -f "${buildlist}.bak" "${buildlist}"
else
    printlist -n > "${buildlist}"
    cp -f "${buildlist}" "${buildlist}.bak"
fi
fink -b -y install apt ccache ccache-default
if osascript < /dev/null > /dev/null; then
    windowserver=true
else
    windowserver=false
fi
while read pkg; do
    case x$skipto in
        x) ;;
        x$pkg) skipto=;;
        *) continue;;
    esac
    echo $pkg > "${skiptofile}"
    case $windowserver:$pkg in
        false:openoffice.org*) continue;; # osacompile requires WindowServer access
        *:gwydion-dylan*) continue;; # falls into interactive debugger
    esac
    case x`fink dumpinfo -fparent $pkg` in
        xparent:*) # is a splitoff
        /usr/bin/sed -i.2 "/^${pkg}\$/d" "${buildlist}.bak"
        rm -f "${buildlist}.bak.2"
        continue
        ;;
    esac
    (
        removeall
        fink -y build ${pkg} 2>&1 | (
            set -m
            trap '' 2
            grep -v '^ld: warning prebinding not disabled because' |
                head -500000 | tee "${errdir}/${pkg}.err" &
            trap - 2
            wait)
        case ${PIPESTATUS[0]}-${PIPESTATUS[1]} in
            0-*)
            rm -f "${errdir}/${pkg}.err"
            /usr/bin/sed -i.2 "/^${pkg}\$/d" "${buildlist}.bak"
            rm -f "${buildlist}.bak.2"
            ;;
            *-130) # probablly caught a SIGINT (130=128+2)
            exit 1;;
            *) [ -f "${errdir}/${pkg}.err" ] && gzip "${errdir}/${pkg}.err" & ;;
        esac
        rm -rf /sw/src/fink.build/*openoffice.org*
    ) < /dev/null
    case $? in 0) ;; *) exit;; esac
done < "${buildlist}"
removeall

pushd "/sw/fink/$distribution/unstable/main/binary-darwin-`uname -p`"
find . -name "*.deb" | xargs fink validate > "${errdir}/DEBS-$distribution-unstable-main"
cd    "/sw/fink/$distribution/unstable/crypto/binary-darwin-`uname -p`"
find . -name "*.deb" | xargs fink validate > "${errdir}/DEBS-$distribution-unstable-crypto"
popd

rm -f "${skiptofile}"{,.bak}

# After fink is updated and reexcecuted, -y option is forgot
yes '' | fink -b -y selfupdate
rm -f "${buildlist}"{,.bak,.bak.2}

emacs21info=/sw/fink/10.4/unstable/main/finkinfo/editors/emacs21*.info
openvrml016info=/sw/fink/10.4/unstable/crypto/finkinfo/openvrml016.info
for i in $emacs21info $openvrml016info; do
    if test -e $i; then
        if ! grep -q '^Architecture:' $i; then
            ed $i <<EOF
4
i
Architecture: powerpc
.
w
q
EOF
        fi
    fi
done

exec "$mypath"

The dontremove.sed is:

# $Id: dontremove.sed,v 1.4 2005/07/24 15:51:12 shinra Exp $
/^base-files$/d
/^bzip2$/d
/^bzip2-shlibs$/d
/^cctools-extra$/d
/^debianutils$/d
/^dpkg$/d
/^fink$/d
/^fink-mirrors$/d
/^fink-prebinding$/d
/^gettext$/d
/^gzip$/d
/^libiconv$/d
/^libiconv-bin$/d
/^libncurses5-shlibs$/d
/^ncurses$/d
/^ncurses-shlibs$/d
/^tar$/d
/^unzip$/d
 
/^apt$/d
/^apt-shlibs$/d
/^ccache$/d
/^ccache-default$/d
