diff options
author | Konstantin Podsvirov <konstantin@podsvirov.pro> | 2017-08-28 14:25:27 +0300 |
---|---|---|
committer | Konstantin Podsvirov <konstantin@podsvirov.pro> | 2017-12-05 07:26:41 +0000 |
commit | 977610bfb490690310d72a7f8a0a02cf4e5ea278 (patch) | |
tree | 7d5629a907c56577083f38c5cc521cd72b906c45 /tools/common/repositorygen.cpp | |
parent | 1f3eded578314fb903bf50447d614fd314bd0eec (diff) |
Add support dash (-) symbol in component name
Add colon (:) symbol as alternative separator beetwen
component name and version to use dash (-) symbol in
component name.
For names with dash (-) symbol use colon (:) symbol
as separator in dependencies between name and version,
even if you do not specify a version.
Requirement example: package-with-dash:>=1.2.3, stable:1.x,
demo:v1.0-rc1, backward-compatibility:.
Also add test 'tst_ComponentIdentifier' for check new feature.
Task-number: QTIFW-948
Change-Id: I6340c8001dec369ed8d33fcc4a92c7bce660aec1
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'tools/common/repositorygen.cpp')
-rw-r--r-- | tools/common/repositorygen.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/common/repositorygen.cpp b/tools/common/repositorygen.cpp index 908020ea4..295dea4d0 100644 --- a/tools/common/repositorygen.cpp +++ b/tools/common/repositorygen.cpp @@ -424,11 +424,10 @@ PackageInfoVector QInstallerTools::createListOfPackages(const QStringList &packa qDebug() << "Found subdirectory" << it->fileName(); // because the filter is QDir::Dirs - filename means the name of the subdirectory if (it->fileName().contains(QLatin1Char('-'))) { - if (ignoreInvalidPackages) - continue; - throw QInstaller::Error(QString::fromLatin1("Component \"%1\" must not contain '-'. This is not " - "allowed, because dashes are used as the separator between the component name and the " - "version number internally.").arg(QDir::toNativeSeparators(it->fileName()))); + qDebug("When using the component \"%s\" as a dependency, " + "to ensure backward compatibility, you must add a colon symbol at the end, " + "even if you do not specify a version.", + qUtf8Printable(it->fileName())); } QFile file(QString::fromLatin1("%1/meta/package.xml").arg(it->filePath())); |