build-img fails if not run under $MY_WORKSPACE
Build-img may need to generate a patch that is to be applied to the image being produced. The patch build tool drops the patch into the current directory. No explicit working directory was set. A subsequent step tries to apply the patch, but assumes it is in $MY_WORKSPACE. We want all build artifacts to be placed under $MY_WORKSPACE, so set $MY_WORKSPACE as the current directory before creating the patch. Closes-Bug: 1915182 Signed-off-by: Scott Little <scott.little@windriver.com> Change-Id: Ie2fbafae7a0ec90fc11e4af3d67dd15aec27c909
This commit is contained in:
parent
395308f881
commit
71d5ae9df9
@ -561,6 +561,9 @@ echo "${cmd[@]}"
|
|||||||
|
|
||||||
# patch the iso if additional rpms are specified
|
# patch the iso if additional rpms are specified
|
||||||
if [ ${#RPM_ADDON_LIST[@]} -gt 0 ] ; then
|
if [ ${#RPM_ADDON_LIST[@]} -gt 0 ] ; then
|
||||||
|
# Patch build will drop the generated patch file into the current directory.
|
||||||
|
# We want that to be $MY_WORKSPACE.
|
||||||
|
pushd $MY_WORKSPACE
|
||||||
patch_file="PATCH.img-addon"
|
patch_file="PATCH.img-addon"
|
||||||
patched_iso="$TEMPFILES_DIR/bootimage_${AUTO_MODE}${GRAPHICAL_SUFFIX}_patched.iso"
|
patched_iso="$TEMPFILES_DIR/bootimage_${AUTO_MODE}${GRAPHICAL_SUFFIX}_patched.iso"
|
||||||
cmd=("$PATCH_BUILD" --id "${patch_file}" --summary "additional packages for qcow2 image" --desc "Adds customizations to qcow2 image")
|
cmd=("$PATCH_BUILD" --id "${patch_file}" --summary "additional packages for qcow2 image" --desc "Adds customizations to qcow2 image")
|
||||||
@ -575,6 +578,7 @@ if [ ${#RPM_ADDON_LIST[@]} -gt 0 ] ; then
|
|||||||
echo "${cmd[@]}"
|
echo "${cmd[@]}"
|
||||||
"${cmd[@]}" || exit 1
|
"${cmd[@]}" || exit 1
|
||||||
mv ${patched_iso} ${auto_iso}
|
mv ${patched_iso} ${auto_iso}
|
||||||
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# create a blank image file
|
# create a blank image file
|
||||||
|
Loading…
Reference in New Issue
Block a user