Also adds --help and -v:
diff -x '*.po' -d -urpN abrt.1/src/Daemon/abrt-debuginfo-install
abrt.2/src/Daemon/abrt-debuginfo-install
--- abrt.1/src/Daemon/abrt-debuginfo-install 2010-05-04 16:50:38.000000000 +0200
+++ abrt.2/src/Daemon/abrt-debuginfo-install 2010-05-05 13:22:58.244352385 +0200
@@ -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.
Show replies by date