summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIikka Eklund <iikka.eklund@digia.com>2012-07-05 13:28:26 +0300
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-07-05 14:18:36 +0200
commitae4d7a5384649518f650520b0c211ff2c9793f32 (patch)
tree8c57a6c63df42c53b85777e0e7dcd6df2a2ef269
parent65890b078c016f3b8ab4237c056e0b274de18adc (diff)
Critical fix for packaging scripts
If one installer component had more than one archive the packaging script resulted invalid archives. This patch fixes the problem. Change-Id: I036c32779846f5bccb247aa7862843dee2d8e450 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
-rw-r--r--release-tools/create_installer.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/release-tools/create_installer.py b/release-tools/create_installer.py
index a4b5068..dd9bd06 100644
--- a/release-tools/create_installer.py
+++ b/release-tools/create_installer.py
@@ -496,6 +496,14 @@ def repackage_content_for_installation(install_dir, package_raw_name, target_ins
# lastly compress the component back to .7z archive
archive_component(package_name, archive_name)
+ # move archive in temporary path
+ tmp_path = os.path.normpath(PACKAGES_FULL_PATH_DST + os.sep + package_name + os.sep + 'tmp')
+ bldinstallercommon.create_dirs(tmp_path)
+ src_file = os.path.normpath(PACKAGES_FULL_PATH_DST + os.sep + package_name + os.sep + 'data' + os.sep + archive_name)
+ dst_file = os.path.normpath(PACKAGES_FULL_PATH_DST + os.sep + package_name + os.sep + 'tmp' + os.sep + archive_name)
+ print ' Moving: ' + src_file
+ print ' Into: ' + dst_file
+ shutil.move(src_file, dst_file)
##############################################################
@@ -595,6 +603,29 @@ def handle_archive(sdk_component, archive):
##############################################################
+# Finalize package archives
+##############################################################
+def finalize_package_archives(sdk_component):
+ """Finalize package archives"""
+ print ' Finalize package archives for: ' + sdk_component.package_name
+ # move arhives from tmp under data
+ src_path = os.path.normpath(PACKAGES_FULL_PATH_DST + os.sep + sdk_component.package_name + os.sep + 'tmp')
+ if not os.path.exists(src_path):
+ return
+
+ dst_path = os.path.normpath(PACKAGES_FULL_PATH_DST + os.sep + sdk_component.package_name + os.sep + 'data')
+ ldir = os.listdir(src_path)
+ for item in ldir:
+ src_file = src_path + os.sep + item
+ dst_file = dst_path + os.sep + item
+ print ' Moving: ' + src_file
+ print ' Into: ' + dst_file
+ shutil.move(src_file, dst_file)
+ # lastly remove tmp dir
+ bldinstallercommon.remove_tree(src_path)
+
+
+##############################################################
# Parse SDK components
##############################################################
def parse_component_data(configuration_file, configurations_base_path):
@@ -710,6 +741,8 @@ def create_target_components(target_config, offline_mode):
# fetch packages only if offline installer, for online installer just handle the metadata
if offline_mode:
handle_archive(sdk_component, archive)
+ # finalize archives
+ finalize_package_archives(sdk_component)
# substitute downloadable archive names in installscript.qs
downloadableArchives_list = sdk_component.generate_downloadable_archive_list(downloadable_archive_list)
substitute_component_tags(downloadableArchives_list, meta_dir_dest)