diff options
| -rw-r--r-- | lib/Plugins/CCpp.cpp | 2 | ||||
| -rw-r--r-- | lib/Plugins/Firefox.cpp | 2 | ||||
| -rw-r--r-- | lib/Plugins/RunApp.cpp | 4 | ||||
| -rw-r--r-- | lib/Utils/CommLayerInner.cpp | 2 | ||||
| -rw-r--r-- | lib/Utils/make_descr.cpp | 2 | ||||
| -rw-r--r-- | lib/Utils/stringops.cpp | 25 | ||||
| -rw-r--r-- | po/or.po | 41 | ||||
| -rw-r--r-- | src/Applet/Applet.cpp | 2 | ||||
| -rw-r--r-- | src/Applet/CCApplet.cpp | 3 | ||||
| -rw-r--r-- | src/Daemon/Daemon.cpp | 4 | ||||
| -rw-r--r-- | src/Daemon/PluginManager.cpp | 6 | ||||
| -rw-r--r-- | src/Daemon/Settings.cpp | 61 | ||||
| -rw-r--r-- | src/Daemon/abrt.conf | 4 | ||||
| -rw-r--r-- | src/Gui/CCMainWindow.py | 4 | ||||
| -rw-r--r-- | src/Hooks/CCpp.cpp | 2 |
15 files changed, 99 insertions, 65 deletions
diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp index da6ff98..49a9e4a 100644 --- a/lib/Plugins/CCpp.cpp +++ b/lib/Plugins/CCpp.cpp @@ -903,7 +903,7 @@ void CAnalyzerCCpp::CreateReport(const char *pDebugDumpDir, int force) std::string build_ids; if (m_bInstallDebugInfo && DebuginfoCheckPolkit(atoi(UID.c_str()))) { - if (m_nDebugInfoCacheMB > 0) + if (m_nDebugInfoCacheMB > 0) trim_debuginfo_cache(m_nDebugInfoCacheMB); InstallDebugInfos(pDebugDumpDir, build_ids); } diff --git a/lib/Plugins/Firefox.cpp b/lib/Plugins/Firefox.cpp index 6741ff3..68dbd39 100644 --- a/lib/Plugins/Firefox.cpp +++ b/lib/Plugins/Firefox.cpp @@ -903,7 +903,7 @@ void CAnalyzerFirefox::CreateReport(const char *pDebugDumpDir, int force) std::string build_ids; if (m_bInstallDebugInfo && DebuginfoCheckPolkit(atoi(UID.c_str()))) { - if (m_nDebugInfoCacheMB > 0) + if (m_nDebugInfoCacheMB > 0) trim_debuginfo_cache(m_nDebugInfoCacheMB); InstallDebugInfos(pDebugDumpDir, build_ids); } diff --git a/lib/Plugins/RunApp.cpp b/lib/Plugins/RunApp.cpp index a2aa698..f7cbc01 100644 --- a/lib/Plugins/RunApp.cpp +++ b/lib/Plugins/RunApp.cpp @@ -52,6 +52,7 @@ void CActionRunApp::Run(const char *pActionDir, const char *pArgs) */ //Can do it using chdir() in child if we'd open-code popen string cd_and_cmd = ssprintf("cd '%s'; %s", pActionDir, cmd); + VERB1 log("RunApp: executing '%s'", cd_and_cmd.c_str()); FILE *fp = popen(cd_and_cmd.c_str(), "r"); if (fp == NULL) { @@ -65,7 +66,8 @@ void CActionRunApp::Run(const char *pActionDir, const char *pArgs) char line[1024]; while (fgets(line, 1024, fp) != NULL) { - output += line; + if (args.size() > FILENAME) + output += line; } pclose(fp); diff --git a/lib/Utils/CommLayerInner.cpp b/lib/Utils/CommLayerInner.cpp index 307fe66..133e97d 100644 --- a/lib/Utils/CommLayerInner.cpp +++ b/lib/Utils/CommLayerInner.cpp @@ -72,7 +72,7 @@ void update_client(const char *fmt, ...) int used = vasprintf(&msg, fmt, p); va_end(p); if (used < 0) - return; + return; s_pObs->Status(msg, peer, key); } diff --git a/lib/Utils/make_descr.cpp b/lib/Utils/make_descr.cpp index 1352149..0c09614 100644 --- a/lib/Utils/make_descr.cpp +++ b/lib/Utils/make_descr.cpp @@ -75,7 +75,7 @@ string make_description_bz(const map_crash_report_t& pCrashReport) && filename != FILENAME_RELEASE && filename != CD_REPRODUCE && filename != CD_COMMENT - ) { + ) { add_content(was_multiline, description, filename.c_str(), content.c_str()); } } diff --git a/lib/Utils/stringops.cpp b/lib/Utils/stringops.cpp index 1b3793f..dc71b5b 100644 --- a/lib/Utils/stringops.cpp +++ b/lib/Utils/stringops.cpp @@ -3,24 +3,33 @@ void parse_args(const char *psArgs, vector_string_t& pArgs, int quote) { unsigned ii; - bool is_quote = false; + bool inside_quotes = false; std::string item; for (ii = 0; psArgs[ii]; ii++) { - if (quote != -1 && psArgs[ii] == quote) + if (quote != -1) { - is_quote = !is_quote; + if (psArgs[ii] == quote) + { + inside_quotes = !inside_quotes; + continue; + } + /* inside quotes we support escaping with \x */ + if (inside_quotes && psArgs[ii] == '\\' && psArgs[ii+1]) + { + ii++; + item += psArgs[ii]; + continue; + } } - else if (psArgs[ii] == ',' && !is_quote) + if (psArgs[ii] == ',' && !inside_quotes) { pArgs.push_back(item); item.clear(); + continue; } - else - { - item += psArgs[ii]; - } + item += psArgs[ii]; } if (item.size() != 0) @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: abrt.master.or\n" "Report-Msgid-Bugs-To: jmoskovc@redhat.com\n" -"POT-Creation-Date: 2009-11-12 03:54+0000\n" -"PO-Revision-Date: 2009-11-12 18:06+0530\n" +"POT-Creation-Date: 2009-11-18 08:52+0000\n" +"PO-Revision-Date: 2009-11-18 18:04+0530\n" "Last-Translator: Manoj Kumar Giri <mgiri@redhat.com>\n" "Language-Team: Oriya <oriya-it@googlegroups.com>\n" "MIME-Version: 1.0\n" @@ -29,6 +29,7 @@ msgstr "" "\n" "\n" "\n" +"\n" #: ../src/Gui/ABRTExceptions.py:6 msgid "Another client is already running, trying to wake it." @@ -94,7 +95,7 @@ msgstr "<span color=\"white\">ବର୍ଣ୍ଣନା</span>" msgid "About ABRT" msgstr "ABRT ବିଷୟରେ" -#: ../src/Gui/ccgui.glade.h:6 +#: ../src/Gui/ccgui.glade.h:6 ../src/Gui/abrt.desktop.in.h:1 msgid "Automatic Bug Reporting Tool" msgstr "ସ୍ୱୟଂଚାଳିତ ତ୍ରୁଟି ନିବାରଣ ସାଧନ" @@ -252,8 +253,8 @@ msgid "" "then use Refresh button to regenerate the backtrace." msgstr "" "ଖବର କରିବା ପ୍ରକ୍ରିୟାକୁ ନିଷ୍କ୍ରିୟ କରାଯାଇଛି କାରଣ ବ୍ୟାକଟ୍ରେସଟି ବ୍ୟବହାର ଉପଯୋଗୀ ନୁହଁ।\n" -"ଦୟାକରି ତ୍ରୁଟି ନିବାରଣ ସୂଚନାକୁ ଏହି ନିର୍ଦ୍ଦେଶକୁ ବ୍ୟବହାର କରି ହସ୍ତକୃତ ଭାବରେ ସ୍ଥାପନ କରନ୍ତୁ:<span color=\"blue\"> " -"debuginfo-install %s </span>\n" +"ଦୟାକରି ତ୍ରୁଟି ନିବାରଣ ସୂଚନାକୁ ଏହି ନିର୍ଦ୍ଦେଶକୁ ବ୍ୟବହାର କରି ହସ୍ତକୃତ ଭାବରେ ସ୍ଥାପନ କରନ୍ତୁ:<span " +"color=\"blue\"> debuginfo-install %s </span>\n" "ତାପରେ ବ୍ୟାକଟ୍ରେସକୁ ପୁନଃନିର୍ମାଣ କରିବା ପାଇଁ ସତେଜନ କରିବା ବଟନକୁ ବ୍ୟବହାର କରନ୍ତୁ।" #: ../src/Gui/CCReporterDialog.py:221 @@ -265,8 +266,8 @@ msgid "" "The bactrace is incomplete, please make sure you provide good steps to " "reproduce." msgstr "" -"ବ୍ୟାକଟ୍ରେସଟି ସମ୍ପୂର୍ଣ୍ଣ ହୋଇନାହିଁ, ଦୟାକରି ନିଶ୍ଚିତ କରନ୍ତୁ ଯେ ଆପଣ ପୁନଃ ଉତ୍ପାଦନ କରିବା ପାଇଁ " -"ଉତ୍ତମ ପଦକ୍ଷେପ ପ୍ରଦାନ କରିଛନ୍ତି।" +"ବ୍ୟାକଟ୍ରେସଟି ସମ୍ପୂର୍ଣ୍ଣ ହୋଇନାହିଁ, ଦୟାକରି ନିଶ୍ଚିତ କରନ୍ତୁ ଯେ ଆପଣ ପୁନଃ ଉତ୍ପାଦନ କରିବା ପାଇଁ ଉତ୍ତମ " +"ପଦକ୍ଷେପ ପ୍ରଦାନ କରିଛନ୍ତି।" #: ../src/Gui/CCReporterDialog.py:272 #, python-format @@ -440,20 +441,20 @@ msgstr "gtk-close" msgid "gtk-remove" msgstr "gtk-remove" +#: ../src/Gui/abrt.desktop.in.h:2 +msgid "View and report application crashes" +msgstr "ପ୍ରୟୋଗ ବିନାଶକୁ ଦେଖନ୍ତୁ ଏବଂ ଖବର କରନ୍ତୁ" + #: ../src/Applet/Applet.cpp:79 #, c-format msgid "A crash in package %s has been detected" msgstr "ପ୍ୟାକେଜ %s ରେ ଗୋଟିଏ ବିନାଶ ଚିହ୍ନାପଡ଼ିଛି" -#: ../src/Applet/Applet.cpp:138 -msgid "ABRT service has been started" -msgstr "ABRT ସର୍ଭିସ ଆରମ୍ଭ ହୋଇସାରିଛି" - -#: ../src/Applet/Applet.cpp:140 ../src/Applet/Applet.cpp:254 +#: ../src/Applet/Applet.cpp:253 msgid "ABRT service is not running" msgstr "ABRT ସର୍ଭିସଟି ଚାଲୁନାହିଁ" -#: ../src/Applet/CCApplet.cpp:185 +#: ../src/Applet/CCApplet.cpp:196 msgid "Warning" msgstr "ଚେତାବନୀ" @@ -535,14 +536,10 @@ msgstr "ତ୍ରୁଟିନିବାରଣ ସୂଚନା ସ୍ଥାପନ msgid "Creating and submitting a report..." msgstr "ବିବରଣୀ ନିର୍ମାଣ କରି ଦାଖଲ କରୁଅଛି..." -#: ../lib/Plugins/Logger.cpp:65 ../lib/Plugins/Mailx.cpp:124 +#: ../lib/Plugins/Logger.cpp:65 msgid "Creating a report..." msgstr "ବିବରଣୀ ନିର୍ମାଣ କରୁଅଛି..." -#: ../lib/Plugins/RunApp.cpp:64 -msgid "Executing RunApp plugin..." -msgstr "RunApp ପ୍ଲଗଇନକୁ ନିଷ୍ପାଦନ କରୁଅଛି..." - #: ../lib/Plugins/FileTransfer.cpp:63 ../lib/Plugins/FileTransfer.cpp:384 msgid "FileTransfer: URL not specified" msgstr "ଫାଇଲ ପରିବହନ: URL ଉଲ୍ଲେଖ କରାହୋଇନାହିଁ" @@ -570,20 +567,20 @@ msgstr "ଗୋଟିଏ ଅଭିଲେଖ ନିର୍ମାଣ କରି ପ msgid "Creating kernel oops crash reports..." msgstr "କର୍ଣ୍ଣଲ oops ନଷ୍ଟ ବିବରଣୀଗୁଡ଼ିକୁ ନିର୍ମାଣ କରୁଅଛି..." -#: ../lib/Plugins/Mailx.cpp:109 +#: ../lib/Plugins/Mailx.cpp:163 msgid "Sending an email..." msgstr "ଗୋଟିଏ ଇମେଲ ପଠାଉଅଛି..." -#: ../lib/Plugins/SOSreport.cpp:100 +#: ../lib/Plugins/SOSreport.cpp:69 msgid "Executing SOSreport plugin..." msgstr "SOSreport ପ୍ଲଗଇନକୁ ନିଷ୍ପାଦନ କରୁଅଛି..." -#: ../lib/Plugins/SOSreport.cpp:122 +#: ../lib/Plugins/SOSreport.cpp:91 #, c-format msgid "running sosreport: %s" msgstr "sosreport ଚାଲୁଅଛି: %s" -#: ../lib/Plugins/SOSreport.cpp:137 +#: ../lib/Plugins/SOSreport.cpp:95 msgid "done running sosreport" msgstr "sosreport ଚଲାଇବା ସମାପ୍ତ ହେଲା" diff --git a/src/Applet/Applet.cpp b/src/Applet/Applet.cpp index ab8640a..46278c6 100644 --- a/src/Applet/Applet.cpp +++ b/src/Applet/Applet.cpp @@ -201,7 +201,7 @@ int main(int argc, char** argv) default: error_msg_and_die( "Usage: abrt-applet [-v]\n" - "\nOptions:" + "\nOptions:" "\n\t-v\tVerbose" ); } diff --git a/src/Applet/CCApplet.cpp b/src/Applet/CCApplet.cpp index 704ecce..e6a3cf0 100644 --- a/src/Applet/CCApplet.cpp +++ b/src/Applet/CCApplet.cpp @@ -229,7 +229,7 @@ void CApplet::OnMenuPopup_cb(GtkStatusIcon *status_icon, CApplet *applet = (CApplet *)user_data; /* stop the animation */ applet->stop_animate_icon(); - + if (applet->m_pMenu != NULL) { gtk_menu_popup(GTK_MENU(((CApplet *)user_data)->m_pMenu), @@ -237,7 +237,6 @@ void CApplet::OnMenuPopup_cb(GtkStatusIcon *status_icon, gtk_status_icon_position_menu, status_icon, button, activate_time); } - } void CApplet::ShowIcon() diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp index 99f4af8..087d537 100644 --- a/src/Daemon/Daemon.cpp +++ b/src/Daemon/Daemon.cpp @@ -685,9 +685,9 @@ static void sanitize_dump_dir_rights() /* 00777 bits are usual "rwxrwxrwx" access rights */ ensure_writable_dir(DEBUG_DUMPS_DIR, 0775, "abrt"); /* debuginfo cache */ - ensure_writable_dir(DEBUG_DUMPS_DIR"-di", 0755, "root"); + ensure_writable_dir(DEBUG_DUMPS_DIR"-di", 0755, "root"); /* temp dir */ - ensure_writable_dir(VAR_RUN"/abrt", 0755, "root"); + ensure_writable_dir(VAR_RUN"/abrt", 0755, "root"); } int main(int argc, char** argv) diff --git a/src/Daemon/PluginManager.cpp b/src/Daemon/PluginManager.cpp index 5865e42..3867ec9 100644 --- a/src/Daemon/PluginManager.cpp +++ b/src/Daemon/PluginManager.cpp @@ -150,10 +150,10 @@ void CPluginManager::LoadPlugins() void CPluginManager::UnLoadPlugins() { - map_abrt_plugins_t::iterator it_p = m_mapABRTPlugins.begin(); - while (it_p != m_mapABRTPlugins.end()) + map_abrt_plugins_t::iterator it; + while ((it = m_mapABRTPlugins.begin()) != m_mapABRTPlugins.end()) { - UnLoadPlugin(it_p->first.c_str()); + UnLoadPlugin(it->first.c_str()); } } diff --git a/src/Daemon/Settings.cpp b/src/Daemon/Settings.cpp index 7f419ec..327851f 100644 --- a/src/Daemon/Settings.cpp +++ b/src/Daemon/Settings.cpp @@ -78,8 +78,11 @@ static set_string_t ParseList(const char* pList) return set; } +/* (What format do we parse here?) */ static vector_pair_string_string_t ParseListWithArgs(const char *pValue) { + VERB3 log(" ParseListWithArgs(%s)", pValue); + vector_pair_string_string_t pluginsWithArgs; unsigned int ii; std::string item; @@ -88,39 +91,55 @@ static vector_pair_string_string_t ParseListWithArgs(const char *pValue) bool is_arg = false; for (ii = 0; pValue[ii]; ii++) { - if (pValue[ii] == '\"') + if (is_quote && pValue[ii] == '\\' && pValue[ii+1]) + { + item += pValue[ii]; + ii++; + item += pValue[ii]; + continue; + } + if (pValue[ii] == '"') { is_quote = !is_quote; item += pValue[ii]; + continue; + } + if (is_quote) + { + item += pValue[ii]; + continue; } - else if (pValue[ii] == '(' && !is_quote) + if (pValue[ii] == '(') { action = item; item = ""; is_arg = true; + continue; } - else if (pValue[ii] == ')' && is_arg && !is_quote) + if (pValue[ii] == ')' && is_arg) { + VERB3 log(" adding (%s,%s)", action.c_str(), item.c_str()); pluginsWithArgs.push_back(make_pair(action, item)); item = ""; is_arg = false; action = ""; + continue; } - else if (pValue[ii] == ',' && !is_quote && !is_arg) + if (pValue[ii] == ',' && !is_arg) { if (item != "") { + VERB3 log(" adding (%s,%s)", item.c_str(), ""); pluginsWithArgs.push_back(make_pair(item, "")); item = ""; } + continue; } - else - { - item += pValue[ii]; - } + item += pValue[ii]; } if (item != "") { + VERB3 log(" adding (%s,%s)", item.c_str(), ""); pluginsWithArgs.push_back(make_pair(item, "")); } return pluginsWithArgs; @@ -255,42 +274,50 @@ void LoadSettings() std::string value; for (ii = 0; ii < line.length(); ii++) { + if (is_quote && line[ii] == '\\' && ii+1 < line.length()) + { + value += line[ii]; + ii++; + value += line[ii]; + continue; + } if (isspace(line[ii]) && !is_quote) { continue; } - else if (line[ii] == '#' && !is_quote && key == "") + if (line[ii] == '#' && !is_quote && key == "") { break; } - else if (line[ii] == '[' && !is_quote) + if (line[ii] == '[' && !is_quote) { is_section = true; section = ""; + continue; } - else if (line[ii] == '\"') + if (line[ii] == '"') { is_quote = !is_quote; value += line[ii]; + continue; } - else if (is_section) + if (is_section) { if (line[ii] == ']') { break; } section += line[ii]; + continue; } - else if (line[ii] == '=' && !is_quote) + if (line[ii] == '=' && !is_quote) { is_key = false; key = value; value = ""; + continue; } - else - { - value += line[ii]; - } + value += line[ii]; } if (!is_key && !is_quote) { diff --git a/src/Daemon/abrt.conf b/src/Daemon/abrt.conf index f24ec4a..028f582 100644 --- a/src/Daemon/abrt.conf +++ b/src/Daemon/abrt.conf @@ -17,14 +17,14 @@ Database = SQLite3 MaxCrashReportsSize = 1000 # Vector of actions and reporters which are activated immediately after a crash occurs #ActionsAndReporters = Mailx("[abrt] new crash was detected") -# TODO: teach parser to escape \". Should be: x"`cat component`" = x"xorg-x11-server-Xorg" -ActionsAndReporters = RunApp("test x`cat component` = xxorg-x11-server-Xorg && cp /var/log/Xorg*.log .") +ActionsAndReporters = RunApp("test x\"`cat component`\" = x\"xorg-x11-server-Xorg\" && cp /var/log/Xorg.0.log .") # Reporters association with analyzers [ AnalyzerActionsAndReporters ] Kerneloops = KerneloopsReporter CCpp = Bugzilla, Logger Python = Bugzilla, Logger +#CCpp:xorg-x11-apps = RunApp("date", "date.txt") # Repeated calling of Action plugins [ Cron ] diff --git a/src/Gui/CCMainWindow.py b/src/Gui/CCMainWindow.py index 31ebb41..3ada6f2 100644 --- a/src/Gui/CCMainWindow.py +++ b/src/Gui/CCMainWindow.py @@ -325,7 +325,7 @@ class MainWindow(): try: self.ccdaemon.getReport(report["_MWUUID"][2], force=1) except Exception, e: - # FIXME #3 dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply + # FIXME #3 dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply # do this async and wait for yum to end with debuginfoinstal if self.timer: gobject.source_remove(self.timer) @@ -352,7 +352,7 @@ class MainWindow(): try: self.ccdaemon.getReport(dump.getUUID()) except Exception, e: - # FIXME #3 dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply + # FIXME #3 dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply # do this async and wait for yum to end with debuginfoinstal if self.timer: gobject.source_remove(self.timer) diff --git a/src/Hooks/CCpp.cpp b/src/Hooks/CCpp.cpp index 81cd77a..2b75381 100644 --- a/src/Hooks/CCpp.cpp +++ b/src/Hooks/CCpp.cpp @@ -65,7 +65,7 @@ static char* get_cmdline(pid_t pid) if (len > 0) { /* In Linux, there is always one trailing NUL byte, - * prevent it from being replaced by space below. + * prevent it from being replaced by space below. */ if (cmdline[len - 1] == '\0') len--; |
