Skip to content

Commit 3b6e451

Browse files
tdewey-rpiTheAssassin
authored andcommitted
multiple deployers: Ignore .debug files
This commit replicates a pattern from the TextToSpeechPluginsDeployer into the BasicPluginsDeployer - to affect all standard deployers. 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 01fd773 commit 3b6e451

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/deployers/BasicPluginsDeployer.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ bool BasicPluginsDeployer::deployStandardQtPlugins(const std::vector<std::string
3939
for (const auto &pluginName : plugins) {
4040
ldLog() << "Deploying Qt" << pluginName << "plugins" << std::endl;
4141
for (fs::directory_iterator i(qtPluginsPath / pluginName); i != fs::directory_iterator(); ++i) {
42+
if (i->path().extension() == ".debug") {
43+
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
44+
continue;
45+
}
4246
// add a trailing slash, so pluginName is used as a destination directory, not a file.
4347
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins" / pluginName / ""))
4448
return false;

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)