portage.git
14 years agoFix it so an empty directory given to doins -r does not trigger failure.
Zac Medico [Wed, 6 Jan 2010 16:06:35 +0000 (16:06 -0000)]
Fix it so an empty directory given to doins -r does not trigger failure.

svn path=/main/trunk/; revision=15172

14 years agoIn python-2.x, convert PortageException.value attribute from unicode to str
Zac Medico [Tue, 5 Jan 2010 19:15:39 +0000 (19:15 -0000)]
In python-2.x, convert PortageException.value attribute from unicode to str
in order to avoid empty output with string format operator.

svn path=/main/trunk/; revision=15169

14 years agoHandle AttributeError inside atomic_ofstream.__del__. Thanks to Cardoe for
Zac Medico [Tue, 5 Jan 2010 19:02:44 +0000 (19:02 -0000)]
Handle AttributeError inside atomic_ofstream.__del__. Thanks to Cardoe for
reporting.

svn path=/main/trunk/; revision=15168

14 years agoRearrange _selinux ImportError handling so the workaround for bug #298310
Zac Medico [Tue, 5 Jan 2010 16:01:36 +0000 (16:01 -0000)]
Rearrange _selinux ImportError handling so the workaround for bug #298310
isn't necessary.

svn path=/main/trunk/; revision=15167

14 years agoRevert r15161 so 12.2.5 is greater than 12.2b once again. Depending on how you
Zac Medico [Mon, 4 Jan 2010 21:30:22 +0000 (21:30 -0000)]
Revert r15161 so 12.2.5 is greater than 12.2b once again. Depending on how you
look at, it may seem counter-intuitive. However, if you really think about it,
it seems like it's probably safe to assume that 12.2.5 > 12.2b is the behavior
that is intended by anyone who would use versions such as these.

svn path=/main/trunk/; revision=15166

14 years agoMore cases.
Zac Medico [Mon, 4 Jan 2010 21:05:46 +0000 (21:05 -0000)]
More cases.

svn path=/main/trunk/; revision=15165

14 years agoAdd some more cases for versions with letter suffixes.
Zac Medico [Mon, 4 Jan 2010 20:47:35 +0000 (20:47 -0000)]
Add some more cases for versions with letter suffixes.

svn path=/main/trunk/; revision=15164

14 years agoAdd test cases for cvs versions.
Zac Medico [Mon, 4 Jan 2010 20:09:16 +0000 (20:09 -0000)]
Add test cases for cvs versions.

svn path=/main/trunk/; revision=15163

14 years agoFix vercmp so 1b > 1 and add corresponding tests.
Zac Medico [Mon, 4 Jan 2010 19:58:13 +0000 (19:58 -0000)]
Fix vercmp so 1b > 1 and add corresponding tests.

svn path=/main/trunk/; revision=15162

14 years agoRevert vercmp() behavior so 12.2b > 12.2.5 which was accidentally changed in
Zac Medico [Mon, 4 Jan 2010 19:44:20 +0000 (19:44 -0000)]
Revert vercmp() behavior so 12.2b > 12.2.5 which was accidentally changed in
r2309 (between portage-2.0.x and portage-2.1). Thanks to Brian Harring for
reporting in bug #287848, comment #3.

svn path=/main/trunk/; revision=15161

14 years agoAdd test cases for implicit .0 at end of version.
Zac Medico [Mon, 4 Jan 2010 19:28:09 +0000 (19:28 -0000)]
Add test cases for implicit .0 at end of version.

svn path=/main/trunk/; revision=15160

14 years agoBug #298310 - Make sure the _selinux attribute is correctly reinitialized after
Zac Medico [Mon, 4 Jan 2010 18:38:48 +0000 (18:38 -0000)]
Bug #298310 - Make sure the _selinux attribute is correctly reinitialized after
reload(portage) is called.

svn path=/main/trunk/; revision=15159

14 years agoBug #299248 - Fix doins return code handling to make sure it always fails
Zac Medico [Mon, 4 Jan 2010 17:00:27 +0000 (17:00 -0000)]
Bug #299248 - Fix doins return code handling to make sure it always fails
when appropriate. Thanks to Jonathan Callen <abcd@g.o> for the initial
patch.

