aboutsummaryrefslogtreecommitdiffstats
path: root/packaging-tools/sdkcomponent.py
diff options
context:
space:
mode:
authorIikka Eklund <iikka.eklund@qt.io>2017-04-21 13:49:58 +0300
committerIikka Eklund <iikka.eklund@qt.io>2017-05-02 06:06:13 +0000
commit557ee7b124d01c808b42e816370604abbc93abef (patch)
treed45e6db2484db06c67fd8ef6ac560856a19d815e /packaging-tools/sdkcomponent.py
parenta3b015af46ec488aafe3da16532252be5a2e5bc6 (diff)
Fix --archive-skip option in create_installer.py
Change-Id: I8844ab39924208b438a77376e6d09bf46aca8672 Reviewed-by: Antti Kokko <antti.kokko@qt.io> Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
Diffstat (limited to 'packaging-tools/sdkcomponent.py')
-rw-r--r--packaging-tools/sdkcomponent.py28
1 files changed, 16 insertions, 12 deletions
diff --git a/packaging-tools/sdkcomponent.py b/packaging-tools/sdkcomponent.py
index cda608ef3..b3fa22683 100644
--- a/packaging-tools/sdkcomponent.py
+++ b/packaging-tools/sdkcomponent.py
@@ -78,7 +78,6 @@ class SdkComponent:
def nomalize_archive_uri(self, package_name, archive_server_name, archive_location_resolver):
self.archive_uri = archive_location_resolver.resolve_full_uri(package_name, archive_server_name, self.archive_uri)
-
def check_archive_data(self):
if self.archive_uri.startswith('http'):
res = bldinstallercommon.is_content_url_valid(self.archive_uri)
@@ -109,6 +108,7 @@ class SdkComponent:
self.sorting_priority = bldinstallercommon.safe_config_key_fetch(target_config, section_name, 'sorting_priority')
self.optional_for_offline = False
self.key_value_substitution_list = key_value_substitution_list
+ self.archive_skip = False
if is_offline_build:
tmp = bldinstallercommon.safe_config_key_fetch(target_config, section_name, 'optional_for_offline')
for item in self.key_value_substitution_list:
@@ -130,6 +130,9 @@ class SdkComponent:
return True
return False
+ def setArchiveSkip(self, doSkip):
+ self.archive_skip = doSkip
+
def validate(self):
# look up correct package template directory from list
found = False
@@ -175,17 +178,18 @@ class SdkComponent:
if not os.path.exists(self.pkg_template_dir):
self.sanity_check_fail(self.package_name, 'Package template dir does not exist: ' + self.pkg_template_dir)
return
- # next check that archive locations exist
- for archive in self.downloadable_archive_list:
- error_msg = archive.check_archive_data()
- if error_msg:
- if self.optional_for_offline:
- print('!!! Package: [{0}] Given data archive not found: [{1}] But this component was marked optional -> keep going'.format(self.package_name, archive.archive_uri))
- self.sanity_check_fail(self.package_name, 'Given data archive not found: [{0}] But this component was marked optional'.format(archive.archive_uri))
- return
- else:
- self.sanity_check_fail(self.package_name, error_msg)
- return
+ if not self.archive_skip:
+ # next check that archive locations exist
+ for archive in self.downloadable_archive_list:
+ error_msg = archive.check_archive_data()
+ if error_msg:
+ if self.optional_for_offline:
+ print('!!! Package: [{0}] Given data archive not found: [{1}] But this component was marked optional -> keep going'.format(self.package_name, archive.archive_uri))
+ self.sanity_check_fail(self.package_name, 'Given data archive not found: [{0}] But this component was marked optional'.format(archive.archive_uri))
+ return
+ else:
+ self.sanity_check_fail(self.package_name, error_msg)
+ return
def sanity_check_fail(self, component_name, message):