Don't install criu for arm64/s390x prior to artful

The criu package doesn't exist for arm64/s390x prior to artful,
causing an install hook failure. Let's not attempt to install
it when that is the case.

Change-Id: If0cc517d9e607604e427aab385fabd8a9a193fdf
Closes-Bug: #1748235
This commit is contained in:
Corey Bryant 2018-05-04 14:57:54 +00:00
parent c17459aeea
commit d545eb292e
1 changed files with 8 additions and 0 deletions

View File

@ -17,6 +17,7 @@ import io
import json
import pwd
import os
import platform
import shutil
from subprocess import call, check_call, check_output, CalledProcessError
import subprocess
@ -402,6 +403,13 @@ def create_and_import_busybox_image():
def determine_packages():
packages = [] + BASE_PACKAGES
packages = list(set(packages))
# criu package doesn't exist for arm64/s390x prior to artful
machine = platform.machine()
if (CompareHostReleases(lsb_release()['DISTRIB_CODENAME']) < 'artful' and
(machine == 'arm64' or machine == 's390x')):
packages.remove('criu')
if config('use-source'):
packages.extend(LXD_SOURCE_PACKAGES)
else: