summaryrefslogtreecommitdiffstats
path: root/pym/portage/elog/messages.py
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* elog/collect_ebuild_messages: strip trailing \nv2.2.0_alpha62Zac Medico2011-10-051-0/+1
| | | | | This fixes unintended extra blank lines since commit 1c8ff00a26b0e2e3627e9c552374f71235ee6c39.
* python3.2 fixes: ResourceWarning: unclosed fileZac Medico2011-08-251-2/+4
|
* Migrate from codecs.open() to io.open().Zac Medico2011-07-101-4/+3
| | | | | | | | | | | | | | | | | 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.
* Preserve elog message continuity during updates.Zac Medico2010-10-071-2/+12
|
* Preserve message continuity in elog_process().Zac Medico2010-10-071-3/+8
|
* TODO: Make elog 'key' parameter more unique.Zac Medico2010-10-031-0/+9
|
* Remove all svn $Id keywords.Zac Medico2010-03-241-1/+0
|
* 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
* Use _encodings where appropriate and add _encodings['stdio'] for stdoutZac Medico2009-08-211-5/+10
| | | | | | encoding. svn path=/main/trunk/; revision=14111
* Update imports to import portage.os (with unicode wrappers).Zac Medico2009-08-141-1/+1
| | | | svn path=/main/trunk/; revision=14051
* Inside collect_ebuild_messages(), open elog files in text mode (unicode).Zac Medico2009-08-091-1/+3
| | | | | | Thanks to jlec for reporting. svn path=/main/trunk/; revision=13958
* Add unicode conversions in various logging code.Zac Medico2009-08-061-5/+13
| | | | svn path=/main/trunk/; revision=13931
* Prepare 41 messages to localization.Arfrever Frehtes Taifersar Arahesis2009-06-291-3/+4
| | | | svn path=/main/trunk/; revision=13733
* Use lazyimport to avoid importing the dep, output, update, and versionsZac Medico2009-02-221-1/+1
| | | | | | modules when portage is initially imported. svn path=/main/trunk/; revision=12681
* Use lazyimport to avoid importing the checksum, locks, and util modulesZac Medico2009-02-221-2/+6
| | | | | | when portage is initially imported. svn path=/main/trunk/; revision=12680
* For compatibility with python-3.0, open files in text mode where appropriate.Zac Medico2009-02-191-1/+1
| | | | svn path=/main/trunk/; revision=12642
* Set svn:keywords Id on all files.Zac Medico2009-02-181-1/+1
| | | | svn path=/main/trunk/; revision=12626
* Now that elog_base() uses 'echo -e' to expand escape codes prior to usingZac Medico2008-09-301-1/+1
| | | | | | | | 'read' to split on newlines, it's safe to use newlines as delimiters in the log file since 'read' is guaranteed to split any newlines contained in the arguments. svn path=/main/trunk/; revision=11601
* Even though the message is split on $'\n' in elog_base(), it's stillZac Medico2008-07-281-1/+1
| | | | | | | | not entirely safe to use it as a delimiter in the log file since there can still be escaped newlines that will be expanded due to the echo -e parameter. svn path=/main/trunk/; revision=11244
* Make elog_base() just use \n as the delimiter in the file since it's safeZac Medico2008-07-271-1/+1
| | | | | | now that lines are always split. svn path=/main/trunk/; revision=11220
* Redirect dblink elog messages from stdout to the log file when in backgroundZac Medico2008-07-171-4/+12
| | | | | | | | mode. This is implemented by adding a new "out" parameter to the portage.elog.e* functions, which can be used to send output to an arbitary file instead of stdout. svn path=/main/trunk/; revision=11117
* Py3k compatibility patch #4 by Ali Polatel <hawking@g.o>.Zac Medico2008-07-011-2/+2
| | | | | | Replace dict.has_key() calls with "in" and "not in" operators. svn path=/main/trunk/; revision=10873
* Remove eblank nonsenseMarius Mauch2008-06-171-0/+2
| | | | svn path=/main/trunk/; revision=10694
* Handle issues with newlines in elog messages that can trigger an unhandledZac Medico2008-04-091-3/+11
| | | | | | | | | ValueError to be raised from a split() call inside collect_ebuild_messages(): * Use \0 to delimit messages, so that that elog messages containing newlines are handled correctly. * Handle a potential ValueError when splitting the message type. svn path=/main/trunk/; revision=9763
* Fix a little issue in the code from bug #197905 that causes some elogZac Medico2008-04-081-0/+2
| | | | | | messages to get lost. svn path=/main/trunk/; revision=9747
* preserve order of ebuild messages even between different message types (bug ↵Marius Mauch2008-04-061-4/+15
| | | | | | #197905) svn path=/main/trunk/; revision=9726
* ensure that global variables are used to prevent confusing issues like bug ↵Marius Mauch2008-03-021-0/+7
| | | | | | #212055 svn path=/main/trunk/; revision=9407
* The ERROR color code is currently undefined, so make eerrorZac Medico2007-10-191-1/+1
| | | | | | use BAD like the bash version does. svn path=/main/trunk/; revision=8177
* Just use os.listdir() since portage.listdir() is unnecessary.Zac Medico2007-08-211-4/+6
| | | | svn path=/main/trunk/; revision=7651
* Remove more unnecessary list generation.Zac Medico2007-06-211-1/+1
| | | | svn path=/main/trunk/; revision=6913
* Enable elog functionality for the python side of portageMarius Mauch2007-05-181-0/+89
svn path=/main/trunk/; revision=6548