PERFORCE change 81775 for review
soc-saturnero
soc-saturnero at FreeBSD.org
Wed Aug 10 12:17:22 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=81775
Change 81775 by soc-saturnero at 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
More information about the p4-projects
mailing list