From 1e1f146c386b4220450b81eb752c0733a9a9b4e9 Mon Sep 17 00:00:00 2001 From: Tom Dewey Date: Thu, 25 Jul 2024 15:27:01 +0100 Subject: [PATCH] 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_. --- src/deployers/BasicPluginsDeployer.cpp | 4 ++++ src/deployment.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/deployers/BasicPluginsDeployer.cpp b/src/deployers/BasicPluginsDeployer.cpp index f636fed..36d1299 100644 --- a/src/deployers/BasicPluginsDeployer.cpp +++ b/src/deployers/BasicPluginsDeployer.cpp @@ -39,6 +39,10 @@ bool BasicPluginsDeployer::deployStandardQtPlugins(const std::vectorpath().extension() == ".debug") { + ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl; + continue; + } // add a trailing slash, so pluginName is used as a destination directory, not a file. if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins" / pluginName / "")) return false; diff --git a/src/deployment.h b/src/deployment.h index 04df3a1..047941a 100644 --- a/src/deployment.h +++ b/src/deployment.h @@ -37,6 +37,10 @@ inline bool deployIntegrationPlugins(appdir::AppDir& appDir, const fs::path& qtP // otherwise, when the directory doesn't exist, it might just copy all files to files called like // destinationDir auto destinationDir = appDir.path() / "usr/plugins" / subDir / ""; + if (i->path().extension() == ".debug") { + ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl; + continue; + } if (!appDir.deployLibrary(*i, destinationDir)) return false;