summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2017-09-05 09:40:35 +0100
committerMarkos Chandras <mchandras@suse.de>2017-09-16 10:30:55 +0100
commit0b977bf08fcec6a709da59704fd27dcb49039abd (patch)
tree14fb7c706cd9702a7b4049e04ee931f73f6e6886
parent9740c63ede4d2d804dcfdb25d80804abc924b20e (diff)
Vagrantfile: Update base OS before installing XCI
The Vagrant image may be old and have stale metadata leading to failures when installing packages. As such, it's best to update it as soon as possible. This is also inline with the AIO documentation which suggests to always use an up to date OS. Change-Id: I43d9f8431e1a6ed877936adc65c54be466b76aff Signed-off-by: Markos Chandras <mchandras@suse.de>
-rw-r--r--Vagrantfile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Vagrantfile b/Vagrantfile
index 26a2a326..58b6368e 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -37,6 +37,7 @@ Vagrant.configure(2) do |config|
config.vm.provision "shell"do |s|
s.privileged = false
s.inline = <<-SHELL
+ sudo apt-get update
cd /vagrant
export XCI_FLAVOR=${XCI_FLAVOR:-mini}
export VM_CPU=${VM_CPU:-2}
@@ -65,6 +66,7 @@ Vagrant.configure(2) do |config|
config.vm.provision "shell" do |s|
s.privileged = false
s.inline = <<-SHELL
+ sudo yum update
cd /vagrant
PART_START=$(sudo parted /dev/sda --script unit MB print | awk '/^ 3 / {print $3}')
sudo parted /dev/sda --script unit MB mkpart primary ${PART_START} 100%
@@ -101,6 +103,7 @@ Vagrant.configure(2) do |config|
# btrfs filesystem.
s.privileged = false
s.inline = <<-SHELL
+ sudo zypper -n up -l
cd /vagrant
echo -e 'd\n2\nn\np\n\n\n\nn\nw' | sudo fdisk /dev/sda
PART_END=$(sudo fdisk -l /dev/sda | grep ^/dev/sda2 | awk '{print $4}')
@@ -128,6 +131,7 @@ Vagrant.configure(2) do |config|
# btrfs filesystem.
s.privileged = false
s.inline = <<-SHELL
+ sudo zypper -n up -l
cd /vagrant
echo -e 'd\n2\nn\np\n\n\n\nn\nw' | sudo fdisk /dev/sda
PART_END=$(sudo fdisk -l /dev/sda | grep ^/dev/sda2 | awk '{print $4}')