summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-05-05 13:56:33 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-05-05 13:56:33 +0200
commit1c85ad384fbab756ae9c51acfc6c232791889b50 (patch)
tree69c1c770aa5b8c7009d462c55635a6951266e792 /src
parent1ec5e07f2ff31ea2fd632d6239376c5bde8c7814 (diff)
downloadabrt-1c85ad384fbab756ae9c51acfc6c232791889b50.tar.gz
abrt-1c85ad384fbab756ae9c51acfc6c232791889b50.tar.xz
abrt-1c85ad384fbab756ae9c51acfc6c232791889b50.zip
abrt-debuginfo-install: use --enablerepo=*-debug*
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/Daemon/abrt-debuginfo-install47
1 files changed, 40 insertions, 7 deletions
diff --git a/src/Daemon/abrt-debuginfo-install b/src/Daemon/abrt-debuginfo-install
index c1155246..5c242236 100755
--- a/src/Daemon/abrt-debuginfo-install
+++ b/src/Daemon/abrt-debuginfo-install
@@ -47,18 +47,48 @@
# ("serious problem").
+debug=false
+# Useful if you need to see saved rpms, command outputs etc
+keep_tmp=false
+
+
+# Handle options
+if test x"$1" = x"--"; then
+ shift
+else
+ if test x"$1" = x"-v"; then
+ debug=true
+ shift
+ fi
+ if test $# -lt 2 || test x"$1" = x"--help"; then
+ echo "Usage:"
+ echo
+ echo "abrt-debuginfo-install [-v] CORE TEMPDIR [CACHEDIR[:DEBUGINFODIR...]]"
+ echo
+ echo "TEMPDIR must be a name of a new temporary directory. It must not exist."
+ echo "If CACHEDIR is specified, debuginfos are installed in CACHEDIR,"
+ echo "and TEMPDIR is deleted on exit."
+ echo "Otherwise, debuginfos are installed into TEMPDIR, which is not deleted."
+ echo
+ echo "Options:"
+ echo " -v Verbose (for debugging)"
+ echo
+ exit
+ fi
+fi
+
+
+# Parse params
core="$1"
tempdir="$2"
debuginfodirs="${3//:/ }"
cachedir="${3%%:*}"
-debug=false
-# Useful if you need to see saved rpms, command outputs etc
-keep_tmp=false
# stderr may be used for status messages too
exec 2>&1
+
error_msg_and_die() {
echo "$*"
exit 2
@@ -302,11 +332,14 @@ $debug && echo "build_ids:$build_ids"
# Prepare list of repos to use.
# When we look for debuginfo we need only -debuginfo* repos, we can disable the rest
# and thus make it faster.
-# (Without -C, yum for some reason wants to talk to repos! If one is down, it becomes S..L..O..W)
yum_repo_opts="'--disablerepo=*'"
-for enabled_repo in `LANG=C yum -C repolist all | grep 'enabled:' | cut -f1 -d' ' | grep -v -- '-debuginfo'`; do
- yum_repo_opts="$yum_repo_opts '--enablerepo=${enabled_repo}-debuginfo*'"
-done
+#// Disabled. Too often, debuginfo repos have names which do not conform to "foo-debuginfo" scheme,
+#// and users get bad backtraces.
+#// # (Without -C, yum for some reason wants to talk to repos! If one is down, it becomes S..L..O..W)
+#// for enabled_repo in `LANG=C yum -C repolist all | grep 'enabled:' | cut -f1 -d' ' | grep -v -- '-debuginfo'`; do
+#// yum_repo_opts="$yum_repo_opts '--enablerepo=${enabled_repo}-debuginfo*'"
+#// done
+yum_repo_opts="$yum_repo_opts '--enablerepo=*-debug*'"
# We try to not run yum without -C unless absolutely necessary.