summaryrefslogtreecommitdiffstats
path: root/pym/portage/util/__init__.py
Commit message (Collapse)AuthorAgeFilesLines
* UseManager: /etc/portage/profile extended syntaxZac Medico2012-09-261-5/+11
| | | | | If /etc/portage/profile/eapi does not exist, then support extended atom syntax. This will fix bug #436330.
* find_updated_config_files: x var name collisionZac Medico2012-09-131-2/+2
| | | | This broke in commit 09de8dc47ec48af2276dfa098dd5e1d3d09ddbdd.
* Replace getstatusoutput with unicode safe Popen.Zac Medico2012-09-111-7/+14
| | | | This fixes potential issues similar to those reported in bug #310789.
* read_corresponding_eapi_file: cache resultsZac Medico2012-08-231-0/+7
|
* grabfile_package: show real file name in errorZac Medico2012-06-171-1/+1
|
* grablines: raise PermissionDenied if appropriateZac Medico2012-06-011-2/+13
|
* getconfig: only raise ParseErrorv2.2.0_alpha107Zac Medico2012-05-161-1/+1
|
* getconfig: use shlex.error_leader() moreZac Medico2012-05-151-22/+23
| | | | | This fixes it to show the correct file/line, even when one file sources another.
* Revert "Bug #413983: Add portage.util.urlopen(), which transparently handles ↵Zac Medico2012-05-131-19/+0
| | | | | | | authentication in the way compatible with Python 3." This reverts commit 0a9cc38a66ded0cf0e5b534cb24b970fc9c21920. As reported in bug #415579, that commit broke FTP authentication.
* Bug #413983: Add portage.util.urlopen(), which transparentlyArfrever Frehtes Taifersar Arahesis2012-05-011-1/+20
| | | | handles authentication in the way compatible with Python 3.
* varexpand: optimize access to current charv2.2.0_alpha97Zac Medico2012-03-311-19/+28
|
* getconfig: show error message for varexpand failZac Medico2012-03-311-2/+19
|
* varexpand: use frozenset for word charactersZac Medico2012-03-311-2/+3
|
* varexpand: use list for efficient appendZac Medico2012-03-311-13/+13
|
* varexpand: don't cache resultsZac Medico2012-03-271-13/+4
| | | | | Caching wasn't really necessary here, and it didn't properly account for input differences in the 'mydict' parameter.
* Replace @returns with @return.Zac Medico2012-03-271-1/+1
|
* grabdict: remove incorrect docstring, bug #409839Greg Turner2012-03-271-1/+0
|
* read_corresponding_eapi_file: unicode, bug 398587Zac Medico2012-01-111-1/+3
|
* getlibpaths: regex for includeZac Medico2012-01-031-2/+6
|
* Support include directives in ld.so.conf.Michał Górny2012-01-031-1/+12
|
* Use bytes instead of unicode with isinstance.Zac Medico2011-10-281-5/+6
| | | | | This is preferred since the bytes type is available in all supported python versions, while the unicode type is only available in python2.
* Fix grammar in some messages.Arfrever Frehtes Taifersar Arahesis2011-09-141-2/+2
|
* python3.2 fixes: ResourceWarning: unclosed fileZac Medico2011-08-241-4/+9
|
* Remove python-2.6 StringIO.StringIO fallback.Zac Medico2011-07-121-3/+3
| | | | | | | | Since the io module in python-2.6 was broken when threading was disabled, we needed to fall back from io.StringIO to StringIO.StringIO in this case (typically just for Gentoo's stage1 and stage2 tarballs). Now that python-2.7 is stable in stages and we rely on io.open() being available, we can also rely on io.StringIO being available.
* Migrate from codecs.open() to io.open().Zac Medico2011-07-101-7/+26
| | | | | | | | | | | | | | | | | 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.
* varexpand: remove escaped newline charactersZac Medico2011-07-011-2/+5
| | | | This fixes a regression reported in bug 365033, comment #14.
* Fix a typo in a comment.Zac Medico2011-06-301-1/+1
|
* Only create soname symlinks in global libdirs.Zac Medico2011-06-291-3/+4
| | | | | This prevents false positives for private libraries installed by pre-built packages under /opt.
* read_corresponding_eapi_file(): Strip final \n from EAPI value.Arfrever Frehtes Taifersar Arahesis2011-06-281-1/+1
|
* varexpand: handle backslashes like more like bashZac Medico2011-06-281-26/+13
| | | | | | | | | For backslash expansion, this function used to behave like echo -e, but that's not needed for our purposes. We want to behave like bash does when expanding a variable assignment in a sourced file, in which case it performs backslash removal for \\ and \$ but nothing more. This will fix bash compatibility for the case reported in bug #365033.
* Fix a typo and update a comment.Arfrever Frehtes Taifersar Arahesis2011-06-091-2/+2
|
* Move pickle import out of base portage module.Zac Medico2011-06-031-1/+1
|
* autounmask-write: force configpro if non-existentZac Medico2011-06-021-3/+6
| | | | | | We want to force new_protect_filename to ensure that the user will see all our changes via etc-update, even if file_to_write_to doesn't exist yet.
* writedict: use write_atomic for exceptionsZac Medico2011-05-241-14/+8
| | | | Also, fix calling code to handle InvalidLocation exceptions.
* writedict: raise any exceptionsZac Medico2011-05-241-2/+1
| | | | | We don't have any code that checks the writedict return value, so we'd better raise an exception if it fails.
* atomic_ofstream: suppress redundant open errorZac Medico2011-05-241-3/+3
|
* Update timestamps in headers of modified files.Zac Medico2011-03-141-1/+1
|
* grablines: allow inline commentsZac Medico2011-03-021-3/+13
|
* grabdict: allow inline commentsTheo Chatzimichos2011-03-021-0/+7
|
* apply_recursive_permissions: don't follow symlinkZac Medico2010-12-131-2/+7
| | | | | | | | | | | | | | | | | | | | This will fix the following error, reported in bug #339670: _ebuild_exit _post_phase_userpriv_perms(settings) File "/usr/lib64/portage/pym/portage/package/ebuild/doebuild.py", line 1207, in _post_phase_userpriv_perms filemode=0o60, filemask=0) File "/usr/lib64/portage/pym/portage/util/__init__.py", line 1018, in apply_recursive_permissions uid=uid, gid=gid, mode=filemode, mask=filemask) File "/usr/lib64/portage/pym/portage/util/__init__.py", line 1043, in apply_secpass_permissions stat_cached = os.stat(filename) File "/usr/lib64/portage/pym/portage/__init__.py", line 226, in __call__ rval = self._func(*wrapped_args, **wrapped_kwargs) OSError: [Errno 40] Too many levels of symbolic links: '/var/tmp/portage/dev-vcs/mercurial-1.7.2/temp/tests-2.7/child0/test-mq-symlinks.t/linka'
* stack_lists: optimize repo handling moreZac Medico2010-11-271-1/+8
|
* stack_lists: optimize repo logicZac Medico2010-11-261-1/+2
|
* grab*_package: optimize for non-existent filesZac Medico2010-11-241-0/+4
|
* Accept eapi argument in portage.util.grabdict_package() andArfrever Frehtes Taifersar Arahesis2010-11-061-7/+6
| | | | portage.util.grabfile_package().
* Optimize LazyItemsDict.__deepcopy__().v2.2.0_alpha3Zac Medico2010-10-311-2/+2
|
* Simplify LazyItemsDict.__deepcopy__().Zac Medico2010-10-311-7/+4
|
* Update docstring for LazyItemsDict.__deepcopy__()Zac Medico2010-10-301-17/+4
|
* Fix LazyItemsDict.__deepcopy__() for python 2.7.Zac Medico2010-10-291-9/+6
| | | | | | In python-2.7, changes in deepcopy() make LazyItemsDict.__deepcopy__() fail in some cases. Thanks to Diego E. Pettenò <flameeyes@g.o> for reporting.
* Improved profiles/p.mask handlingSebastian Luther2010-09-261-4/+31
| | | | It's now possible for an repo to revert masks from the master for its own packages.
* Fix a typo in a comment.Zac Medico2010-09-251-1/+1
|