From 1c85ad384fbab756ae9c51acfc6c232791889b50 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 5 May 2010 13:56:33 +0200 Subject: abrt-debuginfo-install: use --enablerepo=*-debug* Signed-off-by: Denys Vlasenko --- src/Daemon/abrt-debuginfo-install | 47 +++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 7 deletions(-) (limited to 'src') 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. -- cgit