Please disregard this patch, will post a fixed version tomorrow. ----- Original Message ----- From: "Petr Kubat" <[email protected]> To: [email protected] Cc: "Petr Kubat" <[email protected]> Sent: Thursday, September 12, 2013 2:29:58 PM Subject: [ABRT PATCH] add prefix from configure to the path of debuginfo installer - closes #701
Signed-off-by: Petr Kubat <[email protected]> --- src/plugins/Makefile.am | 1 + src/plugins/abrt-action-install-debuginfo-to-abrt-cache.c | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am index c0c0745..38ac8e4 100644 --- a/src/plugins/Makefile.am +++ b/src/plugins/Makefile.am @@ -250,6 +250,7 @@ abrt_action_install_debuginfo_to_abrt_cache_CPPFLAGS = \ -I$(srcdir)/../include \ -I$(srcdir)/../lib \ -D_GNU_SOURCE \ + -DCONF_PREFIX=\"$(prefix)\" \ $(LIBREPORT_CFLAGS) \ -Wall -Wwrite-strings \ -fPIE diff --git a/src/plugins/abrt-action-install-debuginfo-to-abrt-cache.c b/src/plugins/abrt-action-install-debuginfo-to-abrt-cache.c index b642070..dc6fc28 100644 --- a/src/plugins/abrt-action-install-debuginfo-to-abrt-cache.c +++ b/src/plugins/abrt-action-install-debuginfo-to-abrt-cache.c @@ -112,12 +112,13 @@ int main(int argc, char **argv) } while (*p); #endif /* Set safe PATH */ -// TODO: honor configure --prefix here by adding it to PATH -// (otherwise abrt-action-install-debuginfo would fail to spawn abrt-action-trim-files): - if (u == 0) - putenv((char*) "PATH=/usr/sbin:/sbin:/usr/bin:/bin"); - else - putenv((char*) "PATH=/usr/bin:/bin"); + // Adding configure --prefix to the PATH so that + // abrt-action-install-debuginfo doesn't fail when spawning + // abrt-action-trim-files + char path_env[] = "PATH=/usr/sbin:/sbin:/usr/bin:/bin:" CONF_PREFIX; + if (u != 0) + strcpy(path_env, "PATH=/usr/bin:/bin:" CONF_PREFIX); + putenv(path_env); } execvp(EXECUTABLE, argv); -- 1.8.3.1
