Until now, the update.cfg file has contained entries even when the
related image file was not generated due to lack of differences. For
example if there were no differences between Tizen versions for boot.img
then the image as not placed in delta.tar file, but in update.cfg the
entry associated with it remained.
This patch removes entries for which there is no corresponding image. In
case the resulting update.cfg (e.g. an update between the same
versions), the mk_delta.sh script will end with an error.
Change-Id: I61278a8f1efb69bd908b1dd1aae5ebf714963f6e
sudo mv data/${PART_OUT} ${RESULT_DIR}/${part_bin}
sudo mv ${RESULT_DIR}/${part_bin}/${delta_bin} ${DELTA_DIR}
fi
+ if [ "$?" != "0" ]; then
+ echo "Warning: No differences - remove record for \"${part_name}\" from the final update.cfg"
+ sed -i "/^${part_name}\b/d" "${UPDATE_CFG_PATH}"
+ fi
else
sudo rm -rf ${RESULT_DIR}/${part_bin}
echo "Error: Abort Delta Generation"
sudo rm -rf ${RESULT_DIR}/${part_bin}
done
+ if [ ! -s "${UPDATE_CFG_PATH}" ]; then
+ echo "Error: No differences between versions - abort delta generation"
+ exit 2
+ fi
+
#move update.cfg to delta directory
if [ -r ${UPDATE_CFG_PATH} ]; then
sudo cp ${UPDATE_CFG_PATH} ${DELTA_DIR}/update.cfg