#!/usr/bin/python
import sys
--
--
--if sys.hexversion < 0x02040000:
-- print >> sys.stderr, "Python 2.4 or newer is required."
-- sys.exit(1)
--
--import sys
import os
import filecmp
import shutil
import glob
import apt
import stat
++
++if sys.hexversion < 0x02040000:
++ print >> sys.stderr, "Python 2.4 or newer is required."
++ sys.exit(1)
++
'''
Diff two folders and create delta using SS_BSDIFF
Will maintain same format of script that will be generated when we use diffutil
DELTA_IMG = "DELTA_IMG"
DELTA_FS = "DELTA_FS"
EXTRA = "EXTRA"
++PRE_UA = "PRE_UA"
LOGFILE = "Delta.log"
VERBATIM_LIST = "Verbatim_List.txt"
EMPTY = ""
elif UPDATE_TYPE == EXTRA:
print('UPDATE_TYPE ---- EXTRA')
++ elif UPDATE_TYPE == PRE_UA:
++ print('UPDATE_TYPE ---- PRE_UA')
else:
print('UPDATE_TYPE ---- UNKNOWN FORMAT')
fn_extract_from_image ${PART_BIN} /usr/bin/upgrade-trigger.sh
fi
+ if [ "${UPDATE_TYPE}" = "EXCLUDED" ]; then
+ exit 0
+ fi
+
+ OLD_TAR_MISSING=
if [ "z${OLD_TAR_FILE}" = "z" ]; then
- OLD_TAR_MISSING="TRUE"
- if [ ! "${UPDATE_TYPE}" = "FULL_IMG" ]; then
+ if [ ! "${UPDATE_TYPE}" = "FULL_IMG" ] && [ ! "${UPDATE_TYPE}" = "PRE_UA" ]; then
echo "[old] tar file does not exist in ${DATA_DIR}/${OLD_TAR_DIR} which contains ${PART_BIN}"
#exit 0, cos this is not an error.
exit 0