Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Use unicode_literals more. | Zac Medico | 2013-01-18 | 1 | -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 #441948 | Zac Medico | 2012-11-13 | 1 | -4/+17 |
| | |||||
* | elog/mod_save: wrap IOException for bug #441948 | Zac Medico | 2012-11-13 | 1 | -6/+18 |
| | |||||
* | elog/mod_syslog: fix 1 char msgs, bug #390965 | Zac Medico | 2011-11-25 | 1 | -0/+5 |
| | |||||
* | collect_ebuild_messages: handle \r, bug #390833 | Zac Medico | 2011-11-18 | 1 | -2/+3 |
| | |||||
* | _make_msgfunction: convert to class | Zac Medico | 2011-11-17 | 1 | -6/+10 |
| | |||||
* | collect_ebuild_messages: validate msg type | Zac Medico | 2011-11-17 | 1 | -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 Medico | 2011-10-28 | 1 | -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 #386771 | Zac Medico | 2011-10-11 | 1 | -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 #386627 | Zac Medico | 2011-10-10 | 1 | -5/+4 |
| | | | | | This fixes omission of newlines in syslog messages since commit ca7bef7821876791a26a5f9df6938f4c77fe571f. | ||||
* | elog_process: add newlines for bug #386627 | Zac Medico | 2011-10-10 | 1 | -4/+4 |
| | | | | | This fixes omission of newlines in saved messages since commit ca7bef7821876791a26a5f9df6938f4c77fe571f. | ||||
* | elog/collect_ebuild_messages: strip trailing \nv2.2.0_alpha62 | Zac Medico | 2011-10-05 | 1 | -0/+1 |
| | | | | | This fixes unintended extra blank lines since commit 1c8ff00a26b0e2e3627e9c552374f71235ee6c39. | ||||
* | elog/mod_save: join /var/log with os.sep too | Zac Medico | 2011-09-03 | 2 | -2/+4 |
| | |||||
* | elog/mod_echo: send all msg types to stdout | Zac Medico | 2011-09-03 | 1 | -0/+13 |
| | |||||
* | elog/mod_save: join /var/log with EPREFIX | Zac Medico | 2011-09-03 | 2 | -2/+2 |
| | |||||
* | python3.2 fixes: ResourceWarning: unclosed file | Zac Medico | 2011-08-25 | 1 | -2/+4 |
| | |||||
* | Fix log uid for logrotate-3.8 compat (bug 378451) | Zac Medico | 2011-08-12 | 2 | -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 logrotate | Zac Medico | 2011-07-11 | 2 | -4/+8 |
| | | | | | These permissions should be compatible with our default logrotate config as discussed in bug 374287. | ||||
* | elog/mod_save: ensure parent logdir exists | Zac Medico | 2011-07-11 | 2 | -2/+16 |
| | |||||
* | elog/mod_save: use _ensure_log_subdirs | Zac Medico | 2011-07-11 | 2 | -18/+26 |
| | | | | | This fixes permission issues with category subdirectories created for FEATURES=split-elog. | ||||
* | Migrate from codecs.open() to io.open(). | Zac Medico | 2011-07-10 | 3 | -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 line | Zac Medico | 2011-01-02 | 1 | -6/+7 |
| | | | | This will fix bug #350379. | ||||
* | Remove unused _preserve_logentries code. | Zac Medico | 2010-10-07 | 1 | -9/+2 |
| | |||||
* | Preserve elog message continuity during updates. | Zac Medico | 2010-10-07 | 2 | -7/+13 |
| | |||||
* | Add a _preload_elog_modules() function. | Zac Medico | 2010-10-07 | 1 | -0/+14 |
| | |||||
* | Preserve message continuity in elog_process(). | Zac Medico | 2010-10-07 | 2 | -4/+9 |
| | |||||
* | TODO: Make elog 'key' parameter more unique. | Zac Medico | 2010-10-03 | 1 | -0/+9 |
| | |||||
* | Tweak elog message order so python comes first. | Zac Medico | 2010-10-02 | 1 | -1/+5 |
| | |||||
* | Make the mail_summary elog module copy needed variables from the config | Zac Medico | 2010-09-11 | 1 | -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 Medico | 2010-09-03 | 1 | -2/+4 |
| | | | | since portage.mail.send_mail() can raise this exception. | ||||
* | Use AlarmSignal for timout handling in mod_mail_summary.finalize(). | Zac Medico | 2010-09-03 | 1 | -10/+6 |
| | |||||
* | Use AlarmSignal for timeout handling in elog_process(). | Zac Medico | 2010-09-03 | 1 | -7/+6 |
| | |||||
* | Remove unused imports found by pylint. | Arfrever Frehtes Taifersar Arahesis | 2010-08-29 | 1 | -3/+1 |
| | |||||
* | Remove 'mysettings' arguments from finalize() functions since the | Zac Medico | 2010-07-20 | 2 | -8/+2 |
| | | | | shouldn't be needed for backward compatibility anymore. | ||||
* | Remove all svn $Id keywords. | Zac Medico | 2010-03-24 | 10 | -10/+0 |
| | |||||
* | Remove unused filter_phases, filter_mergephases, and filter_unmergephasesv2.2_rc56 | Zac Medico | 2009-12-07 | 1 | -20/+0 |
| | | | | | | functions. svn path=/main/trunk/; revision=14958 | ||||
* | Bug #290625 - Manually encode output to stdout in python3, in order to avoid | Zac Medico | 2009-10-26 | 1 | -5/+6 |
| | | | | | | potential UnicodeEncodeError exceptions. svn path=/main/trunk/; revision=14734 | ||||
* | Bug #273099 - Add split-log and split-elog FEATURES for splitting build logs | Zac Medico | 2009-10-09 | 1 | -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 in | Zac Medico | 2009-09-22 | 2 | -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 Arahesis | 2009-09-21 | 2 | -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 Arahesis | 2009-09-21 | 1 | -0/+4 |
| | | | | svn path=/main/trunk/; revision=14316 | ||||
* | Support print() function with Python 2 in more files. | Arfrever Frehtes Taifersar Arahesis | 2009-09-20 | 1 | -0/+2 |
| | | | | svn path=/main/trunk/; revision=14295 | ||||
* | Update syntax of numbers for compatibility with Python 3. | Arfrever Frehtes Taifersar Arahesis | 2009-09-20 | 2 | -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 Arahesis | 2009-09-20 | 1 | -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 Arahesis | 2009-09-20 | 3 | -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 order | Zac Medico | 2009-09-05 | 2 | -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 order | Zac Medico | 2009-09-03 | 1 | -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 stdout | Zac Medico | 2009-08-21 | 4 | -10/+23 |
| | | | | | | encoding. svn path=/main/trunk/; revision=14111 | ||||
* | Use a clean listener system for portage.elog instead of _emerge_elog_listener | Mounir Lamouri | 2009-08-16 | 1 | -5/+17 |
| | | | | svn path=/main/trunk/; revision=14071 | ||||
* | Update imports to import portage.os (with unicode wrappers). | Zac Medico | 2009-08-14 | 5 | -6/+11 |
| | | | | svn path=/main/trunk/; revision=14051 |