Zac Medico [Fri, 14 Aug 2009 05:45:08 +0000 (05:45 -0000)]
Make _ensure_default_encoding() provide a fallback for the codec returned
by sys.getfilesystemencoding().
svn path=/main/trunk/; revision=14021
Zac Medico [Fri, 14 Aug 2009 05:30:38 +0000 (05:30 -0000)]
Use portage's selinux wrapper module for mkdir calls.
svn path=/main/trunk/; revision=14020
Zac Medico [Thu, 13 Aug 2009 22:17:05 +0000 (22:17 -0000)]
Create portage._merge_encoding and a corresponding _os_merge wrapper that
will later be used for all the merge code.
svn path=/main/trunk/; revision=14019
Zac Medico [Thu, 13 Aug 2009 21:33:21 +0000 (21:33 -0000)]
Add support for an 'encoding' parameter to _unicode_module_wrapper(). This
will allow creation of specialize wrappers for merge/unmerge, in case the
value of sys.getfilesystemencoding() is something other than utf_8.
svn path=/main/trunk/; revision=14018
Zac Medico [Thu, 13 Aug 2009 19:50:50 +0000 (19:50 -0000)]
Add support for unwrapped/overridden attributes in _unicode_module_wrapper().
svn path=/main/trunk/; revision=14017
Zac Medico [Thu, 13 Aug 2009 19:34:07 +0000 (19:34 -0000)]
Add py3k support to _unicode_decode().
svn path=/main/trunk/; revision=14016
Zac Medico [Thu, 13 Aug 2009 18:10:07 +0000 (18:10 -0000)]
Bug #281355 - Handle IndexError inside reconstruct_eclasses().
svn path=/main/trunk/; revision=14015
Zac Medico [Wed, 12 Aug 2009 09:04:48 +0000 (09:04 -0000)]
Set a limit of 30 backtracking attempts, since it's possible for it to
go out of control and take an unreasonable amount of time.
svn path=/main/trunk/; revision=14014
Zac Medico [Wed, 12 Aug 2009 08:48:19 +0000 (08:48 -0000)]
Use r'' for regex.
svn path=/main/trunk/; revision=14013
Zac Medico [Wed, 12 Aug 2009 08:45:43 +0000 (08:45 -0000)]
Bug #281133 - Fix the here-document code inside run_checks() to properly
detect the end of a here-document when it is indented by whitespace.
svn path=/main/trunk/; revision=14012
Zac Medico [Wed, 12 Aug 2009 07:57:27 +0000 (07:57 -0000)]
Use _unicode_encode() and _unicode_decode() where appropriate.
svn path=/main/trunk/; revision=14011
Zac Medico [Wed, 12 Aug 2009 07:31:31 +0000 (07:31 -0000)]
Call _ensure_default_encoding() ASAP since writemsg() might not work without
it.
svn path=/main/trunk/; revision=14010
Zac Medico [Wed, 12 Aug 2009 07:28:03 +0000 (07:28 -0000)]
Use _unicode_encode() where appropriate.
svn path=/main/trunk/; revision=14009
Zac Medico [Wed, 12 Aug 2009 07:15:44 +0000 (07:15 -0000)]
Use a single sys.hexversion conditional for both _unicode_func_wrapper()
and _unicode_module_wrapper().
svn path=/main/trunk/; revision=14008
Zac Medico [Wed, 12 Aug 2009 00:54:03 +0000 (00:54 -0000)]
Update imports to import portage.os (with unicode wrappers), and use
_unicode_encode() and _unicode_decode() where appropriate.
svn path=/main/trunk/; revision=14007
Zac Medico [Wed, 12 Aug 2009 00:26:26 +0000 (00:26 -0000)]
Implement ObjectProxy.__int__().
svn path=/main/trunk/; revision=14006
Zac Medico [Wed, 12 Aug 2009 00:19:32 +0000 (00:19 -0000)]
Show a traceback when spawn() fails.
svn path=/main/trunk/; revision=14005
Zac Medico [Tue, 11 Aug 2009 23:59:41 +0000 (23:59 -0000)]
Update imports to import portage.os (with unicode wrappers), and use
_unicode_encode() and _unicode_decode() where appropriate.
svn path=/main/trunk/; revision=14004
Zac Medico [Tue, 11 Aug 2009 23:43:10 +0000 (23:43 -0000)]
Update imports to import portage.os (with unicode wrappers), and use
_unicode_encode() and _unicode_decode() where appropriate.
svn path=/main/trunk/; revision=14003
Zac Medico [Tue, 11 Aug 2009 23:00:42 +0000 (23:00 -0000)]
Update imports to import portage.os (with unicode wrappers), and use
_unicode_encode() and _unicode_decode() where appropriate.
svn path=/main/trunk/; revision=14002
Zac Medico [Tue, 11 Aug 2009 22:05:11 +0000 (22:05 -0000)]
Wrap portage.data.lchown() for unicode support in python-2.x.
svn path=/main/trunk/; revision=14001
Zac Medico [Tue, 11 Aug 2009 21:40:46 +0000 (21:40 -0000)]
Filter ACCEPT_PROPERTIES from the ebuild environment, since unlike
ACCEPT_LICENSE (used by check_license in eutils.eclass), ACCEPT_PROPERTIES
should never be needed in the ebuild environment.
svn path=/main/trunk/; revision=14000
Zac Medico [Tue, 11 Aug 2009 21:30:36 +0000 (21:30 -0000)]
Update imports to import portage.os (with unicode wrappers), and use
_unicode_encode() and _unicode_decode() where appropriate.
svn path=/main/trunk/; revision=13999
Zac Medico [Tue, 11 Aug 2009 20:54:12 +0000 (20:54 -0000)]
Temporarily delete the os and shutil imports, to ensure that only the
wrapped versions are imported by portage internals.
svn path=/main/trunk/; revision=13998
Mounir Lamouri [Tue, 11 Aug 2009 20:45:35 +0000 (20:45 -0000)]
Add ACCEPT_PROPERTIES variable which has default value * and can be set in
make.conf or /etc/portage/package.properties.
If ACCEPT_PROPERTIES doesn't match ebuild PROPERTIES, the ebuild is masked.
svn path=/main/trunk/; revision=13997
Zac Medico [Tue, 11 Aug 2009 20:28:23 +0000 (20:28 -0000)]
Update imports to import portage.os and portage.shutil (with unicode
wrappers), and use _unicode_encode() where appropriate.
svn path=/main/trunk/; revision=13996
Zac Medico [Tue, 11 Aug 2009 08:32:14 +0000 (08:32 -0000)]
Update imports to import portage.os (with unicode wrappers), and use
_unicode_encode() and _unicode_decode() where appropriate.
svn path=/main/trunk/; revision=13995
Zac Medico [Tue, 11 Aug 2009 08:07:04 +0000 (08:07 -0000)]
Update imports to import portage.os (with unicode wrappers), and use
_unicode_encode() and _unicode_decode() where appropriate.
svn path=/main/trunk/; revision=13994
Zac Medico [Tue, 11 Aug 2009 07:47:27 +0000 (07:47 -0000)]
Update imports to import portage.os (with unicode wrappers), and use
_unicode_encode() and _unicode_decode() where appropriate.
svn path=/main/trunk/; revision=13993
Zac Medico [Tue, 11 Aug 2009 07:03:04 +0000 (07:03 -0000)]
Avoid using the wrapped os.read(), in order to avoid differing behavior
between python-2.x (with wrapper) and py3k (without wrapper). This sort
of mismatch only applies to os functions that return raw bytes under py3k,
rather than unicode.
svn path=/main/trunk/; revision=13992
Zac Medico [Tue, 11 Aug 2009 01:41:04 +0000 (01:41 -0000)]
Fix breakage from previous commit.
svn path=/main/trunk/; revision=13991
Zac Medico [Tue, 11 Aug 2009 01:38:07 +0000 (01:38 -0000)]
Fix unicode support for compatibility with the new wrapped os module, and
use _unicode_decode() and _unicode_encode() where appropriate.
svn path=/main/trunk/; revision=13990
Zac Medico [Mon, 10 Aug 2009 22:54:01 +0000 (22:54 -0000)]
Bug #280460 - Wrap portage.os with unicode encode/decode wrappers.
svn path=/main/trunk/; revision=13989
Zac Medico [Mon, 10 Aug 2009 22:28:00 +0000 (22:28 -0000)]
This is an unused commandline interface to xpak.xpak().
svn path=/main/trunk/; revision=13988
Zac Medico [Mon, 10 Aug 2009 22:24:37 +0000 (22:24 -0000)]
Add portage ImportError sys.path insertion.
svn path=/main/trunk/; revision=13987
Zac Medico [Mon, 10 Aug 2009 22:20:40 +0000 (22:20 -0000)]
This is an uneeded script for parsing ldd output.
svn path=/main/trunk/; revision=13986
Zac Medico [Mon, 10 Aug 2009 22:17:47 +0000 (22:17 -0000)]
This definitely obsolete.
svn path=/main/trunk/; revision=13985
Zac Medico [Mon, 10 Aug 2009 22:15:44 +0000 (22:15 -0000)]
This is an obsolete shell script for applying package moves vardb entry.
svn path=/main/trunk/; revision=13984
Zac Medico [Mon, 10 Aug 2009 22:11:57 +0000 (22:11 -0000)]
This script is obsolete since manifest 2.
svn path=/main/trunk/; revision=13983
Zac Medico [Mon, 10 Aug 2009 22:05:36 +0000 (22:05 -0000)]
This old script does checksums on installed files. People use equery for this
now.
svn path=/main/trunk/; revision=13982
Zac Medico [Mon, 10 Aug 2009 21:56:23 +0000 (21:56 -0000)]
This is a commandline interface to pkgsplit() that probably isn't used by
anyone. We can add a function like this to portageq.
svn path=/main/trunk/; revision=13981
Zac Medico [Mon, 10 Aug 2009 21:54:48 +0000 (21:54 -0000)]
This is an old emerge profiling script that probably doesn't work.
svn path=/main/trunk/; revision=13980
Zac Medico [Mon, 10 Aug 2009 21:47:30 +0000 (21:47 -0000)]
Add portage ImportError sys.path insertion.
svn path=/main/trunk/; revision=13979
Zac Medico [Mon, 10 Aug 2009 21:28:04 +0000 (21:28 -0000)]
Bug #280460 - Wrap os and os.path modules with unicode encode/decode
wrappers for python-2.x.
svn path=/main/trunk/; revision=13978
Zac Medico [Mon, 10 Aug 2009 17:33:00 +0000 (17:33 -0000)]
Bug #280998 - Misc selinux fixes. Thanks to Chris PeBenito
<pebenito@gentoo.org> for this patch.
svn path=/main/trunk/; revision=13977
Zac Medico [Mon, 10 Aug 2009 08:15:05 +0000 (08:15 -0000)]
Open new items in text mode (unicode), and safely handle unicode in news item
names.
svn path=/main/trunk/; revision=13975
Zac Medico [Mon, 10 Aug 2009 07:12:28 +0000 (07:12 -0000)]
Bug #280962 - Fix broken path normalization inside
StaticFileSet.multiBuilder().
svn path=/main/trunk/; revision=13974
Zac Medico [Mon, 10 Aug 2009 07:03:10 +0000 (07:03 -0000)]
Use writemsg_stdout() for safe unicode output of --list-sets.
svn path=/main/trunk/; revision=13973
Zac Medico [Mon, 10 Aug 2009 03:00:09 +0000 (03:00 -0000)]
Fix PreservedLibsRegistry.pruneNonExisting() to work with $ROOT.
svn path=/main/trunk/; revision=13972
Zac Medico [Mon, 10 Aug 2009 02:53:48 +0000 (02:53 -0000)]
Don't trigger the --root-deps code for removal actions such as --prune and
--depclean.
svn path=/main/trunk/; revision=13971
Zac Medico [Mon, 10 Aug 2009 02:45:31 +0000 (02:45 -0000)]
In calc_depclean(), sort packages that are displayed due to being pulled
in by link level dependencies.
svn path=/main/trunk/; revision=13970
Zac Medico [Mon, 10 Aug 2009 02:38:02 +0000 (02:38 -0000)]
Tweak $ROOT handling inside depgraph._add_pkg_deps() for removal actions,
so --with-bdeps works correctly with --depclean and --prune.
svn path=/main/trunk/; revision=13969
Zac Medico [Mon, 10 Aug 2009 02:31:51 +0000 (02:31 -0000)]
Inside calc_depclean(), use LinkageMap.findConsumers() for checking
intersection of files being removed with providers in the LinkageMap (a
KeyError is raised when there is no intersection).
svn path=/main/trunk/; revision=13968
Zac Medico [Sun, 9 Aug 2009 23:17:23 +0000 (23:17 -0000)]
Remove unused import.
svn path=/main/trunk/; revision=13966
Zac Medico [Sun, 9 Aug 2009 23:16:50 +0000 (23:16 -0000)]
Make everything safe for unicode (this should fix the elog modules that
send mail).
svn path=/main/trunk/; revision=13965
Zac Medico [Sun, 9 Aug 2009 22:54:00 +0000 (22:54 -0000)]
Fix EOutput to safely write unicode to stderr/stdout. Thanks to Arfrever for
reporting.
svn path=/main/trunk/; revision=13964
Zac Medico [Sun, 9 Aug 2009 22:31:01 +0000 (22:31 -0000)]
Fix typo in comment. Thanks to Arfrever.
svn path=/main/trunk/; revision=13963
Zac Medico [Sun, 9 Aug 2009 22:29:55 +0000 (22:29 -0000)]
Encode unicode messages as bytes in order to avoid TypeError from
syslog.syslog() with python-2.x.
svn path=/main/trunk/; revision=13962
Zac Medico [Sun, 9 Aug 2009 22:05:24 +0000 (22:05 -0000)]
Write log files in text mode (unicode). Thanks to Arfrever for reporting.
svn path=/main/trunk/; revision=13961
Zac Medico [Sun, 9 Aug 2009 21:43:28 +0000 (21:43 -0000)]
Always use encoding='utf_8' for unicode() calls.
svn path=/main/trunk/; revision=13960
Zac Medico [Sun, 9 Aug 2009 20:42:11 +0000 (20:42 -0000)]
Bug #280690 - Fix incorrect idendification of start quote as end quote when
the start quote is immediately followed by a newline.
svn path=/main/trunk/; revision=13959
Zac Medico [Sun, 9 Aug 2009 19:49:00 +0000 (19:49 -0000)]
Inside collect_ebuild_messages(), open elog files in text mode (unicode).
Thanks to jlec for reporting.
svn path=/main/trunk/; revision=13958
Zac Medico [Sat, 8 Aug 2009 23:17:45 +0000 (23:17 -0000)]
Convert scanelf output to unicode inside LinkageMap.rebuild().
svn path=/main/trunk/; revision=13957
Zac Medico [Sat, 8 Aug 2009 22:32:42 +0000 (22:32 -0000)]
Use writemsg_stdout() for safe display of unicode overlay paths.
svn path=/main/trunk/; revision=13956
Zac Medico [Sat, 8 Aug 2009 22:24:27 +0000 (22:24 -0000)]
Use writemsg_stdout() for safe unicode output.
svn path=/main/trunk/; revision=13955
Zac Medico [Sat, 8 Aug 2009 22:06:14 +0000 (22:06 -0000)]
Add missing noiselevel argument in writemsg_stdout() calls.
svn path=/main/trunk/; revision=13954
Zac Medico [Sat, 8 Aug 2009 22:03:54 +0000 (22:03 -0000)]
Use writemsg_stdout() for safe unicode output.
svn path=/main/trunk/; revision=13953
Zac Medico [Sat, 8 Aug 2009 21:45:57 +0000 (21:45 -0000)]
Move global portage import to the top and add writemsg and
writemsg_stdout imports for safe unicode output.
svn path=/main/trunk/; revision=13952
Zac Medico [Sat, 8 Aug 2009 21:34:52 +0000 (21:34 -0000)]
Simplify command introspection inside usage().
svn path=/main/trunk/; revision=13951
Zac Medico [Sat, 8 Aug 2009 21:18:15 +0000 (21:18 -0000)]
In Task.__str__(), emulate tuple.__str__, but don't show 'foo' as u'foo' for
unicode strings.
svn path=/main/trunk/; revision=13950
Zac Medico [Sat, 8 Aug 2009 19:24:56 +0000 (19:24 -0000)]
Account for hardlinks when computing SIZE metadata.
svn path=/main/trunk/; revision=13949
Zac Medico [Fri, 7 Aug 2009 22:37:44 +0000 (22:37 -0000)]
Use writemsg_stdout() for safe unicode output.
svn path=/main/trunk/; revision=13948
Zac Medico [Fri, 7 Aug 2009 21:03:11 +0000 (21:03 -0000)]
Open repo_name in text mode (unicode).
svn path=/main/trunk/; revision=13947
Zac Medico [Fri, 7 Aug 2009 08:47:47 +0000 (08:47 -0000)]
In config.__setitem__(), convert keys/values to unicode in order to avoid
potential UnicodeDecodeError exceptions later.
svn path=/main/trunk/; revision=13946
Zac Medico [Fri, 7 Aug 2009 08:31:39 +0000 (08:31 -0000)]
Convert environment variables to unicode inside the config constructor, in
order to avoid potential UnicodeDecodeError exceptions later.
svn path=/main/trunk/; revision=13945
Zac Medico [Fri, 7 Aug 2009 08:21:56 +0000 (08:21 -0000)]
Make spawn decode unicode in order to avoid a potential UnicodeEncodeError
from os.execve().
svn path=/main/trunk/; revision=13944
Zac Medico [Thu, 6 Aug 2009 22:44:45 +0000 (22:44 -0000)]
In getconfig(), specify utf_8 encoding for py3k.
svn path=/main/trunk/; revision=13943
Zac Medico [Thu, 6 Aug 2009 22:39:16 +0000 (22:39 -0000)]
In shlex_split(), don't encode unicode for py3k. Thanks to Arfrever.
svn path=/main/trunk/; revision=13942
Zac Medico [Thu, 6 Aug 2009 21:58:41 +0000 (21:58 -0000)]
Make getconfig() return unicode type and remove corresponding env_update()
workaround from bug #280460.
svn path=/main/trunk/; revision=13941
Zac Medico [Thu, 6 Aug 2009 21:57:31 +0000 (21:57 -0000)]
Fix filter_loglevels() and filter_phases() to work with unicode.
svn path=/main/trunk/; revision=13940
Zac Medico [Thu, 6 Aug 2009 21:47:56 +0000 (21:47 -0000)]
Add a new portage.util.shlex_split() function to wrap all shlex.split() calls,
since shlex.split() doesn't behave well with unicode strings.
svn path=/main/trunk/; revision=13939
Zac Medico [Thu, 6 Aug 2009 20:57:08 +0000 (20:57 -0000)]
Filter PORTAGE_NONFATAL from the environment where appropriate.
svn path=/main/trunk/; revision=13938
Zac Medico [Thu, 6 Aug 2009 20:54:53 +0000 (20:54 -0000)]
Bug #280521 - Update selinux support to use the libselinux swig wrapper api
instead of python-selinux. Thanks to Chris PeBenito <pebenito@gentoo.org>
for the initial patch which I've tweaked with whitespace changes and
unicode support.
svn path=/main/trunk/; revision=13937
Arfrever Frehtes Taifersar Arahesis [Thu, 6 Aug 2009 20:48:05 +0000 (20:48 -0000)]
Implement nonfatal().
svn path=/main/trunk/; revision=13936
Zac Medico [Thu, 6 Aug 2009 19:26:48 +0000 (19:26 -0000)]
Bug #277537 - Synchronize order of PATH elements with the order defined by
/etc/profile (promote paths under /usr to the front). Thanks to Michał Górny
<gentoo@mgorny.alt.pl>.
svn path=/main/trunk/; revision=13935
Zac Medico [Thu, 6 Aug 2009 19:06:12 +0000 (19:06 -0000)]
Bug #277544 - Add missing -c switch in bzip2 arguments. Thanks to Michał Górny
<gentoo@mgorny.alt.pl> for the patch.
svn path=/main/trunk/; revision=13934
Zac Medico [Thu, 6 Aug 2009 18:55:44 +0000 (18:55 -0000)]
Inside _post_src_install_uid_fix() (since we're already walking the files
here), compute total size of installed files and save it as SIZE in the vardb.
This will be useful for the packagekit backend.
svn path=/main/trunk/; revision=13933
Zac Medico [Thu, 6 Aug 2009 09:27:54 +0000 (09:27 -0000)]
Convert unicode if necessary before writing to stdout.
svn path=/main/trunk/; revision=13932
Zac Medico [Thu, 6 Aug 2009 09:18:49 +0000 (09:18 -0000)]
Add unicode conversions in various logging code.
svn path=/main/trunk/; revision=13931
Zac Medico [Thu, 6 Aug 2009 08:25:23 +0000 (08:25 -0000)]
Convert paths to unicode when working with CONTENTS.
svn path=/main/trunk/; revision=13930
Zac Medico [Thu, 6 Aug 2009 07:00:36 +0000 (07:00 -0000)]
Fix broken os.walk call in _post_src_install_uid_fix().
svn path=/main/trunk/; revision=13929
Zac Medico [Thu, 6 Aug 2009 05:47:03 +0000 (05:47 -0000)]
Use realpath to resolve __file__ when searching for test inside main().
svn path=/main/trunk/; revision=13928
Zac Medico [Thu, 6 Aug 2009 05:37:52 +0000 (05:37 -0000)]
Remove odd os.getcwd() call used inside main() when searching for tests.
svn path=/main/trunk/; revision=13927
Zac Medico [Thu, 6 Aug 2009 05:35:14 +0000 (05:35 -0000)]
Do not pass unicode strings into os.walk calls, since it can cause
internal os.path.join calls to raise UnicodeDecodeError.
svn path=/main/trunk/; revision=13926
Zac Medico [Thu, 6 Aug 2009 01:05:43 +0000 (01:05 -0000)]
Fix transposition of CodecInfo streamreader and streamwriter attributes
inside _gen_missing_encodings(). This solves 'TypeError: an integer is
required' exceptions from codecs.open().readlines([sizehint]), triggered
when python is built with USE=build (stage 1). Thanks to Daniel Robbins
for reporting.
svn path=/main/trunk/; revision=13925
Zac Medico [Wed, 5 Aug 2009 18:46:46 +0000 (18:46 -0000)]
Fix UnicodeEncodeError in vardbapi._owners_cache._hash_str(), reported by
jlec on irc.
svn path=/main/trunk/; revision=13924
Zac Medico [Wed, 5 Aug 2009 18:07:45 +0000 (18:07 -0000)]
Bug #280460 - Fix UnicodeDecodeError in env_update() due to non-unicode
strings from getconfig(). TODO: Make getconfig() return unicode.
svn path=/main/trunk/; revision=13921
Fabian Groffen [Wed, 5 Aug 2009 17:43:10 +0000 (17:43 -0000)]
correct pointer, as pointed out by darkside in IRC
svn path=/main/trunk/; revision=13920
Zac Medico [Wed, 5 Aug 2009 04:59:10 +0000 (04:59 -0000)]
Fix insert_optional_args() to properly handle thinks like -Dk which require
multiple substitutions of default arguments.
svn path=/main/trunk/; revision=13919
Zac Medico [Wed, 5 Aug 2009 00:35:11 +0000 (00:35 -0000)]
s/utf8/utf_8/ for consistency
svn path=/main/trunk/; revision=13917