svn path=/main/trunk/; revision=15158

14 years agoDocument doins -r option.
Zac Medico [Mon, 4 Jan 2010 16:29:02 +0000 (16:29 -0000)]
Document doins -r option.

svn path=/main/trunk/; revision=15157

14 years agoUse get_term_size() to adjust to current terminal width. Thanks to Dror Levin
Zac Medico [Sat, 2 Jan 2010 21:10:05 +0000 (21:10 -0000)]
Use get_term_size() to adjust to current terminal width. Thanks to Dror Levin
<spatz@g.0> for the initial patch.

svn path=/main/trunk/; revision=15156

14 years agoAdd some tests related to bug #287848.
Zac Medico [Wed, 30 Dec 2009 07:15:04 +0000 (07:15 -0000)]
Add some tests related to bug #287848.

svn path=/main/trunk/; revision=15155

15 years agoBug #297364 - Only set EAPI conditional PATH once after sourcing the ebuild v2.2_rc61
Zac Medico [Thu, 24 Dec 2009 05:31:22 +0000 (05:31 -0000)]
Bug #297364 - Only set EAPI conditional PATH once after sourcing the ebuild
(when the EAPI is first known) rather than for each phase.

svn path=/main/trunk/; revision=15149

15 years agoRemove stray echo.
Zac Medico [Thu, 24 Dec 2009 05:21:43 +0000 (05:21 -0000)]
Remove stray echo.

svn path=/main/trunk/; revision=15147

15 years agoIn save_ebuild_env(), preserve all ebuild phases in any case since excluding
Zac Medico [Thu, 24 Dec 2009 05:11:21 +0000 (05:11 -0000)]
In save_ebuild_env(), preserve all ebuild phases in any case since excluding
the already executed ones from environment.bz2 doesn't save much space, and
it's possible that someone would want to look at them later.

svn path=/main/trunk/; revision=15145

15 years agoRemove obsolete backing up of ROOTPATH via PORTAGE_ROOTPATH.
Zac Medico [Thu, 24 Dec 2009 04:39:45 +0000 (04:39 -0000)]
Remove obsolete backing up of ROOTPATH via PORTAGE_ROOTPATH.

svn path=/main/trunk/; revision=15143

15 years agoBug #297933: Filter BASHOPTS variable for compatibility with bash-4.1.
Arfrever Frehtes Taifersar Arahesis [Tue, 22 Dec 2009 20:05:56 +0000 (20:05 -0000)]
Bug #297933: Filter BASHOPTS variable for compatibility with bash-4.1.

svn path=/main/trunk/; revision=15130

15 years agoIf the TERM environment variable is unset then just use internal default
Zac Medico [Mon, 21 Dec 2009 22:54:54 +0000 (22:54 -0000)]
If the TERM environment variable is unset then just use internal default
term codes since the vt100 codes typically produce strange output. This
fixes strange output from catalyst stage1 builds.

svn path=/main/trunk/; revision=15129

15 years agoBug #297541 - Make $(no-as-needed) trigger upstream.workaround warning. Thanks
Zac Medico [Mon, 21 Dec 2009 05:15:28 +0000 (05:15 -0000)]
Bug #297541 - Make $(no-as-needed) trigger upstream.workaround warning. Thanks
to Samuli Suominen <ssuominen@g.o> for this patch.

svn path=/main/trunk/; revision=15128

15 years agoAdd missing stat import.
Zac Medico [Mon, 21 Dec 2009 03:13:04 +0000 (03:13 -0000)]
Add missing stat import.

svn path=/main/trunk/; revision=15127

15 years agoWhen integer mtime is desired, use stat_obj[stat.ST_MTIME] instead of the
Zac Medico [Mon, 21 Dec 2009 03:05:41 +0000 (03:05 -0000)]
When integer mtime is desired, use stat_obj[stat.ST_MTIME] instead of the
float st_mtime in order to avoid rounding *up* in some rare cases.

svn path=/main/trunk/; revision=15126

