Skip to content

Commit 29bcebd

Browse files
committed
multiple deployers: Ignore .debug files
This commit replicates a pattern from the TextToSpeechPluginsDeployer across a range of other deployer classes. Essentially - it's extremely unlikely that composing an AppImage with debug symbols is what a user actually wants to do. I'm also not aware of a good story for connecting debug symbols to an AppImage at all. As a result, let's make a sensible choice - and not package them. Trust that developers will use their underlying build system for Debug, and that release tracking will allow developers to tie an AppImage back to a source control revision. Finally, note that this works around an interesting aarch64 bug - where the .debug files that are created are marked as x86_64 ELF binaries - even when you are _building on an aarch64 host_.
1 parent bcd597c commit 29bcebd

13 files changed

+87
-0
lines changed

Diff for: src/deployers/BearerPluginsDeployer.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ bool BearerPluginsDeployer::deploy() {
2020
ldLog() << "Deploying bearer plugins" << std::endl;
2121

2222
for (fs::directory_iterator i(qtPluginsPath / "bearer"); i != fs::directory_iterator(); ++i) {
23+
if (i->path().extension() == ".debug") {
24+
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
25+
continue;
26+
}
27+
2328
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins/bearer/"))
2429
return false;
2530
}

Diff for: src/deployers/GamepadPluginsDeployer.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ bool GamepadPluginsDeployer::deploy() {
2020
ldLog() << "Deploying Gamepad plugins" << std::endl;
2121

2222
for (fs::directory_iterator i(qtPluginsPath / "gamepads"); i != fs::directory_iterator(); ++i) {
23+
if (i->path().extension() == ".debug") {
24+
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
25+
continue;
26+
}
27+
2328
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins/gamepads/"))
2429
return false;
2530
}

Diff for: src/deployers/LocationPluginsDeployer.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ bool LocationPluginsDeployer::deploy() {
2020
ldLog() << "Deploying Location plugins" << std::endl;
2121

2222
for (fs::directory_iterator i(qtPluginsPath / "geoservices"); i != fs::directory_iterator(); ++i) {
23+
if (i->path().extension() == ".debug") {
24+
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
25+
continue;
26+
}
27+
2328
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins/geoservices/"))
2429
return false;
2530
}

Diff for: src/deployers/Multimedia5PluginsDeployer.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,23 @@ bool Multimedia5PluginsDeployer::deploy() {
2020
ldLog() << "Deploying mediaservice plugins" << std::endl;
2121

2222
for (fs::directory_iterator i(qtPluginsPath / "mediaservice"); i != fs::directory_iterator(); ++i) {
23+
if (i->path().extension() == ".debug") {
24+
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
25+
continue;
26+
}
27+
2328
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins/mediaservice/"))
2429
return false;
2530
}
2631

2732
ldLog() << "Deploying audio plugins" << std::endl;
2833

2934
for (fs::directory_iterator i(qtPluginsPath / "audio"); i != fs::directory_iterator(); ++i) {
35+
if (i->path().extension() == ".debug") {
36+
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
37+
continue;
38+
}
39+
3040
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins/audio/"))
3141
return false;
3242
}

Diff for: src/deployers/Multimedia6PluginsDeployer.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ bool Multimedia6PluginsDeployer::deploy() {
2121
ldLog() << "Deploying multimedia plugins" << std::endl;
2222

2323
for (fs::directory_iterator i(qtPluginsPath / "multimedia"); i != fs::directory_iterator(); ++i) {
24+
if (i->path().extension() == ".debug") {
25+
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
26+
continue;
27+
}
28+
2429
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins/multimedia/"))
2530
return false;
2631
}

Diff for: src/deployers/PlatformPluginsDeployer.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,19 @@ bool PlatformPluginsDeployer::deploy() {
3535
}
3636

3737
for (fs::directory_iterator i(qtPluginsPath / "platforminputcontexts"); i != fs::directory_iterator(); ++i) {
38+
if (i->path().extension() == ".debug") {
39+
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
40+
continue;
41+
}
3842
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins/platforminputcontexts/"))
3943
return false;
4044
}
4145

4246
for (fs::directory_iterator i(qtPluginsPath / "imageformats"); i != fs::directory_iterator(); ++i) {
47+
if (i->path().extension() == ".debug") {
48+
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
49+
continue;
50+
}
4351
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins/imageformats/"))
4452
return false;
4553
}

Diff for: src/deployers/PositioningPluginsDeployer.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ bool PositioningPluginsDeployer::deploy() {
2020
ldLog() << "Deploying positioning plugins" << std::endl;
2121

2222
for (fs::directory_iterator i(qtPluginsPath / "position"); i != fs::directory_iterator(); ++i) {
23+
if (i->path().extension() == ".debug") {
24+
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
25+
continue;
26+
}
27+
2328
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins/position/"))
2429
return false;
2530
}

Diff for: src/deployers/PrintSupportPluginsDeployer.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ bool PrintSupportPluginsDeployer::deploy() {
2020
ldLog() << "Deploying printsupport plugins" << std::endl;
2121

2222
for (fs::directory_iterator i(qtPluginsPath / "printsupport"); i != fs::directory_iterator(); ++i) {
23+
if (i->path().extension() == ".debug") {
24+
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
25+
continue;
26+
}
27+
2328
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins/printsupport/"))
2429
return false;
2530
}

Diff for: src/deployers/Qt3DPluginsDeployer.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,21 @@ bool Qt3DPluginsDeployer::deploy() {
2020
ldLog() << "Deploying Qt 3D plugins" << std::endl;
2121

2222
for (fs::directory_iterator i(qtPluginsPath / "geometryloaders"); i != fs::directory_iterator(); ++i) {
23+
if (i->path().extension() == ".debug") {
24+
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
25+
continue;
26+
}
27+
2328
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins/geometryloaders/"))
2429
return false;
2530
}
2631

2732
for (fs::directory_iterator i(qtPluginsPath / "sceneparsers"); i != fs::directory_iterator(); ++i) {
33+
if (i->path().extension() == ".debug") {
34+
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
35+
continue;
36+
}
37+
2838
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins/sceneparsers/"))
2939
return false;
3040
}

Diff for: src/deployers/SqlPluginsDeployer.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ bool SqlPluginsDeployer::deploy() {
2020
ldLog() << "Deploying SQL plugins" << std::endl;
2121

2222
for (fs::directory_iterator i(qtPluginsPath / "sqldrivers"); i != fs::directory_iterator(); ++i) {
23+
if (i->path().extension() == ".debug") {
24+
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
25+
continue;
26+
}
27+
2328
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins/sqldrivers/"))
2429
return false;
2530
}

Diff for: src/deployers/TlsBackendsDeployer.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ bool TlsBackendsDeployer::deploy() {
2020
ldLog() << "Deploying TLS backends" << std::endl;
2121

2222
for (fs::directory_iterator i(qtPluginsPath / "tls"); i != fs::directory_iterator(); ++i) {
23+
if (i->path().extension() == ".debug") {
24+
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
25+
continue;
26+
}
27+
2328
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins/tls/"))
2429
return false;
2530
}

Diff for: src/deployers/WaylandcompositorPluginsDeployer.cpp

+15
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,31 @@ bool WaylandcompositorPluginsDeployer::deploy() {
2020
ldLog() << "Deploying waylandcompositor plugin" << std::endl;
2121

2222
for (fs::directory_iterator i(qtPluginsPath / "wayland-decoration-client"); i != fs::directory_iterator(); ++i) {
23+
if (i->path().extension() == ".debug") {
24+
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
25+
continue;
26+
}
27+
2328
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins/wayland-decoration-client/"))
2429
return false;
2530
}
2631

2732
for (fs::directory_iterator i(qtPluginsPath / "wayland-graphics-integration-client"); i != fs::directory_iterator(); ++i) {
33+
if (i->path().extension() == ".debug") {
34+
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
35+
continue;
36+
}
37+
2838
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins/wayland-graphics-integration-client/"))
2939
return false;
3040
}
3141

3242
for (fs::directory_iterator i(qtPluginsPath / "wayland-shell-integration"); i != fs::directory_iterator(); ++i) {
43+
if (i->path().extension() == ".debug") {
44+
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
45+
continue;
46+
}
47+
3348
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins/wayland-shell-integration/"))
3449
return false;
3550
}

Diff for: src/deployment.h

+4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ inline bool deployIntegrationPlugins(appdir::AppDir& appDir, const fs::path& qtP
3737
// otherwise, when the directory doesn't exist, it might just copy all files to files called like
3838
// destinationDir
3939
auto destinationDir = appDir.path() / "usr/plugins" / subDir / "";
40+
if (i->path().extension() == ".debug") {
41+
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
42+
continue;
43+
}
4044

4145
if (!appDir.deployLibrary(*i, destinationDir))
4246
return false;

0 commit comments

Comments
 (0)