- added more info to equo reports
- misc bug fixes git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@1117 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
+9
-4
@@ -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."))
|
||||
|
||||
@@ -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"))
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
?>
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user