git://git.onelab.eu
/
build.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pyplnet
[build.git]
/
lbuild-initvm.sh
diff --git
a/lbuild-initvm.sh
b/lbuild-initvm.sh
index
b3c8f27
..
aa71460
100755
(executable)
--- a/
lbuild-initvm.sh
+++ b/
lbuild-initvm.sh
@@
-30,7
+30,7
@@
function lxcroot () {
# XXX fixme : when creating a 32bits VM we need to call linux32 as appropriate...s
# XXX fixme : when creating a 32bits VM we need to call linux32 as appropriate...s
-DEFAULT_FCDISTRO=f2
4
+DEFAULT_FCDISTRO=f2
7
DEFAULT_PLDISTRO=lxc
DEFAULT_PERSONALITY=linux64
DEFAULT_MEMORY=3072
DEFAULT_PLDISTRO=lxc
DEFAULT_PERSONALITY=linux64
DEFAULT_MEMORY=3072
@@
-655,11
+655,15
@@
function devel_or_test_tools () {
case "$pkg_method" in
yum)
# --allowerasing required starting with fedora24
case "$pkg_method" in
yum)
# --allowerasing required starting with fedora24
- dnf=$(chroot ${lxc_root} $personality type -p dnf)
- if [ -n "$dnf" ]; then
+ #
+ has_dnf=""
+ chroot ${lxc_root} $personality dnf --version && has_dnf=true
+ if [ -n "$has_dnf" ]; then
+ echo "container has dnf - invoking with --allowerasing"
pkg_installer="dnf -y install --allowerasing"
grp_installer="dnf -y groupinstall --allowerasing"
else
pkg_installer="dnf -y install --allowerasing"
grp_installer="dnf -y groupinstall --allowerasing"
else
+ echo "container has only yum"
pkg_installer="yum -y install"
grp_installer="yum -y groupinstall"
fi
pkg_installer="yum -y install"
grp_installer="yum -y groupinstall"
fi