Blob Blame History Raw
From 16a8cbb75b69c36b7858004d605c24edc6806763 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Wed, 27 Apr 2016 09:36:10 +0200
Subject: [PATCH] a-a-install-debuginfo: correct handling of DebuginfoLocation

DebuginfoLocation is a list of colon separated file systemd paths, where
the first path is a directory for storing downloaded debuginfo data.

Related #1135

Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
 src/hooks/CCpp.conf                          | 10 +++++++++-
 src/plugins/abrt-action-install-debuginfo.in |  6 ++++--
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/hooks/CCpp.conf b/src/hooks/CCpp.conf
index 025189a..2466aff 100644
--- a/src/hooks/CCpp.conf
+++ b/src/hooks/CCpp.conf
@@ -31,7 +31,15 @@ SaveFullCore = yes
 # Used for debugging the hook
 #VerboseLog = 2
 
-# Specify where you want to store debuginfos (default: /var/cache/abrt-di)
+# Specify directories where ABRT should look for non-system debuginfos.
+#
+# Add a colon separated list of file system paths.
+#
+# Beware the first path in the list is used by ABRT to save downloaded
+# debuginfos, therefore the first path in the list must be _writable_, the
+# rest of the list can be read-only.
+#
+# (default: /var/cache/abrt-di)
 #
 #DebuginfoLocation = /var/cache/abrt-di
 
diff --git a/src/plugins/abrt-action-install-debuginfo.in b/src/plugins/abrt-action-install-debuginfo.in
index e4a7dfd..ad7a8d3 100644
--- a/src/plugins/abrt-action-install-debuginfo.in
+++ b/src/plugins/abrt-action-install-debuginfo.in
@@ -100,7 +100,9 @@ if __name__ == "__main__":
             "    -y          Noninteractive, assume 'Yes' to all questions\n"
             "    --ids       Default: build_ids\n"
             "    --tmpdir    Default: @LARGE_DATA_TMP_DIR@/abrt-tmp-debuginfo-RANDOM_SUFFIX\n"
-            "    --cache     Default: /var/cache/abrt-di\n"
+            "    --cache     Colon separated list of directories. The first one is used for\n"
+            "                saving installed debuginfos.\n"
+            "                Default: /var/cache/abrt-dir\n"
             "    --size_mb   Default: 4096\n"
             "    --pkgmgr   Default: PackageManager from CCpp.conf or 'dnf'\n"
             "    -e,--exact  Download only specified files\n"
@@ -155,7 +157,7 @@ if __name__ == "__main__":
         except OSError as ex:
             print(ex)
         else:
-            cachedirs = conf.get("DebuginfoLocation", None)
+            cachedirs = conf.get("DebuginfoLocation", None).split(":")
 
         if not cachedirs:
             cachedirs = ["/var/cache/abrt-di"]
-- 
2.7.4