From 95503b42017a3b96f810e3195d8edaa64995ce78 Mon Sep 17 00:00:00 2001 From: Noam Angel Date: Mon, 3 Apr 2017 12:13:26 +0300 Subject: [PATCH] Move do_extra_package_install to run in install phase This change move "do_extra_package_install" from pre-install to install phase. Extra packages are added by user request using the flag "-p", This package should not be something the elements depend on. The reason behind this patch is to move the extra package install to a proper phase, Also more reasonable if base element run package update to be before we install extra packages. Change-Id: I68cc773aba9aa01743f0dda9f4e635e4cac2a282 --- diskimage_builder/lib/disk-image-create | 4 ++-- .../notes/dash-p-after-install-58a87549c1c906c3.yaml | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/dash-p-after-install-58a87549c1c906c3.yaml diff --git a/diskimage_builder/lib/disk-image-create b/diskimage_builder/lib/disk-image-create index de52b7f5..151158f8 100644 --- a/diskimage_builder/lib/disk-image-create +++ b/diskimage_builder/lib/disk-image-create @@ -79,7 +79,7 @@ function show_options () { echo " --docker-target -- specify the repo and tag to use if the output type is docker. Defaults to the value of output imagename" if [ "$IS_RAMDISK" == "0" ]; then echo " -n skip the default inclusion of the 'base' element" - echo " -p package[,package,package] -- list of packages to install in the image. If specified multiple times the packages are appended to the list." + echo " -p package[,p2...] [-p p3] -- extra packages to install in the image. Runs once, after 'install.d' phase. Can be specified mulitple times" fi echo " -h|--help -- display this help and exit" echo " --version -- display version and exit" @@ -283,9 +283,9 @@ echo "export DIB_DEFAULT_INSTALLTYPE=\${DIB_DEFAULT_INSTALLTYPE:-\"${DIB_DEFAULT run_d extra-data # Run pre-install scripts. These do things that prepare the chroot for package installs run_d_in_target pre-install -do_extra_package_install # Call install scripts to pull in the software users want. run_d_in_target install +do_extra_package_install run_d_in_target post-install # ensure we do not have a lost+found directory in the root folder # that could cause copy to fail (it will be created again later diff --git a/releasenotes/notes/dash-p-after-install-58a87549c1c906c3.yaml b/releasenotes/notes/dash-p-after-install-58a87549c1c906c3.yaml new file mode 100644 index 00000000..bb956841 --- /dev/null +++ b/releasenotes/notes/dash-p-after-install-58a87549c1c906c3.yaml @@ -0,0 +1,5 @@ +other: + - The packages specified with the `-p` command-line operation are + now installed after the `install.d` phase, not before. This is to + give elements priority when installing packages. The flag + documentation has been updated to describe this.