15 years agoWhen integer mtime is desired, use stat_obj[stat.ST_MTIME] instead of the
Zac Medico [Mon, 21 Dec 2009 03:03:51 +0000 (03:03 -0000)]
When integer mtime is desired, use stat_obj[stat.ST_MTIME] instead of the
float st_mtime in order to avoid rounding *up* in some rare cases.

svn path=/main/trunk/; revision=15125

15 years agoRemove some old debug code that should not have been committed.
Zac Medico [Mon, 21 Dec 2009 02:45:33 +0000 (02:45 -0000)]
Remove some old debug code that should not have been committed.

svn path=/main/trunk/; revision=15124

15 years agoFix the assert alias to avoid 'value to great for base' messages in some cases.
Zac Medico [Sat, 19 Dec 2009 04:18:38 +0000 (04:18 -0000)]
Fix the assert alias to avoid 'value to great for base' messages in some cases.
Thanks to Jonathan Callen <abcd@g.o> for reporting.

svn path=/main/trunk/; revision=15121

15 years agoRevert previous commit because it's no comptible (doesn't pass arguments to
Zac Medico [Sat, 19 Dec 2009 03:59:06 +0000 (03:59 -0000)]
Revert previous commit because it's no comptible (doesn't pass arguments to
die).

svn path=/main/trunk/; revision=15120

15 years agoFix the assert alias to 'value to great for base' messages in some cases.
Zac Medico [Sat, 19 Dec 2009 03:22:20 +0000 (03:22 -0000)]
Fix the assert alias to 'value to great for base' messages in some cases.
Thanks to Jonathan Callen <abcd@g.o> for reporting.

svn path=/main/trunk/; revision=15119

15 years agoUse portage.writemsg for lazy portage.util import. v2.2_rc60
Zac Medico [Thu, 17 Dec 2009 03:36:05 +0000 (03:36 -0000)]
Use portage.writemsg for lazy portage.util import.

svn path=/main/trunk/; revision=15108

15 years agoConvert bytes to unicode for exception messages.
Zac Medico [Thu, 17 Dec 2009 03:30:22 +0000 (03:30 -0000)]
Convert bytes to unicode for exception messages.

svn path=/main/trunk/; revision=15106

15 years agoBug #286497 - Make setexec() warn/nonfatal in permissive mode. Thanks to
Zac Medico [Thu, 17 Dec 2009 02:20:58 +0000 (02:20 -0000)]
Bug #286497 - Make setexec() warn/nonfatal in permissive mode. Thanks to
Chris PeBenito <pebenito@gentoo.org> for this patch.

svn path=/main/trunk/; revision=15100

15 years agoFix typo.
Arfrever Frehtes Taifersar Arahesis [Wed, 16 Dec 2009 18:37:12 +0000 (18:37 -0000)]
Fix typo.

svn path=/main/trunk/; revision=15099

15 years agoBug #296710 - Add equery to QA_INTERCEPTORS since it can trigger a fork bomb.
Zac Medico [Wed, 16 Dec 2009 10:30:32 +0000 (10:30 -0000)]
Bug #296710 - Add equery to QA_INTERCEPTORS since it can trigger a fork bomb.

svn path=/main/trunk/; revision=15098

15 years agoWarn if /proc is not mounted.
Zac Medico [Wed, 16 Dec 2009 10:18:21 +0000 (10:18 -0000)]
Warn if /proc is not mounted.

svn path=/main/trunk/; revision=15097

15 years agoBug #296870 - Allow locale related LANG and LC_* variables to persist between
Zac Medico [Wed, 16 Dec 2009 10:01:10 +0000 (10:01 -0000)]
Bug #296870 - Allow locale related LANG and LC_* variables to persist between
ebuild phases, and only filter them for binary and installed packages.

svn path=/main/trunk/; revision=15096

15 years agoCombine 2 shift calls into one. v2.2_rc59
Zac Medico [Sun, 13 Dec 2009 03:28:05 +0000 (03:28 -0000)]
Combine 2 shift calls into one.

svn path=/main/trunk/; revision=15059

15 years agoBug #296554 - Add decompression support to ecompress (similar to ecompressdir
Zac Medico [Sun, 13 Dec 2009 03:25:01 +0000 (03:25 -0000)]
Bug #296554 - Add decompression support to ecompress (similar to ecompressdir
behavior) since dodoc can call ecompress with stuff that's already compressed
in some way.

