From: Michael Tremer Date: Wed, 1 Jan 2025 17:08:30 +0000 (+0000) Subject: stripper: Only strip files that are not stripped, yet X-Git-Tag: 0.9.30~606 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f848e1349d1050da5cfea68cae8f537073a0c848;p=pakfire.git stripper: Only strip files that are not stripped, yet Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/stripper.c b/src/libpakfire/stripper.c index 9d851d832..eaa9c3b0f 100644 --- a/src/libpakfire/stripper.c +++ b/src/libpakfire/stripper.c @@ -505,15 +505,18 @@ static int pakfire_stripper_strip( if (r < 0) goto ERROR; - // Copy sources - r = pakfire_stripper_copy_sources(stripper, file, fd); - if (r < 0) - goto ERROR; + // Only strip if there is actually some debug information + if (!pakfire_elf_is_stripped(elf)) { + // Copy sources + r = pakfire_stripper_copy_sources(stripper, file, fd); + if (r < 0) + goto ERROR; - // Strip debug information - r = pakfire_stripper_strip_debug_sections(stripper, file, elf); - if (r < 0) - goto ERROR; + // Strip debug information + r = pakfire_stripper_strip_debug_sections(stripper, file, elf); + if (r < 0) + goto ERROR; + } ERROR: if (elf)