summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2010-02-12 11:45:45 +0100
committerJiri Moskovcak <jmoskovc@redhat.com>2010-02-12 11:45:45 +0100
commite1fa46edbe469d15a4157eccca52a0a3261a2f58 (patch)
treeb38352e489a8bad62c8652091e2938e766d0116f /src
parentbc7a0e7fc5dd53e691c0ddecaf47dbf4e9f284a4 (diff)
parent3f50601035b949db58b336e693362b0dbf1c870f (diff)
Merge branch 'master' into rhel6
Diffstat (limited to 'src')
-rw-r--r--src/Daemon/Settings.cpp12
-rwxr-xr-xsrc/Daemon/abrt-debuginfo-install83
-rw-r--r--src/Gui/report.glade3
-rw-r--r--src/Hooks/abrt_exception_handler.py.in14
4 files changed, 71 insertions, 41 deletions
diff --git a/src/Daemon/Settings.cpp b/src/Daemon/Settings.cpp
index 9b0376b..5644d37 100644
--- a/src/Daemon/Settings.cpp
+++ b/src/Daemon/Settings.cpp
@@ -376,8 +376,16 @@ void LoadSettings()
ParseCommon();
ParseAnalyzerActionsAndReporters();
ParseCron();
- if(g_settings_bOpenGPGCheck)
- LoadGPGKeys();
+
+ /*
+ loading gpg keys will invoke LoadOpenGPGPublicKey() from rpm.cpp
+ pgpReadPkts which makes nss to re-init and thus makes
+ bugzilla plugin work :-/
+ */
+
+ //FIXME FIXME FIXME FIXME FIXME FIXME!!!
+ //if(g_settings_bOpenGPGCheck)
+ LoadGPGKeys();
}
/* dbus call to retrieve .conf file data from daemon */
diff --git a/src/Daemon/abrt-debuginfo-install b/src/Daemon/abrt-debuginfo-install
index 35f4d6a..3bb9c41 100755
--- a/src/Daemon/abrt-debuginfo-install
+++ b/src/Daemon/abrt-debuginfo-install
@@ -145,7 +145,9 @@ print_package_names() {
fi
# when we look for debuginfo we need only -debuginfo* repos, so we can disable the rest and thus make it faster
# also we want only fedora repositories, because abrt won't work for other packages anyway
- local cmd="yum $yumopts '--disablerepo=*' '--enablerepo=fedora-debuginfo*' '--enablerepo=updates-debuginfo*' --quiet provides $missing_debuginfo_files"
+ # --showduplicates: do not just show the latest package
+ # -R2: wait two minutes max (hopefully this prevents infinite hang on yum lock)
+ local cmd="yum $yumopts '--disablerepo=*' '--enablerepo=fedora-debuginfo*' '--enablerepo=updates-debuginfo*' --showduplicates -R2 --quiet provides $missing_debuginfo_files"
echo "$cmd" >"yum_provides.$1.OUT"
# eval is needed to strip away ''s; cant remove them above and just use
# $cmd, that would perform globbing on '*'
@@ -194,53 +196,56 @@ download_packages() {
for pkg in $packages; do
echo "Download $i/$num_packages: $pkg"
echo "Download $i/$num_packages: $pkg" >>yumdownloader.OUT
- # we can't handle packages from non Fedora repos, so we look and download only
+ # We can't handle packages from non Fedora repos, so we look and download only
# from Fedora repos which makes it faster
yumdownloader --disablerepo="*" --enablerepo="fedora-debuginfo*" --enablerepo="updates-debuginfo*" --quiet $pkg >>yumdownloader.OUT 2>&1
err=$?
echo "exitcode:$err" >>yumdownloader.OUT
echo >>yumdownloader.OUT
test $err = 0 || { echo "Download of $pkg failed!"; sleep 1; }
- : $((i++))
- done
-
- for file in *.rpm; do
- # Happens if no .rpm's were downloaded (yumdownloader problem)
- # In this case, $f is the literal "*.rpm" string
- test -f "$file" || error_msg_and_die "not a rpm file: '$file'"
- echo "Unpacking: $file"
- echo "Processing: $file" >>unpack.OUT
- rpm2cpio <"$file" 2>>unpack.OUT | cpio -id >>unpack.OUT 2>&1
-#TODO: error check?
- done
-
- # Copy debuginfo files to cachedir
- if test x"$cachedir" != x"" && test -d "$cachedir"; then
- for build_id in $build_ids; do
- build_id1=${build_id:0:2}
- build_id2=${build_id:2}
-
- file="usr/lib/debug/.build-id/$build_id1/$build_id2.debug"
-
- # Do not copy it if it can be found in any of $debuginfodirs
- test -f "/$file" && continue
- if test x"$cachedir" != x""; then
- for d in $debuginfodirs; do
- test -f "$d/$file" && continue 2
+ # Process and delete the *.rpm file just downloaded
+ # We do it right after download: some users have smallish disks...
+ for file in *.rpm; do
+ # Happens if no .rpm's were downloaded (yumdownloader problem)
+ # In this case, $f is the literal "*.rpm" string
+ test -f "$file" || { echo "No rpm file downloaded"; continue; }
+ echo "Unpacking: $file"
+ echo "Processing: $file" >>unpack.OUT
+ rpm2cpio <"$file" >"unpacked.cpio" 2>>unpack.OUT || error_msg_and_die "Can't convert '$file' to cpio"
+ rm "$file"
+ cpio -id <"unpacked.cpio" >>unpack.OUT 2>&1 || error_msg_and_die "Can't unpack '$file' cpio archive"
+ rm "unpacked.cpio"
+ # Copy debuginfo files to cachedir
+ if test x"$cachedir" != x"" && test -d "$cachedir"; then
+ # For every needed debuginfo, check whether we have it
+ for build_id in $build_ids; do
+ build_id1=${build_id:0:2}
+ build_id2=${build_id:2}
+ file="usr/lib/debug/.build-id/$build_id1/$build_id2.debug"
+ # Do not copy it if it can be found in any of $debuginfodirs
+ test -f "/$file" && continue
+ if test x"$cachedir" != x""; then
+ for d in $debuginfodirs; do
+ test -f "$d/$file" && continue 2
+ done
+ fi
+ if test -f "$file"; then
+ # File is one of those we just installed, cache it
+ mkdir -p "$cachedir/usr/lib/debug/.build-id/$build_id1"
+ # Note: this does not preserve symlinks. This is intentional
+ $debug && echo Copying "$file" to "$cachedir/$file" >&2
+ echo "Caching debuginfo: $file"
+ cp --remove-destination "$file" "$cachedir/$file" || error_msg_and_die "Can't copy $file (disk full?)"
+ continue
+ fi
done
fi
-
- if test -f "$file"; then
- # File is one of those we just installed, cache it.
- mkdir -p "$cachedir/usr/lib/debug/.build-id/$build_id1"
- # Note: this does not preserve symlinks. This is intentional
- $debug && echo Copying "$file" to "$cachedir/$file" >&2
- cp --remove-destination "$file" "$cachedir/$file"
-#TODO: error check?
- continue
- fi
+ # Delete remaining files unpacked from .cpio
+ # which we didn't need after all
+ rm -r etc bin sbin usr var opt 2>/dev/null
done
- fi
+ : $((i++))
+ done
}
diff --git a/src/Gui/report.glade b/src/Gui/report.glade
index cff0dc8..7b3aac4 100644
--- a/src/Gui/report.glade
+++ b/src/Gui/report.glade
@@ -302,6 +302,7 @@
<property name="height_request">200</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="accepts_tab">False</property>
</object>
</child>
</object>
@@ -377,6 +378,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="wrap_mode">word-char</property>
+ <property name="accepts_tab">False</property>
</object>
</child>
</object>
@@ -414,6 +416,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="wrap_mode">word-char</property>
+ <property name="accepts_tab">False</property>
</object>
</child>
</object>
diff --git a/src/Hooks/abrt_exception_handler.py.in b/src/Hooks/abrt_exception_handler.py.in
index 89f3013..b5e15b8 100644
--- a/src/Hooks/abrt_exception_handler.py.in
+++ b/src/Hooks/abrt_exception_handler.py.in
@@ -59,8 +59,22 @@ def handleMyException((etype, value, tb)):
return sys.__excepthook__(etype, value, tb)
try:
+ import os
import os.path
import traceback
+ import errno
+
+ # EPIPE is not a crash, it happens all the time
+ # Testcase: script.py | true, where script.py is:
+ ## #!/usr/bin/python
+ ## import os
+ ## import time
+ ## time.sleep(1)
+ ## os.write(1, "Hello\n") # print "Hello" wouldn't be the same
+ #
+ if etype == IOError or etype == OSError:
+ if value.errno == errno.EPIPE:
+ return sys.__excepthook__(etype, value, tb)
# "-c" appears in this case:
# $ python -c 'import sys; print "argv0 is:%s" % sys.argv[0]'