diskimage-builder/elements/base/pre-install.d/03-baseline-tools
Ben Kero e64a6f8c9a Fix add-apt-repository package for precise
Running 'disk-image-create -a amd64 -o precise vm precise' will fail to
build with the following error [1]. To fix this, we should split out the
switch-case to allow base to install the 'software-properties-common'
package.

[1]

dib-run-parts Fri Mar 18 18:43:16 UTC 2016 Running /tmp/in_target.d/pre-install.d/03-baseline-tools
Hit:1 http://mirrors.cat.pdx.edu/ubuntu precise InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-software-properties is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  software-properties-common

  E: Package 'python-software-properties' has no installation candidate

Change-Id: I011f02fcf70df9d1d6fa30ed89907fbc2588937e
2016-04-06 11:08:07 -07:00

22 lines
567 B
Bash
Executable File

#!/bin/bash
# Install baseline packages and tools.
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
case $DISTRO_NAME in
'ubuntu'|'debian')
# Note: add-apt-repository would be nice for RPM platforms too - so when we
# need something like it, create a wrapper in dpkg/bin and fedora/bin.
apt-get -y update
if [ "${DIB_RELEASE}" = "precise" ]; then
install-packages python-software-properties
else
install-packages software-properties-common
fi
;;
esac