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
fix code that guesses if dnf is present in container
[build.git]
/
lbuild-initvm.sh
diff --git
a/lbuild-initvm.sh
b/lbuild-initvm.sh
index
b3c8f27
..
addf7eb
100755
(executable)
--- a/
lbuild-initvm.sh
+++ b/
lbuild-initvm.sh
@@
-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