svn path=/main/trunk/; revision=15058

15 years agoMake prefix varialbes ED, EPREFIX, and EROOT readonly except in EAPI 0, 1, and
Zac Medico [Sun, 13 Dec 2009 01:45:45 +0000 (01:45 -0000)]
Make prefix varialbes ED, EPREFIX, and EROOT readonly except in EAPI 0, 1, and
2.

svn path=/main/trunk/; revision=15057

15 years agoInside depgraph._validate_blockers(), do not consider blockers in DEPEND of
Zac Medico [Sun, 13 Dec 2009 01:17:35 +0000 (01:17 -0000)]
Inside depgraph._validate_blockers(), do not consider blockers in DEPEND of
installed packages, since DEPEND is supposed to be irrelevant for packages
after they are built.

svn path=/main/trunk/; revision=15056

15 years agoBug #296641 - Avoid UnicodeEncodeError with python2 in eapi_is_supported()
Zac Medico [Sat, 12 Dec 2009 18:56:35 +0000 (18:56 -0000)]
Bug #296641 - Avoid UnicodeEncodeError with python2 in eapi_is_supported()
triggered by corrupt EAPI.

svn path=/main/trunk/; revision=15055

15 years agoIn movefile mtime preservation code, simply round down to the nearest whole
Zac Medico [Sat, 12 Dec 2009 18:37:41 +0000 (18:37 -0000)]
In movefile mtime preservation code, simply round down to the nearest whole
second since python's float cannot preserve the st_mtim.tv_nsec field with
complete precision. Note that we have to use stat_obj[stat.ST_MTIME] here
because the float stat_obj.st_mtime rounds *up* sometimes.

svn path=/main/trunk/; revision=15054

15 years agoRemove redundant EPREFIX, EROOT, and ROOT assingments inside
Zac Medico [Sat, 12 Dec 2009 09:50:59 +0000 (09:50 -0000)]
Remove redundant EPREFIX, EROOT, and ROOT assingments inside
doebuild_environment().

svn path=/main/trunk/; revision=15052

15 years agoRemove unused STARTDIR variable.
Zac Medico [Sat, 12 Dec 2009 09:48:38 +0000 (09:48 -0000)]
Remove unused STARTDIR variable.

svn path=/main/trunk/; revision=15051

15 years agoUnset prefix vars for depend phase (even if EAPI is known).
Zac Medico [Sat, 12 Dec 2009 09:23:11 +0000 (09:23 -0000)]
Unset prefix vars for depend phase (even if EAPI is known).

svn path=/main/trunk/; revision=15050

15 years agoUnset prefix vars for depend phase when EAPI is unknown.
Zac Medico [Sat, 12 Dec 2009 09:13:18 +0000 (09:13 -0000)]
Unset prefix vars for depend phase when EAPI is unknown.

svn path=/main/trunk/; revision=15049

15 years ago* Fix type in econf --host argument.
Zac Medico [Sat, 12 Dec 2009 08:50:35 +0000 (08:50 -0000)]
* Fix type in econf --host argument.
* Add missing econf --build and --target arguments.
* Use tabs instead of spaces for indentation.

svn path=/main/trunk/; revision=15048

15 years agoFix typo.
Zac Medico [Sat, 12 Dec 2009 07:46:34 +0000 (07:46 -0000)]
Fix typo.

svn path=/main/trunk/; revision=15047

