git://git.onelab.eu
/
myplc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c72a95e
)
Let mkfedora pick the right URL to get the RPMs, unless it is specifically specified...
author
Marc Fiuczynski
<mef@cs.princeton.edu>
Fri, 24 Aug 2007 07:11:36 +0000
(07:11 +0000)
committer
Marc Fiuczynski
<mef@cs.princeton.edu>
Fri, 24 Aug 2007 07:11:36 +0000
(07:11 +0000)
build.functions
patch
|
blob
|
history
diff --git
a/build.functions
b/build.functions
index
965a880
..
c99941e
100644
(file)
--- a/
build.functions
+++ b/
build.functions
@@
-6,7
+6,7
@@
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: build.functions,v 1.
6 2007/08/16 21:42:02
mef Exp $
+# $Id: build.functions,v 1.
7 2007/08/24 06:46:39
mef Exp $
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin
@@
-28,7
+28,9
@@
export PATH
PLC_DEVEL_FEDORA_RELEASE=$([ -f "/etc/fedora-release" ] && awk ' { if ($3=="Core") print $4; else print $3 } ' /etc/fedora-release || echo 4)
PLC_DEVEL_FEDORA_ARCH=$(uname -i)
# Fedora Core mirror from which to install filesystems
PLC_DEVEL_FEDORA_RELEASE=$([ -f "/etc/fedora-release" ] && awk ' { if ($3=="Core") print $4; else print $3 } ' /etc/fedora-release || echo 4)
PLC_DEVEL_FEDORA_ARCH=$(uname -i)
# Fedora Core mirror from which to install filesystems
-PLC_DEVEL_FEDORA_URL=file:///data/fedora
+# xxx don't set URL... mkfedora will pick up the right thing
+#PLC_DEVEL_FEDORA_URL=file:///data/fedora
+PLC_DEVEL_FEDORA_URL=
# We may be running inside a myplc-devel environment, which can
# override these defaults.
# We may be running inside a myplc-devel environment, which can
# override these defaults.
@@
-89,7
+91,11
@@
make_chroot() {
done < <(./plc-config --packages $config)
# Install base system
done < <(./plc-config --packages $config)
# Install base system
- eval mkfedora -v -l $PLC_DEVEL_FEDORA_URL -r $PLC_DEVEL_FEDORA_RELEASE -a $PLC_DEVEL_FEDORA_ARCH $packages $groups $root
+ if [ ! -z "$PLC_DEVEL_FEDORA_URL" ] ; then
+ eval mkfedora -v -l $PLC_DEVEL_FEDORA_URL -r $PLC_DEVEL_FEDORA_RELEASE -a $PLC_DEVEL_FEDORA_ARCH $packages $groups $root
+ else
+ eval mkfedora -v -r $PLC_DEVEL_FEDORA_RELEASE -a $PLC_DEVEL_FEDORA_ARCH $packages $groups $root
+ fi
# Disable all services in reference image
chroot $root sh -c "/sbin/chkconfig --list | awk '{ print \$1 }' | xargs -i /sbin/chkconfig {} off"
# Disable all services in reference image
chroot $root sh -c "/sbin/chkconfig --list | awk '{ print \$1 }' | xargs -i /sbin/chkconfig {} off"