summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@nokia.com>2011-11-15 14:57:59 +0100
committerTim Jenssen <tim.jenssen@nokia.com>2011-11-18 14:38:57 +0100
commit89ded0446ba8e6f19445196000d8f065dda663f2 (patch)
tree6356f15bcf03a9421fa3afa579f0d3e76e09cc42
parentb6c553549e5b907721f27b42dd6efb8f849c9ecb (diff)
introduce a DownloadableArchives package description xml-tag
- with this new tag we are able to create simple components which have some content without a needed script - this saves us some scriptengine instances in the future Change-Id: Ib9890324bfbd9b18fb33f3f7bd88cae93c6a2062 Reviewed-by: Niels Weber <niels.2.weber@nokia.com>
-rw-r--r--installerbuilder/libinstaller/component.cpp1
-rw-r--r--installerbuilder/libinstaller/constants.h1
-rw-r--r--installerbuilder/libinstaller/packagemanagercore.cpp7
3 files changed, 9 insertions, 0 deletions
diff --git a/installerbuilder/libinstaller/component.cpp b/installerbuilder/libinstaller/component.cpp
index 5158c032c..cc93e0b55 100644
--- a/installerbuilder/libinstaller/component.cpp
+++ b/installerbuilder/libinstaller/component.cpp
@@ -145,6 +145,7 @@ void Component::loadDataFromPackage(const Package &package)
setValue(scRemoteVersion, package.data(scRemoteVersion).toString());
setValue(scInheritVersion, package.data(scInheritVersion).toString());
setValue(scDependencies, package.data(scDependencies).toString());
+ setValue(scDownloadableArchives, package.data(scDownloadableArchives).toString());
setValue(scVirtual, package.data(scVirtual).toString());
setValue(scSortingPriority, package.data(scSortingPriority).toString());
diff --git a/installerbuilder/libinstaller/constants.h b/installerbuilder/libinstaller/constants.h
index b42da114d..b5843c03b 100644
--- a/installerbuilder/libinstaller/constants.h
+++ b/installerbuilder/libinstaller/constants.h
@@ -41,6 +41,7 @@ static const QLatin1String scDisplayVersion("DisplayVersion");
static const QLatin1String scRemoteDisplayVersion("RemoteDisplayVersion");
static const QLatin1String scInheritVersion("inheritVersionFrom");
static const QLatin1String scReplaces("Replaces");
+static const QLatin1String scDownloadableArchives("DownloadableArchives");
static const QLatin1String scEssential("Essential");
static const QLatin1String scTargetDir("TargetDir");
static const QLatin1String scReleaseDate("ReleaseDate");
diff --git a/installerbuilder/libinstaller/packagemanagercore.cpp b/installerbuilder/libinstaller/packagemanagercore.cpp
index 9769b1dbc..d0ca2f0b2 100644
--- a/installerbuilder/libinstaller/packagemanagercore.cpp
+++ b/installerbuilder/libinstaller/packagemanagercore.cpp
@@ -1478,6 +1478,13 @@ bool PackageManagerCore::updateComponentData(struct Data &data, Component *compo
if (d->m_repoMetaInfoJob)
component->setRepositoryUrl(d->m_repoMetaInfoJob->repositoryForTemporaryDirectory(localPath).url());
+ // add downloadable archive from xml
+ const QStringList downloadableArchives = data.package->data(scDownloadableArchives).toString()
+ .split(QRegExp(QLatin1String("\\b(,|, )\\b")), QString::SkipEmptyParts);
+ foreach (const QString downloadableArchive, downloadableArchives) {
+ component->addDownloadableArchive(downloadableArchive);
+ }
+
const QStringList componentsToReplace = data.package->data(scReplaces).toString()
.split(QRegExp(QLatin1String("\\b(,|, )\\b")), QString::SkipEmptyParts);