From owner-p4-projects@FreeBSD.ORG Wed Aug 10 12:17:21 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1AAF116A421; Wed, 10 Aug 2005 12:17:21 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E4FCE16A41F for ; Wed, 10 Aug 2005 12:17:20 +0000 (GMT) (envelope-from soc-saturnero@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B7C2743D75 for ; Wed, 10 Aug 2005 12:17:18 +0000 (GMT) (envelope-from soc-saturnero@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j7ACHI00023866 for ; Wed, 10 Aug 2005 12:17:18 GMT (envelope-from soc-saturnero@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j7ACHI5E023863 for perforce@freebsd.org; Wed, 10 Aug 2005 12:17:18 GMT (envelope-from soc-saturnero@freebsd.org) Date: Wed, 10 Aug 2005 12:17:18 GMT Message-Id: <200508101217.j7ACHI5E023863@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-saturnero@freebsd.org using -f From: soc-saturnero To: Perforce Change Reviews Cc: Subject: PERFORCE change 81775 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2005 12:17:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=81775 Change 81775 by soc-saturnero@soc-saturnero_sberta on 2005/08/10 12:17:09 Install packages only if selected arch is equal to $(uname -m) Affected files ... .. //depot/projects/soc2005/freesbie/ToDo#7 edit .. //depot/projects/soc2005/freesbie/scripts/pkginstall.sh#2 edit Differences ... ==== //depot/projects/soc2005/freesbie/ToDo#7 (text+ko) ==== @@ -14,7 +14,7 @@ List of files to be created: / - configure # Dialog-based configuration toolkit, creates config.sh + configure # Dialog-based configuration toolkit, creates conf/freesbie.conf Makefile # Launches scripts, according to the selected target #Configuration file used in the build phase ==== //depot/projects/soc2005/freesbie/scripts/pkginstall.sh#2 (text+ko) ==== @@ -12,9 +12,24 @@ exit 1 fi +PKGFILE=${PKGFILE:-${LOCALDIR}/conf/packages}; + +if [ ! -f ${PKGFILE} ]; then + return +fi + +if [ "${ARCH}" != "$(uname -m)" ]; then + echo "----------------------------------------------------------" + echo "You can install packages only if your machine architecture" + echo "is the same of the target architecture." + echo "----------------------------------------------------------" + echo "Skipping package installation." + sleep 5 + return +fi + WORKDIR=$(mktemp -d -t freesbie) CHROOTWD=$(TMPDIR=${BASEDIR}/tmp mktemp -d -t freesbie) -PKGFILE=${PKGFILE:-${LOCALDIR}/conf/packages}; find_origins() { cd ${WORKDIR} @@ -127,13 +142,11 @@ trap "purge_wd && exit 1" INT -if [ -f ${PKGFILE} ]; then - echo "Installing packages listed in ${PKGFILE}" - find_origins - find_deps - create_packages - delete_old_packages - install_packages -fi +echo "Installing packages listed in ${PKGFILE}" +find_origins +find_deps +create_packages +delete_old_packages +install_packages purge_wd