Vagrantfile: Update base OS before installing XCI 17/41617/2
authorMarkos Chandras <mchandras@suse.de>
Tue, 5 Sep 2017 08:40:35 +0000 (09:40 +0100)
committerMarkos Chandras <mchandras@suse.de>
Sat, 16 Sep 2017 09:30:55 +0000 (10:30 +0100)
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>
Vagrantfile

index 26a2a32..58b6368 100644 (file)
@@ -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}')