Fix up functions refactoring tfor a proper path to the file.

ubuntu/zesty
Mathieu Trudel-Lapierre 8 years ago
parent ab949fac18
commit 46bae4cebf

@ -33,6 +33,9 @@ if [ -z "$MIRROR" ]; then
esac esac
fi fi
mkdir -p config
cp -af /usr/share/livecd-rootfs/live-build/functions config/functions
mkdir -p config/package-lists mkdir -p config/package-lists
add_task () add_task ()

@ -87,6 +87,17 @@ mount_partition() {
setup_mountpoint "$mountpoint" setup_mountpoint "$mountpoint"
} }
mount_overlay() {
lower="$1"
upper="$2"
work="$2/../work"
path="$3"
mkdir -p "$work"
mount -t overlay overlay \
-olowerdir="$lower",upperdir="$upper",workdir="$work" \
"$path"
}
mount_disk_image() { mount_disk_image() {
local disk_image=${1} local disk_image=${1}

@ -3,7 +3,7 @@
IMAGE_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process" IMAGE_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process"
FS_LABEL="cloudimg-rootfs" FS_LABEL="cloudimg-rootfs"
. auto/functions . config/functions
BOOTPART_START= BOOTPART_START=
BOOTPART_END= BOOTPART_END=

@ -17,7 +17,7 @@ if [ -n "$SUBARCH" ]; then
exit 0 exit 0
fi fi
. auto/functions . config/functions
mkdir binary/boot/squashfs.dir mkdir binary/boot/squashfs.dir
cp -a chroot/* binary/boot/squashfs.dir cp -a chroot/* binary/boot/squashfs.dir

@ -12,7 +12,7 @@ esac
IMAGE_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process" IMAGE_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process"
FS_LABEL="cloudimg-rootfs" FS_LABEL="cloudimg-rootfs"
. auto/functions . config/functions
apt-get -qqy install dosfstools gdisk apt-get -qqy install dosfstools gdisk

@ -10,7 +10,7 @@ esac
IMAGE_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process" IMAGE_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process"
FS_LABEL="cloudimg-rootfs" FS_LABEL="cloudimg-rootfs"
. auto/functions . config/functions
create_partitions() { create_partitions() {
disk_image="$1" disk_image="$1"

@ -21,7 +21,7 @@ esac
apt-get install -qqy qemu-utils apt-get install -qqy qemu-utils
. auto/functions . config/functions
if [ -f binary/boot/disk-uefi.ext4 ]; then if [ -f binary/boot/disk-uefi.ext4 ]; then
convert_to_qcow2 binary/boot/disk-uefi.ext4 livecd.ubuntu-cpc.img convert_to_qcow2 binary/boot/disk-uefi.ext4 livecd.ubuntu-cpc.img

@ -18,7 +18,7 @@ case ${IMAGE_TARGETS:-} in
;; ;;
esac esac
. auto/functions . config/functions
if [ -e binary/boot/disk-uefi.ext4 ]; then if [ -e binary/boot/disk-uefi.ext4 ]; then
create_vmdk binary/boot/disk-uefi.ext4 livecd.ubuntu-cpc.vmdk create_vmdk binary/boot/disk-uefi.ext4 livecd.ubuntu-cpc.vmdk

@ -44,7 +44,7 @@ case $ARCH in
exit 0;; exit 0;;
esac esac
. auto/functions . config/functions
# Virtualbox is needed for making a small VMDK # Virtualbox is needed for making a small VMDK
apt-get -qqy install genisoimage qemu-utils apt-get -qqy install genisoimage qemu-utils

@ -9,7 +9,7 @@ if [ ! -d ${my_dir}/extra ]; then
fi fi
# Export the common functions to the extras # Export the common functions to the extras
. auto/functions . config/functions
# Cleaner execution # Cleaner execution
/bin/run-parts --regex ".*\.binary" "${extra_d}" /bin/run-parts --regex ".*\.binary" "${extra_d}"

@ -20,7 +20,7 @@ if [ -n "$SUBARCH" ]; then
exit 0 exit 0
fi fi
. auto/functions . config/functions
mkdir binary/boot/squashfs.dir mkdir binary/boot/squashfs.dir
cp -a chroot/* binary/boot/squashfs.dir cp -a chroot/* binary/boot/squashfs.dir

@ -21,7 +21,7 @@ if [ -n "$SUBARCH" ]; then
exit 0 exit 0
fi fi
. auto/functions . config/functions
SQUASH_ROOT=binary/boot/squashfs.dir SQUASH_ROOT=binary/boot/squashfs.dir
OVERLAY_ROOT=binary/boot/overlay.dir OVERLAY_ROOT=binary/boot/overlay.dir

Loading…
Cancel
Save