summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/installerfw.qdoc5
-rw-r--r--src/libs/installer/archivefactory.cpp2
-rw-r--r--src/libs/installer/libarchivearchive.cpp13
-rw-r--r--tests/auto/installer/archivefactory/tst_archivefactory.cpp2
-rw-r--r--tests/auto/installer/clientserver/tst_clientserver.cpp1
-rw-r--r--tests/auto/installer/libarchivearchive/tst_libarchivearchive.cpp1
6 files changed, 12 insertions, 12 deletions
diff --git a/doc/installerfw.qdoc b/doc/installerfw.qdoc
index 630b86265..14554f05a 100644
--- a/doc/installerfw.qdoc
+++ b/doc/installerfw.qdoc
@@ -1160,7 +1160,7 @@
\li Only available on macOS. Allows specifying a code signing identity to be
used for signing the generated app bundle.
\row
- \li --af or --archive-format 7z|zip|tar.gz|tar.bz2|tar.xz
+ \li --af or --archive-format 7z|zip|tar|tar.gz|tar.bz2|tar.xz
\li Set the format used when packaging new component data archives. If
you omit this option, the 7z format will be used as a default.
\note If the Installer Framework tools were built without libarchive
@@ -1277,7 +1277,7 @@
checksum instead of the version number. This parameter adds a new \c <ContentSha1>
node to the \c Updates.xml.
\row
- \li --af or --archive-format 7z|zip|tar.gz|tar.bz2|tar.xz
+ \li --af or --archive-format 7z|zip|tar|tar.gz|tar.bz2|tar.xz
\li Set the format used when packaging new component data archives. If
you omit this option, the 7z format will be used as a default.
\note If the Installer Framework tools were built without libarchive
@@ -1338,6 +1338,7 @@
\list
\li 7z (7z archive)
\li zip (ZIP archive)
+ \li tar (uncompressed tar archive)
\li tar.gz (gzip compressed tar archive)
\li tar.bz2 (bzip2 compressed tar archive)
\li tar.xz (xz compressed tar archive)
diff --git a/src/libs/installer/archivefactory.cpp b/src/libs/installer/archivefactory.cpp
index a7e55bd44..e6582cbcd 100644
--- a/src/libs/installer/archivefactory.cpp
+++ b/src/libs/installer/archivefactory.cpp
@@ -141,7 +141,7 @@ ArchiveFactory::ArchiveFactory()
{
#ifdef IFW_LIBARCHIVE
registerArchive<LibArchiveWrapper>(QLatin1String("LibArchive"), QStringList()
- << QLatin1String("tar.gz") << QLatin1String("tar.bz2")
+ << QLatin1String("tar") << QLatin1String("tar.gz") << QLatin1String("tar.bz2")
<< QLatin1String("tar.xz") << QLatin1String("zip") << QLatin1String("7z"));
#else
registerArchive<Lib7zArchive>(QLatin1String("Lib7z"), QStringList()
diff --git a/src/libs/installer/libarchivearchive.cpp b/src/libs/installer/libarchivearchive.cpp
index cf6e11e32..0f5b21a29 100644
--- a/src/libs/installer/libarchivearchive.cpp
+++ b/src/libs/installer/libarchivearchive.cpp
@@ -713,14 +713,11 @@ void LibArchiveArchive::configureReader(archive *archive)
*/
void LibArchiveArchive::configureWriter(archive *archive)
{
- if (QFileInfo(m_data->file.fileName()).suffix() == QLatin1String("zip")) {
- archive_write_set_format_zip(archive);
- } else if (QFileInfo(m_data->file.fileName()).suffix() == QLatin1String("7z")) {
- archive_write_set_format_7zip(archive);
- } else {
- archive_write_set_format_pax_restricted(archive);
- archive_write_set_format_filter_by_ext(archive, m_data->file.fileName().toLatin1());
- }
+ archive_write_set_format_filter_by_ext(archive, m_data->file.fileName().toLatin1());
+
+ if (compressionLevel() == CompressionLevel::Normal)
+ return;
+
const QByteArray options = "compression-level=" + QString::number(compressionLevel()).toLatin1();
if (archive_write_set_options(archive, options.constData())) { // not fatal
qCWarning(QInstaller::lcInstallerInstallLog) << "Could not set options" << options
diff --git a/tests/auto/installer/archivefactory/tst_archivefactory.cpp b/tests/auto/installer/archivefactory/tst_archivefactory.cpp
index 6320835a7..91301898d 100644
--- a/tests/auto/installer/archivefactory/tst_archivefactory.cpp
+++ b/tests/auto/installer/archivefactory/tst_archivefactory.cpp
@@ -90,7 +90,7 @@ private slots:
#ifdef IFW_LIBARCHIVE
QTest::newRow("LibArchive")
<< "LibArchive" << "myfile.zip"
- << (QStringList() << "tar.gz" << "tar.bz2" << "tar.xz" << "zip" << "7z");
+ << (QStringList() << "tar" << "tar.gz" << "tar.bz2" << "tar.xz" << "zip" << "7z");
#else
QTest::newRow("Lib7z")
<< "Lib7z" << "myfile.7z" << (QStringList() << "7z");
diff --git a/tests/auto/installer/clientserver/tst_clientserver.cpp b/tests/auto/installer/clientserver/tst_clientserver.cpp
index ebbe3af56..7b9971056 100644
--- a/tests/auto/installer/clientserver/tst_clientserver.cpp
+++ b/tests/auto/installer/clientserver/tst_clientserver.cpp
@@ -524,6 +524,7 @@ private slots:
{
QTest::addColumn<QString>("suffix");
QTest::newRow("ZIP archive") << ".zip";
+ QTest::newRow("uncompressed tar archive") << ".tar";
QTest::newRow("gzip compressed tar archive") << ".tar.gz";
QTest::newRow("bzip2 compressed tar archive") << ".tar.bz2";
QTest::newRow("xz compressed tar archive") << ".tar.xz";
diff --git a/tests/auto/installer/libarchivearchive/tst_libarchivearchive.cpp b/tests/auto/installer/libarchivearchive/tst_libarchivearchive.cpp
index 6b6eccbe4..1af5023e1 100644
--- a/tests/auto/installer/libarchivearchive/tst_libarchivearchive.cpp
+++ b/tests/auto/installer/libarchivearchive/tst_libarchivearchive.cpp
@@ -252,6 +252,7 @@ private:
{
QTest::addColumn<QString>("suffix");
QTest::newRow("ZIP archive") << ".zip";
+ QTest::newRow("uncompressed tar archive") << ".tar";
QTest::newRow("gzip compressed tar archive") << ".tar.gz";
QTest::newRow("bzip2 compressed tar archive") << ".tar.bz2";
QTest::newRow("xz compressed tar archive") << ".tar.xz";