From 8f118af7d396ddbe8edce85391c3c5586285274a Mon Sep 17 00:00:00 2001 From: Ripal Nathuji Date: Mon, 18 Nov 2013 17:12:27 -0600 Subject: [PATCH] Fix issue with Ubuntu grub pre-install step for ARM The Ubuntu build for ARM breaks when the pre-install step attempts to remove grub components. This change gates those package removals based on whether they are currently installed. Change-Id: Ie169dbf12213e69b3713b3b1f9a68ae224f9fd31 --- elements/ubuntu/pre-install.d/00-remove-grub | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/elements/ubuntu/pre-install.d/00-remove-grub b/elements/ubuntu/pre-install.d/00-remove-grub index e99f42af..399e7b22 100755 --- a/elements/ubuntu/pre-install.d/00-remove-grub +++ b/elements/ubuntu/pre-install.d/00-remove-grub @@ -5,4 +5,10 @@ set -e -apt-get -y remove grub-pc grub2-common +if dpkg-query -W grub-pc; then + apt-get -y remove grub-pc +fi + +if dpkg-query -W grub2-common; then + apt-get -y remove grub2-common +fi