diff --git a/client/equo b/client/equo index 5601c5b4d..d74a87248 100644 --- a/client/equo +++ b/client/equo @@ -347,19 +347,24 @@ except Exception: import traceback from entropy import ErrorReportInterface + exception_data = "" try: ferror = open("/tmp/equoerror.txt","w") traceback.print_exc(file = ferror) ferror.write("\nRevision: "+etpConst['entropyversion']+"\n\n") - #data = entropyTools.printException(True) - #for x in data: - # ferror.write(str(x)+"\n") + exception_data = entropyTools.printException(True) ferror.write("\n") ferror.flush() ferror.close() f = open("/tmp/equoerror.txt","r") errorText = f.readlines() f.close() + ferror = open("/tmp/equoerror.txt","aw") + ferror.write("\n\n") + for x in exception_data: + ferror.write(str(x)+"\n") + ferror.flush() + ferror.close() except Exception, e: print print_error(darkred("Oh well, I cannot even write to /tmp. So, please copy the error and mail lxnay@sabayonlinux.org.")) @@ -385,7 +390,7 @@ except Exception: email = readtext("Your E-Mail address: ") errorText = ''.join(errorText) error = ErrorReportInterface() - error.prepare(errorText,name,email) + error.prepare(errorText,name,email,exception_data) result = error.submit() if (result): print_error(darkgreen("Thank you very much. The error has been reported and hopefully, the problem will be solved as soon as possible.")) diff --git a/client/text_rescue.py b/client/text_rescue.py index 0564f538b..7f263828b 100644 --- a/client/text_rescue.py +++ b/client/text_rescue.py @@ -149,7 +149,7 @@ def database(options): return 0 elif (options[0] == "check"): - if Equo.clientDatabase.doesTableExist("baseinfo"): + if Equo.clientDbconn.doesTableExist("baseinfo"): Equo.clientDatabaseSanityCheck() else: print_warning(bold("# ATTENTION: ")+red("database does not exist or is badly broken")) diff --git a/handlers/http_error_report.php b/handlers/http_error_report.php index e38de91e7..2ceba383a 100644 --- a/handlers/http_error_report.php +++ b/handlers/http_error_report.php @@ -9,14 +9,18 @@ $email = $_POST['email']; $mail = "fabio.erculiani@gmail.com"; $subject = "Entropy Error Reporting Handler"; $message = "Hello, this is an Entropy error report.\n"; -$message .= $_POST['stacktrace'] . "\n\nArchitecture: " . $arch . "\n"; +$message .= $_POST['stacktrace']; +$message .= "\n\n"; +$message .= $_POST['errordata']; +$message .= "\n\nArchitecture: " . $arch . "\n"; $message .= 'Name: ' . $name . "\n"; $message .= 'E-mail: ' . $email . "\n"; $message .= 'Version: ' . $version . "\n"; $message .= 'IP: ' . $ip . "\n"; $message .= 'Date: ' . date("G:i d/F/Y") . "\n"; $message .= "\n"; -if ($_POST['stacktrace'] && $_POST['arch'] && $ip) +if ($_POST['stacktrace'] && $_POST['arch'] && $ip) { $rc = mail($mail,$subject,$message, $header); print_r($rc); +} ?> \ No newline at end of file diff --git a/libraries/entropy.py b/libraries/entropy.py index 0cc2221d8..65cc2b9cf 100644 --- a/libraries/entropy.py +++ b/libraries/entropy.py @@ -2117,7 +2117,9 @@ class PackageInterface: self.Entropy.equoLog.log(ETP_LOGPRI_INFO,ETP_LOGLEVEL_NORMAL,"Unpacking package: "+str(self.infoDict['atom'])) if os.path.isdir(self.infoDict['unpackdir']): - shutil.rmtree(self.infoDict['unpackdir']) + shutil.rmtree(self.infoDict['unpackdir'].encode('raw_unicode_escape')) + elif os.path.isfile(self.infoDict['unpackdir']): + os.remove(self.infoDict['unpackdir'].encode('raw_unicode_escape')) os.makedirs(self.infoDict['imagedir']) rc = self.Entropy.entropyTools.uncompressTarBz2( @@ -6086,12 +6088,13 @@ class ErrorReportInterface: opener = urllib2.build_opener(proxy_support) urllib2.install_opener(opener) - def prepare(self, tb_text, name, email): + def prepare(self, tb_text, name, email, report_data = ""): self.params['arch'] = etpConst['currentarch'] self.params['stacktrace'] = tb_text self.params['name'] = name self.params['email'] = email self.params['version'] = etpConst['entropyversion'] + self.params['errordata'] = report_data self.generated = True # params is a dict, key(HTTP post item name): value