aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Drop Python 2 compatibility in extension modulesMike Gilbert2020-12-242-18/+2
| | | | Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* file_copy: handle EOPNOTSUPP from copy_file_range (bug 641088)Zac Medico2017-12-151-1/+1
| | | | | | NFS can set the errno to EOPNOTSUPP for copy_file_range. Bug: https://bugs.gentoo.org/641088
* file_copy: handle EOPNOTSUPP from lseek SEEK_DATA (bug 641088)Zac Medico2017-12-151-1/+1
| | | | | | NFS can set the errno to EOPNOTSUPP for lseek SEEK_DATA. Bug: https://bugs.gentoo.org/641088
* file_copy: use sendfile return value to measure bytes copied (bug 635126)Zac Medico2017-10-271-40/+59
| | | | | | | | | | | | | | | | | The sendfile *offset parameter refers to the input file offest, so it cannot be used in the same way as the copy_file_range *off_out parameter. Therefore, add sf_wrapper function which implements the *off_out behavior for sendfile. Also update cfr_wrapper so that it does not rely on the fd_in file offset, and remove corresponding fd_in lseek calls which are no longer needed. The file offset of fd_in is now completely unused, except in the plain read/write loop, where lseek is called prior to entering the loop. Bug: https://bugs.gentoo.org/635126
* file_copy: fix lseek offset after EINTR (bug 618086)Zac Medico2017-05-141-5/+8
| | | | | | | | | | | | Fix the lseek offset for the plain read/write loop to account for buffered data that has not been written to to the output file yet (due to previous interruption by EINTR). This code only affects Linux 2.6.32 and earlier (newer kernels use copy_file_range or sendfile). X-Gentoo-bug: 618086 X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=618086 Acked-by: Brian Dolbec <dolsen@gentoo.org>
* file_copy: replace loff_t with off_t for portability (bug 617778)Zac Medico2017-05-091-3/+3
| | | | | | | | | | | | The loff_t type is a GNU extension, so use the portable off_t type instead. Also, enable Large File Support macros in setup.py, for 64-bit offsets. Reported-by: Patrick Steinhardt <ps@pks.im> X-Gentoo-bug: 617778 X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=617778 Acked-by: Anthony G. Basile <blueness@gentoo.org> Acked-by: Brian Dolbec <dolsen@gentoo.org>
* movefile: support in-kernel file copying on Linux (bug 607868)Zac Medico2017-03-151-0/+385
| | | | | | | | | | | | | | | | | | | Perform in-kernel file copying when possible, and also support reflinks and sparse files. If the optimized implementation fails at runtime, gracefully fallback to a plain read/write loop. Compile-time and run-time fallbacks are implemented, so that any incompatiblities will be handled gracefully. For example, if the code is compiled on a system that supports the copy_file_range syscall, but at run-time an older kernel that does not support this syscall is detected, it will be handled gracefully. There are similar fallbacks for lack of lseek SEEK_DATA and sendfile support. X-Gentoo-Bug: 607868 X-Gentoo-Bug-Url: https://bugs.gentoo.org/show_bug.cgi?id=607868 Acked-by: Brian Dolbec <dolsen@gentoo.org>
* pym/portage/util/locale.py: add a C module to help check localeAnthony G. Basile2016-09-141-0/+68
| | | | | | | | | | | | | | | | | | | | The current method to check for a sane system locale is to use python's ctypes.util.find_library() to construct a full library path to the system libc.so and pass that path to ctypes.CDLL() so we can call toupper() and tolower() directly. However, this gets bogged down in implementation details and fails with musl. We work around this design flaw in ctypes with a small python module written in C which provides thin wrappers to toupper() and tolower(), and only fall back on the current ctypes-based check when this module is not available. This has been tested on glibc, uClibc and musl systems. X-Gentoo-bug: 571444 X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=571444 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* Remove the python-missingos module since apparently nobody has neededZac Medico2010-08-226-188/+0
| | | | it for a long time.
* Remove the bsd-chflags module since it hasn't been used for some timeZac Medico2010-08-224-198/+0
| | | | | (python as read support and we spawn binaries for any necessary modifications).
* Remove unused tbz2tool.c file. The latest stable ebuild doesn'tZac Medico2010-08-221-227/+0
| | | | build/install it.
* Add back executable bits, accidentally removed in previous commit.Zac Medico2010-03-242-0/+0
|
* Remove all svn $Id keywords.Zac Medico2010-03-249-9/+0
|
* make elog mail module always set the 'From' header for rfc2822 complianceMarius Mauch2006-06-109-9/+9
| | | | svn path=/main/trunk/; revision=3483
* removing unused sandbox dirs.Brian Harring2005-10-0620-5993/+0
| | | | svn path=/main/branches/2.0/; revision=2116
* nuking this directory, since it's no longer used.Brian Harring2005-10-0610-2907/+0
| | | | svn path=/main/branches/2.0/; revision=2115
* Remove the specific dependency on python-2.2.Jason Stubbs2005-10-011-1/+1
| | | | svn path=/main/branches/2.0/; revision=2069
* header changes, $Header: -> $Id:Brian Harring2005-08-3037-37/+37
| | | | svn path=/main/branches/2.0/; revision=1951
* Migration (without history) of the current stable line to subversion.Jason Stubbs2005-08-2841-0/+9522
svn path=/main/branches/2.0/; revision=1941