summaryrefslogtreecommitdiffstats
path: root/pym/portage/elog/mod_save.py
Commit message (Collapse)AuthorAgeFilesLines
* elog/mod_save: wrap IOException for bug #441948Zac Medico2012-11-131-6/+18
|
* elog/mod_save: join /var/log with os.sep tooZac Medico2011-09-031-1/+2
|
* elog/mod_save: join /var/log with EPREFIXZac Medico2011-09-031-1/+1
|
* Fix log uid for logrotate-3.8 compat (bug 378451)Zac Medico2011-08-121-2/+23
| | | | | | | | | | | 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-111-2/+4
| | | | | These permissions should be compatible with our default logrotate config as discussed in bug 374287.
* elog/mod_save: ensure parent logdir existsZac Medico2011-07-111-1/+8
|
* elog/mod_save: use _ensure_log_subdirsZac Medico2011-07-111-11/+10
| | | | | This fixes permission issues with category subdirectories created for FEATURES=split-elog.
* Migrate from codecs.open() to io.open().Zac Medico2011-07-101-4/+4
| | | | | | | | | | | | | | | | | 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.
* Remove all svn $Id keywords.Zac Medico2010-03-241-1/+0
|
* 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
* Update syntax of numbers for compatibility with Python 3.Arfrever Frehtes Taifersar Arahesis2009-09-201-1/+1
| | | | | | (2to3-3.1 -f numliterals -nw ${FILES}) svn path=/main/trunk/; revision=14292
* Use _unicode_decode() on the string returned from time.strftime(), in orderZac Medico2009-09-051-1/+4
| | | | | | | to avoid a potential UnicodeDecodeError later. Thanks to Markus Duft <mduft@gentoo.org> for reporting. svn path=/main/trunk/; revision=14201
* Use _encodings where appropriate and add _encodings['stdio'] for stdoutZac Medico2009-08-211-2/+5
| | | | | | encoding. svn path=/main/trunk/; revision=14111
* Update imports to import portage.os (with unicode wrappers).Zac Medico2009-08-141-1/+2
| | | | svn path=/main/trunk/; revision=14051
* Write log files in text mode (unicode). Thanks to Arfrever for reporting.Zac Medico2009-08-091-1/+3
| | | | svn path=/main/trunk/; revision=13961
* Use ensure_dirs() and apply_permissions() to avoid redundant chown/chmod ↵Zac Medico2007-09-161-4/+2
| | | | | | calls. This helps avoid 'Permission denied' errors during elog_process() when the ebuild command is run by normal user (issue reported by graaff). svn path=/main/trunk/; revision=7789
* Enable elog functionality for the python side of portageMarius Mauch2007-05-181-3/+3
| | | | svn path=/main/trunk/; revision=6548
* - add new echo module for people who don't want any real loggingMarius Mauch2007-04-301-0/+5
| | | | | | | | - add copyright header in elog modules and enable keyword substitution - enable save_summary and echo modules in make.globals svn path=/main/trunk/; revision=6458
* Make subpackage naming consistentMarius Mauch2007-02-111-0/+21
svn path=/main/trunk/; revision=5955