summaryrefslogtreecommitdiffstats
path: root/pym/portage/elog
Commit message (Collapse)AuthorAgeFilesLines
* Use unicode_literals more.Zac Medico2013-01-181-8/+13
| | | | | This helps to ensure consistent results, regardless of whether we're using Python 2 or Python 3.
* elog/mod_save_summary: wrap IOError, bug #441948Zac Medico2012-11-131-4/+17
|
* elog/mod_save: wrap IOException for bug #441948Zac Medico2012-11-131-6/+18
|
* elog/mod_syslog: fix 1 char msgs, bug #390965Zac Medico2011-11-251-0/+5
|
* collect_ebuild_messages: handle \r, bug #390833Zac Medico2011-11-181-2/+3
|
* _make_msgfunction: convert to classZac Medico2011-11-171-6/+10
|
* collect_ebuild_messages: validate msg typeZac Medico2011-11-171-1/+11
| | | | | | | This will handle invalid message types like the one that triggers the KeyError in dblink._elog_process for bug #390833. It will also output the content of the line in order to help diagnose the source of corruption.
* Use bytes instead of unicode with isinstance.Zac Medico2011-10-281-1/+1
| | | | | This is preferred since the bytes type is available in all supported python versions, while the unicode type is only available in python2.
* elog_process: fix ridicoulus newlines bug #386771Zac Medico2011-10-111-4/+12
| | | | | | This fixes a regression since commit 8a119ea94ecc6668797e3a1358465ef3733f3a3e which added a newline after each character. This boosts efficiency since we no longer convert a strings to lists of characters.
* mod_syslog: add newlines for bug #386627Zac Medico2011-10-101-5/+4
| | | | | This fixes omission of newlines in syslog messages since commit ca7bef7821876791a26a5f9df6938f4c77fe571f.
* elog_process: add newlines for bug #386627Zac Medico2011-10-101-4/+4
| | | | | This fixes omission of newlines in saved messages since commit ca7bef7821876791a26a5f9df6938f4c77fe571f.
* elog/collect_ebuild_messages: strip trailing \nv2.2.0_alpha62Zac Medico2011-10-051-0/+1
| | | | | This fixes unintended extra blank lines since commit 1c8ff00a26b0e2e3627e9c552374f71235ee6c39.
* elog/mod_save: join /var/log with os.sep tooZac Medico2011-09-032-2/+4
|
* elog/mod_echo: send all msg types to stdoutZac Medico2011-09-031-0/+13
|
* elog/mod_save: join /var/log with EPREFIXZac Medico2011-09-032-2/+2
|
* python3.2 fixes: ResourceWarning: unclosed fileZac Medico2011-08-251-2/+4
|
* Fix log uid for logrotate-3.8 compat (bug 378451)Zac Medico2011-08-122-4/+39
| | | | | | | | | | | If PORT_LOGDIR is writable by the portage group but its uid is not portage_uid, then set the uid to portage_uid if we have privileges to do so, and also copy the uid to the logfile. This fixes logrotate chown failures during the compression phase, when it attempts to copy the uid from the logfile to a temp file. With the "su portage portage" directive and logrotate-3.8.0, logrotate's chown call during the compression phase will only succeed if the log file's uid is portage_uid.
* elog/mod_save: fix permissions for logrotateZac Medico2011-07-112-4/+8
| | | | | These permissions should be compatible with our default logrotate config as discussed in bug 374287.
* elog/mod_save: ensure parent logdir existsZac Medico2011-07-112-2/+16
|
* elog/mod_save: use _ensure_log_subdirsZac Medico2011-07-112-18/+26
| | | | | This fixes permission issues with category subdirectories created for FEATURES=split-elog.
* Migrate from codecs.open() to io.open().Zac Medico2011-07-103-15/+16
| | | | | | | | | | | | | | | | | The io.open() function is the same as the built-in open() function in python3, and its implementation is optimized in python-2.7 and later. In addition to the possible performance improvement, this also allows us to avoid any future compatibility issues with codecs.open() that may arise if it is delegated to the built-in open() function as discussed in PEP 400. The main caveat involved with io.open() is that TextIOWrapper.write() raises TypeError if given raw bytes, unlike the streams returned from codecs.open(). This is mainly an issue for python2 since literal strings are raw bytes. We handle this by wrapping TextIOWrapper.write() arguments with our _unicode_decode() function. Also, the atomic_ofstream class overrides the write() method in python2 so that it performs automatic coercion to unicode when necessary.
* mod_syslog: call syslog() once per lineZac Medico2011-01-021-6/+7
| | | | This will fix bug #350379.
* Remove unused _preserve_logentries code.Zac Medico2010-10-071-9/+2
|
* Preserve elog message continuity during updates.Zac Medico2010-10-072-7/+13
|
* Add a _preload_elog_modules() function.Zac Medico2010-10-071-0/+14
|
* Preserve message continuity in elog_process().Zac Medico2010-10-072-4/+9
|
* TODO: Make elog 'key' parameter more unique.Zac Medico2010-10-031-0/+9
|
* Tweak elog message order so python comes first.Zac Medico2010-10-021-1/+5
|
* Make the mail_summary elog module copy needed variables from the configZac Medico2010-09-111-3/+19
| | | | | | | instance, since we don't need to hold a reference for the whole thing. This also makes it possible to rely on per-package variable settings that may have come from /etc/portage/package.env, since we'll be isolated from any future mutations of mysettings.
* Add back PortageException handler inside mod_mail_summary.finalize()Zac Medico2010-09-031-2/+4
| | | | since portage.mail.send_mail() can raise this exception.
* Use AlarmSignal for timout handling in mod_mail_summary.finalize().Zac Medico2010-09-031-10/+6
|
* Use AlarmSignal for timeout handling in elog_process().Zac Medico2010-09-031-7/+6
|
* Remove unused imports found by pylint.Arfrever Frehtes Taifersar Arahesis2010-08-291-3/+1
|
* Remove 'mysettings' arguments from finalize() functions since theZac Medico2010-07-202-8/+2
| | | | shouldn't be needed for backward compatibility anymore.
* Remove all svn $Id keywords.Zac Medico2010-03-2410-10/+0
|
* Remove unused filter_phases, filter_mergephases, and filter_unmergephasesv2.2_rc56Zac Medico2009-12-071-20/+0
| | | | | | functions. svn path=/main/trunk/; revision=14958
* Bug #290625 - Manually encode output to stdout in python3, in order to avoidZac Medico2009-10-261-5/+6
| | | | | | potential UnicodeEncodeError exceptions. svn path=/main/trunk/; revision=14734
* Bug #273099 - Add split-log and split-elog FEATURES for splitting build logsZac Medico2009-10-091-2/+13
| | | | | | | and elog mod_save logs into category subdirectories. Thanks to Sebastian Mingramm (few) for this patch. svn path=/main/trunk/; revision=14532
* Replace dict.keys() usage with __iter__(), since it behaves identically inZac Medico2009-09-222-3/+3
| | | | | | both python 2.x and 3.x. svn path=/main/trunk/; revision=14384
* Use dict.(keys|values|items)() instead of ↵Arfrever Frehtes Taifersar Arahesis2009-09-212-4/+4
| | | | | | | | dict.(iterkeys|itervalues|iteritems)() for compatibility with Python 3. (2to3-3.1 -f dict -nw ${FILES}) svn path=/main/trunk/; revision=14327
* Define basestring as str when Python 3 is used.Arfrever Frehtes Taifersar Arahesis2009-09-211-0/+4
| | | | svn path=/main/trunk/; revision=14316
* Support print() function with Python 2 in more files.Arfrever Frehtes Taifersar Arahesis2009-09-201-0/+2
| | | | svn path=/main/trunk/; revision=14295
* Update syntax of numbers for compatibility with Python 3.Arfrever Frehtes Taifersar Arahesis2009-09-202-3/+3
| | | | | | (2to3-3.1 -f numliterals -nw ${FILES}) svn path=/main/trunk/; revision=14292
* Update syntax of calls to print() for compatibility with Python 3.Arfrever Frehtes Taifersar Arahesis2009-09-201-2/+2
| | | | | | (2to3-3.1 -f print -nw ${FILES}) svn path=/main/trunk/; revision=14290
* Update syntax of 'except' statements for compatibility with Python 3.Arfrever Frehtes Taifersar Arahesis2009-09-203-4/+4
| | | | | | (2to3-3.1 -f except -nw ${FILES}) svn path=/main/trunk/; revision=14289
* Use _unicode_decode() on the string returned from time.strftime(), in orderZac Medico2009-09-052-2/+10
| | | | | | | to avoid a potential UnicodeDecodeError later. Thanks to Markus Duft <mduft@gentoo.org> for reporting. svn path=/main/trunk/; revision=14201
* Use _unicode_decode() on the string retunred from time.strftime(), in orderZac Medico2009-09-031-1/+7
| | | | | | | to avoid a potential UnicodeDecodeError later. Thanks to Markus Duft <mduft@gentoo.org> for reporting. svn path=/main/trunk/; revision=14180
* Use _encodings where appropriate and add _encodings['stdio'] for stdoutZac Medico2009-08-214-10/+23
| | | | | | encoding. svn path=/main/trunk/; revision=14111
* Use a clean listener system for portage.elog instead of _emerge_elog_listenerMounir Lamouri2009-08-161-5/+17
| | | | svn path=/main/trunk/; revision=14071
* Update imports to import portage.os (with unicode wrappers).Zac Medico2009-08-145-6/+11
| | | | svn path=/main/trunk/; revision=14051