15 years agoIn movefile mtime rounding code, generate nanosecond resolution (9 decimal
Zac Medico [Sat, 12 Dec 2009 07:44:16 +0000 (07:44 -0000)]
In movefile mtime rounding code, generate nanosecond resolution (9 decimal
places) in order to ensure that the floating point representation is the
highest value possible without rounding up.

svn path=/main/trunk/; revision=15046

15 years agoFix typo.
Arfrever Frehtes Taifersar Arahesis [Sat, 12 Dec 2009 02:17:36 +0000 (02:17 -0000)]
Fix typo.

svn path=/main/trunk/; revision=15045

15 years agoRemove redundant EPREFIX setting since it's already initialized earlier in the
Zac Medico [Sat, 12 Dec 2009 01:35:18 +0000 (01:35 -0000)]
Remove redundant EPREFIX setting since it's already initialized earlier in the
config constructor.

svn path=/main/trunk/; revision=15044

15 years agoUpdate for EAPI 3_pre2.
Zac Medico [Sat, 12 Dec 2009 01:10:41 +0000 (01:10 -0000)]
Update for EAPI 3_pre2.

svn path=/main/trunk/; revision=15043

15 years agoAdd more EAPI 3 conditionals for prefix variables.
Zac Medico [Fri, 11 Dec 2009 23:02:48 +0000 (23:02 -0000)]
Add more EAPI 3 conditionals for prefix variables.

svn path=/main/trunk/; revision=15042

15 years agoAdd EAPI 3 conditionals for prefix variables.
Zac Medico [Fri, 11 Dec 2009 22:09:42 +0000 (22:09 -0000)]
Add EAPI 3 conditionals for prefix variables.

svn path=/main/trunk/; revision=15041

15 years agoJust use integer mtime if no fractional seconds are found in the search.
Zac Medico [Fri, 11 Dec 2009 21:53:23 +0000 (21:53 -0000)]
Just use integer mtime if no fractional seconds are found in the search.

svn path=/main/trunk/; revision=15040

15 years agoTweak movefile() timestamp preservation code to maximize precision for old
Zac Medico [Fri, 11 Dec 2009 21:31:46 +0000 (21:31 -0000)]
Tweak movefile() timestamp preservation code to maximize precision for old
timestamps that are closer to the epoch.

svn path=/main/trunk/; revision=15039

15 years agoAdd missing line from previous commit.
Zac Medico [Fri, 11 Dec 2009 19:52:36 +0000 (19:52 -0000)]
Add missing line from previous commit.

svn path=/main/trunk/; revision=15038

15 years agoIn movefile() timestamp preservation code, use another loop to search for
Zac Medico [Fri, 11 Dec 2009 19:50:32 +0000 (19:50 -0000)]
In movefile() timestamp preservation code, use another loop to search for
another digit of precision.

svn path=/main/trunk/; revision=15037

15 years agoAdd EAPI to the whitelist to ensure it's always available as early as possible.
Zac Medico [Fri, 11 Dec 2009 19:33:03 +0000 (19:33 -0000)]
Add EAPI to the whitelist to ensure it's always available as early as possible.

svn path=/main/trunk/; revision=15036

15 years agoAdd EAPI 3_pre2 to conditinals so the EAPI 4 stuff is disabled.
Zac Medico [Fri, 11 Dec 2009 06:37:00 +0000 (06:37 -0000)]
Add EAPI 3_pre2 to conditinals so the EAPI 4 stuff is disabled.

svn path=/main/trunk/; revision=15035

15 years agoEnable xz unpack for EAPI 3_pre2.
Zac Medico [Fri, 11 Dec 2009 06:12:01 +0000 (06:12 -0000)]
Enable xz unpack for EAPI 3_pre2.

svn path=/main/trunk/; revision=15034

15 years agoAdd support for EAPI 3_pre2.
Zac Medico [Fri, 11 Dec 2009 06:10:42 +0000 (06:10 -0000)]
Add support for EAPI 3_pre2.

svn path=/main/trunk/; revision=15033

15 years agoIn config.environ(), only export ED, EPREFIX, and EROOT to the ebuild
Zac Medico [Fri, 11 Dec 2009 06:09:43 +0000 (06:09 -0000)]
In config.environ(), only export ED, EPREFIX, and EROOT to the ebuild
environment starting with EAPI 3 (so people won't write ebuilds that
are incompatible with older package managers).

svn path=/main/trunk/; revision=15032

15 years agoDon't filter/interfere with prefix variables unless they are supported by the
Zac Medico [Fri, 11 Dec 2009 06:04:07 +0000 (06:04 -0000)]
Don't filter/interfere with prefix variables unless they are supported by the
current EAPI.

svn path=/main/trunk/; revision=15031

15 years agoFilter prefix variables ED, EPREFIX, and EROOT inside
Zac Medico [Fri, 11 Dec 2009 05:56:09 +0000 (05:56 -0000)]
Filter prefix variables ED, EPREFIX, and EROOT inside
filter_readonly_variables() but don't mark them readonly for now since some
ebuilds/eclasses try to assign EROOT (such as kde4-base_pkg_setup) which
causes the whole bash shell to exit like this:

>>> Extracting info
 * CPV:  kde-base/oxygen-icons-4.3.4
 * REPO: gentoo
 * USE:  elibc_glibc kernel_linux test userland_GNU x86
/var/tmp/portage/kde-base/oxygen-icons-4.3.4/temp/environment: line 2781: EROOT: readonly variable

Also, add ED to the environment blacklist.

svn path=/main/trunk/; revision=15030

15 years agoDon't use lazy import for portage.cache.mappings because it's imported anyway.
Zac Medico [Fri, 11 Dec 2009 03:22:40 +0000 (03:22 -0000)]
Don't use lazy import for portage.cache.mappings because it's imported anyway.

svn path=/main/trunk/; revision=15029

15 years agoUse collections.OrderedDict when available (python-2.7) and fall back to
Zac Medico [Fri, 11 Dec 2009 03:04:49 +0000 (03:04 -0000)]
Use collections.OrderedDict when available (python-2.7) and fall back to
portage.cache.mappings.OrderedDict for older python. Also, use OrderedDict
inside fetch() so that files are fetched in the order that they appear in
SRC_URI.

svn path=/main/trunk/; revision=15028

15 years agofix definition regarding slashes for EPREFIX, D, ED and EROOT
Fabian Groffen [Thu, 10 Dec 2009 12:41:41 +0000 (12:41 -0000)]
fix definition regarding slashes for EPREFIX, D, ED and EROOT

svn path=/main/trunk/; revision=15026

15 years agoImplement forward compatible Prefix support. This makes EPREFIX, ED and
Fabian Groffen [Thu, 10 Dec 2009 08:47:53 +0000 (08:47 -0000)]
Implement forward compatible Prefix support.  This makes EPREFIX, ED and
EROOT available to the ebuild environment, and updates the manpage
accordingly.  EPREFIX is hardwired to the empty string, and not
configurable.  For that, the prefix branch should be used for now.

This should satisfy the requirements for EAPI=3.

svn path=/main/trunk/; revision=15024

15 years agoFix introspection code in fetch() so that it works correctly when myuris is v2.2_rc58
Zac Medico [Thu, 10 Dec 2009 05:48:00 +0000 (05:48 -0000)]
Fix introspection code in fetch() so that it works correctly when myuris is
an OrderedDict instance. This fixes broken fetching for some packages.

svn path=/main/trunk/; revision=15019

15 years agoRemove extra comman in comment. v2.2_rc57
Zac Medico [Thu, 10 Dec 2009 01:51:34 +0000 (01:51 -0000)]
Remove extra comman in comment.

svn path=/main/trunk/; revision=15015

15 years agoDon't enable EAPI 4_pre1 yet.
Zac Medico [Thu, 10 Dec 2009 01:39:07 +0000 (01:39 -0000)]
Don't enable EAPI 4_pre1 yet.

svn path=/main/trunk/; revision=15014

15 years agoHandle permission problems when trying to cache the remote Packages file
Zac Medico [Thu, 10 Dec 2009 00:50:04 +0000 (00:50 -0000)]
Handle permission problems when trying to cache the remote Packages file
from a binhost. Thanks to Jeremy Olexa <darkside@g.o> for reporting.

svn path=/main/trunk/; revision=14997

15 years agoDetect cases when long(stat_obj.st_mtime) != stat_obj[stat.ST_MTIME] due to
Zac Medico [Thu, 10 Dec 2009 00:09:53 +0000 (00:09 -0000)]
Detect cases when long(stat_obj.st_mtime) != stat_obj[stat.ST_MTIME] due to
rounding up, and truncate digits as necessary to preserve the integral seconds
portion of the mtime.

svn path=/main/trunk/; revision=14996

15 years agoIn movefile(), always use stat_obj[stat.ST_MTIME] for the integral timestamp
Zac Medico [Wed, 9 Dec 2009 22:11:22 +0000 (22:11 -0000)]
In movefile(), always use stat_obj[stat.ST_MTIME] for the integral timestamp
which is returned, since the stat_obj.st_mtime float attribute rounds *up* if
the nanosecond part of the timestamp is 999999881 ns or greater.

svn path=/main/trunk/; revision=14995

15 years agoRemove obsolete env-update.sh script.
Zac Medico [Wed, 9 Dec 2009 21:16:11 +0000 (21:16 -0000)]
Remove obsolete env-update.sh script.

svn path=/main/trunk/; revision=14992

15 years agoAdd localization variables (LANG and LC_*) to the environment whitelist and
Zac Medico [Wed, 9 Dec 2009 06:10:53 +0000 (06:10 -0000)]
Add localization variables (LANG and LC_*) to the environment whitelist and
filter them from the saved environment (so user settings override those of
binary packages). Thanks to Fabio Erculiani <lxnay@g.o> for reporting.

svn path=/main/trunk/; revision=14975

15 years agoWhen overridding sys.std* in python2, use binary streams.
Zac Medico [Wed, 9 Dec 2009 05:42:26 +0000 (05:42 -0000)]
When overridding sys.std* in python2, use binary streams.

svn path=/main/trunk/; revision=14974

15 years agoFix handling for TEMP, TMP, and TMPDIR variables:
Zac Medico [Wed, 9 Dec 2009 00:30:46 +0000 (00:30 -0000)]
Fix handling for TEMP, TMP, and TMPDIR variables:
* Add to whitelist so current values are always used.
* Always filter them from the saved environment.
* Always add thier values to SANDBOX_WRITE.

svn path=/main/trunk/; revision=14973

15 years agoUse ImportError handling to import _TextTestResult which moved from
Zac Medico [Wed, 9 Dec 2009 00:08:18 +0000 (00:08 -0000)]
Use ImportError handling to import _TextTestResult which moved from
unittest to unittest.runner in python-2.7. Thanks to Arfrever for the
suggestion.

svn path=/main/trunk/; revision=14972

15 years agoWhen temporarily replacing the sys.std* streams, use the normal open() func
Zac Medico [Tue, 8 Dec 2009 23:47:38 +0000 (23:47 -0000)]
When temporarily replacing the sys.std* streams, use the normal open() func
in python3 so that we get the right class (otherwise our code that expects
the 'buffer' attribute will break).

svn path=/main/trunk/; revision=14971

15 years agoDon't assign f to sys.stderr inside EOutput._write().
Zac Medico [Tue, 8 Dec 2009 23:10:07 +0000 (23:10 -0000)]
Don't assign f to sys.stderr inside EOutput._write().

svn path=/main/trunk/; revision=14970

15 years agoWhen reading the remote Packages file for --getbinpkg, use codecs.iterdecode
Zac Medico [Tue, 8 Dec 2009 21:38:56 +0000 (21:38 -0000)]
When reading the remote Packages file for --getbinpkg, use codecs.iterdecode
to decode the stream. Also, don't use finally to close the atomic_ofstream
when writing the file since we want it to abort if an exception is raised.

svn path=/main/trunk/; revision=14969

15 years agoUse OrderedDict in portdbapi.getFetchMap() so that order in $A corresponds
Zac Medico [Tue, 8 Dec 2009 21:07:31 +0000 (21:07 -0000)]
Use OrderedDict in portdbapi.getFetchMap() so that order in $A corresponds
to order in SRC_URI.

svn path=/main/trunk/; revision=14968

15 years agoAdd OrderedDict class.
Zac Medico [Tue, 8 Dec 2009 21:06:39 +0000 (21:06 -0000)]
Add OrderedDict class.

svn path=/main/trunk/; revision=14967

15 years agoMove ebuild helpers to account for rename of EAPI 3 to 4.
Zac Medico [Tue, 8 Dec 2009 19:42:11 +0000 (19:42 -0000)]
Move ebuild helpers to account for rename of EAPI 3 to 4.

svn path=/main/trunk/; revision=14966

15 years agoBump EAPI conditionals to account for rename of EAPI 3 to 4. Thanks to
Zac Medico [Tue, 8 Dec 2009 19:41:09 +0000 (19:41 -0000)]
Bump EAPI conditionals to account for rename of EAPI 3 to 4. Thanks to
Jonathan Callen <abcd@g.o> for this patch.

svn path=/main/trunk/; revision=14965

15 years agoCopy the unittest._TextTestResult class from python-2.6 since it's been
Zac Medico [Mon, 7 Dec 2009 12:43:05 +0000 (12:43 -0000)]
Copy the unittest._TextTestResult class from python-2.6 since it's been
removed in python-2.7.

svn path=/main/trunk/; revision=14963

15 years agoRemove unused filter_phases, filter_mergephases, and filter_unmergephases v2.2_rc56
Zac Medico [Mon, 7 Dec 2009 02:53:20 +0000 (02:53 -0000)]
Remove unused filter_phases, filter_mergephases, and filter_unmergephases
functions.

svn path=/main/trunk/; revision=14958

15 years agoRemove unnecessary elog_process() phasefilter arguements.
Zac Medico [Mon, 7 Dec 2009 02:50:10 +0000 (02:50 -0000)]
Remove unnecessary elog_process() phasefilter arguements.

svn path=/main/trunk/; revision=14957

15 years agoMake more code conditional on existence of PORTAGE_BUILDDIR inside
Zac Medico [Mon, 7 Dec 2009 02:43:55 +0000 (02:43 -0000)]
Make more code conditional on existence of PORTAGE_BUILDDIR inside
dblink._merge().

svn path=/main/trunk/; revision=14955

15 years agoInside dblink._merge(), make sure PORTAGE_BUILDDIR still exists before trying
Zac Medico [Mon, 7 Dec 2009 02:30:33 +0000 (02:30 -0000)]
Inside dblink._merge(), make sure PORTAGE_BUILDDIR still exists before trying
to call ebuild success/die hooks, since it might have already been removed
by fail-clean (and the hooks would have already been called).

svn path=/main/trunk/; revision=14953

15 years agoFix possibly unsafe modification of list during iteration inside
Zac Medico [Mon, 7 Dec 2009 01:59:16 +0000 (01:59 -0000)]
Fix possibly unsafe modification of list during iteration inside
update_config_files().

svn path=/main/trunk/; revision=14951

15 years agoBug #295715 - Implement a register_success_hook function to complement
Zac Medico [Sun, 6 Dec 2009 10:22:54 +0000 (10:22 -0000)]
Bug #295715 - Implement a register_success_hook function to complement
register_die_hook, and also add code to ensure the die hooks are called even
when the failure is on the python side (like for file collisions).

svn path=/main/trunk/; revision=14936

15 years agoAdd 'tla' to the lists of live eclasses.
Zac Medico [Sun, 6 Dec 2009 09:00:43 +0000 (09:00 -0000)]
Add 'tla' to the lists of live eclasses.

svn path=/main/trunk/; revision=14935

15 years agoFix _spawn_misc_sh() to properly unset EBUILD_PHASE, and add a 'phase'
Zac Medico [Sun, 6 Dec 2009 08:40:25 +0000 (08:40 -0000)]
Fix _spawn_misc_sh() to properly unset EBUILD_PHASE, and add a 'phase'
description parameter for use in messages.

svn path=/main/trunk/; revision=14934

15 years agoAdd a AbstractEbuildProcess class for MiscFunctionsProcess to inherit the
Zac Medico [Sun, 6 Dec 2009 08:03:46 +0000 (08:03 -0000)]
Add a AbstractEbuildProcess class for MiscFunctionsProcess to inherit the
_pipe and _can_log methods that used to be in the EbuildProcess class.

svn path=/main/trunk/; revision=14933

15 years agoMake register_die_hook() ensure that each hook is registered only once.
Zac Medico [Sun, 6 Dec 2009 01:12:45 +0000 (01:12 -0000)]
Make register_die_hook() ensure that each hook is registered only once.

svn path=/main/trunk/; revision=14932

15 years agoUse portage.StringIO to avoid duplicate import fallback code.
Zac Medico [Sun, 6 Dec 2009 00:35:30 +0000 (00:35 -0000)]
Use portage.StringIO to avoid duplicate import fallback code.

svn path=/main/trunk/; revision=14931