summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2011-05-23 17:25:21 +0200
committerJiri Moskovcak <jmoskovc@redhat.com>2011-05-23 17:25:21 +0200
commit497c2f4e8ac6ed3621429b9a11b897d9fbb63ee0 (patch)
tree87743b78ac8c78dc23604115e787ae0f02aeb3f1
parent28e6bba1e2a35f6bca8f27b5397e1c7fa2171fd4 (diff)
downloadabrt-497c2f4e8ac6ed3621429b9a11b897d9fbb63ee0.tar.gz
abrt-497c2f4e8ac6ed3621429b9a11b897d9fbb63ee0.tar.xz
abrt-497c2f4e8ac6ed3621429b9a11b897d9fbb63ee0.zip
obsolete report with libreport-python
-rw-r--r--abrt.spec.in8
-rw-r--r--src/report-python/__init__.py11
-rw-r--r--src/report-python/common.h1
-rw-r--r--src/report-python/reportmodule.c10
4 files changed, 27 insertions, 3 deletions
diff --git a/abrt.spec.in b/abrt.spec.in
index 8aaa9823..8021af44 100644
--- a/abrt.spec.in
+++ b/abrt.spec.in
@@ -82,6 +82,8 @@ Summary: Python bindings for report-libs.
# Is group correct here? -
Group: System Environment/Libraries
Requires: libreport = %{version}-%{release}
+Provides: report
+Obsoletes: report > 0.20
%description -n libreport-python
Python bindings for report-libs.
@@ -90,6 +92,8 @@ Python bindings for report-libs.
Summary: GTK frontend for libreport
Group: User Interface/Desktops
Requires: libreport = %{version}-%{release}
+Provides: report-gtk
+Obsoletes: report-gtk > 0.20
%description -n libreport-gtk
Applications for reporting bugs using libreport backend.
@@ -399,6 +403,10 @@ touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%postun libs -p /sbin/ldconfig
+%post -n libreport -p /sbin/ldconfig
+%postun -n libreport -p /sbin/ldconfig
+
+
%postun gui
if [ $1 -eq 0 ] ; then
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
diff --git a/src/report-python/__init__.py b/src/report-python/__init__.py
index 3e55ea38..2e875638 100644
--- a/src/report-python/__init__.py
+++ b/src/report-python/__init__.py
@@ -111,15 +111,20 @@ def createAlertSignature(component, hashmarkername, hashvalue, summary, alertSig
cd = problem_data()
cd.add("component", component)
cd.add("hashmarkername", hashmarkername)
- cd.add("localhash", hashvalue)
- cd.add("summary", summary)
+ #cd.add("localhash", hashvalue)
+ cd.add("global_uuid", hashvalue)
+ cd.add("reason", summary)
cd.add("description", alertSignature)
cd.add("product", getProduct())
cd.add("version", getVersion())
return cd
-
+"""
def report(cd, io_unused):
state = run_event_state()
#state.logging_callback = logfunc
r = state.run_event_on_problem_data(cd, "report")
return r
+"""
+
+def report(pd, io_unused):
+ result = report_problem_data(pd)
diff --git a/src/report-python/common.h b/src/report-python/common.h
index c94e8d90..ee56ad9a 100644
--- a/src/report-python/common.h
+++ b/src/report-python/common.h
@@ -21,6 +21,7 @@
#include "dump_dir.h"
#include "problem_data.h"
#include "run_event.h"
+#include "report.h"
/* exception object */
extern PyObject *ReportError;
diff --git a/src/report-python/reportmodule.c b/src/report-python/reportmodule.c
index 92f435ce..1cae783f 100644
--- a/src/report-python/reportmodule.c
+++ b/src/report-python/reportmodule.c
@@ -22,11 +22,21 @@
PyObject *ReportError;
+
+static PyObject *p_report(PyObject *pself, PyObject *problem_data)
+{
+ p_problem_data *p_pd = (p_problem_data*)problem_data;
+ report(p_pd->cd);
+ //FIXME return status as integer object
+ Py_RETURN_NONE;
+}
+
static PyMethodDef module_methods[] = {
/* method_name, func, flags, doc_string */
{ "dd_opendir" , p_dd_opendir , METH_VARARGS },
{ "dd_create" , p_dd_create , METH_VARARGS },
{ "delete_dump_dir", p_delete_dump_dir, METH_VARARGS },
+ { "report_problem_data" , p_report, METH_O},
{ NULL }
};