portage.git
15 years agoBug #285191 - Remove the RDEPEND.implicit check because it is invalid.
Zac Medico [Thu, 1 Oct 2009 19:29:24 +0000 (19:29 -0000)]
Bug #285191 - Remove the RDEPEND.implicit check because it is invalid.

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

15 years agoRemove libtool from RDEPEND.suspect list, since libltdl.so is validly used by
Zac Medico [Thu, 1 Oct 2009 19:21:24 +0000 (19:21 -0000)]
Remove libtool from RDEPEND.suspect list, since libltdl.so is validly used by
some packages at runtime. Thanks to Samuli Suominen <ssuominen@g.o> for
reporting.

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

15 years agoAdd --tolerant option (already in use on master rsync mirror), requested by
Zac Medico [Wed, 30 Sep 2009 23:11:02 +0000 (23:11 -0000)]
Add --tolerant option (already in use on master rsync mirror), requested by
robbat2.

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

15 years agoBug #286895 - Generate an eerror message when a directory blocks merge
Zac Medico [Wed, 30 Sep 2009 06:19:49 +0000 (06:19 -0000)]
Bug #286895 - Generate an eerror message when a directory blocks merge
of a regular file and the file is merged using a 'config protect' filename
even though the path may not be among those covered by CONFIG_PROTECT.

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

15 years agoUse a regular expression for SLOT validation inside vardbapi.aux_get().
Zac Medico [Wed, 30 Sep 2009 05:52:03 +0000 (05:52 -0000)]
Use a regular expression for SLOT validation inside vardbapi.aux_get().

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

15 years agoTake regular expressions from portage.dep and use them to reimplement
Zac Medico [Wed, 30 Sep 2009 05:19:06 +0000 (05:19 -0000)]
Take regular expressions from portage.dep and use them to reimplement
portage.versions.pkgsplit(). This simplifies the code and helps
guarantee consistency package name/version validation.

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

15 years agoFix SyntaxError with Python 3 added in r14462.
Arfrever Frehtes Taifersar Arahesis [Tue, 29 Sep 2009 23:25:19 +0000 (23:25 -0000)]
Fix SyntaxError with Python 3 added in r14462.

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

15 years agoRevert the rest of r14280 since it seems that dict bypasses __getitem__
Zac Medico [Tue, 29 Sep 2009 20:00:57 +0000 (20:00 -0000)]
Revert the rest of r14280 since it seems that dict bypasses __getitem__
and/or __setitem__ too often.

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

15 years agoAdd back _PackageMetadataWrapper__setitem__, removed in r14280, since removing
Zac Medico [Tue, 29 Sep 2009 19:35:05 +0000 (19:35 -0000)]
Add back _PackageMetadataWrapper__setitem__, removed in r14280, since removing
it seems to cause problems. Thanks to Jeremy Olexa <darkside@gentoo.org> for
reporting, and Marat Radchenko <marat@slonopotamus.org> for bisecting to find
the revision.

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

15 years agoHandle encoding/decoding of unicode when using the xpak api.
Zac Medico [Tue, 29 Sep 2009 06:04:42 +0000 (06:04 -0000)]
Handle encoding/decoding of unicode when using the xpak api.
Use tbz2.get_data() instead of tbz2.getfile() when reading multiple values,
in order to avoid multiple tbz2.scan() and searchindex() calls.

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

15 years agoMake tbz2.get_data() return an empty dict on failure.
Zac Medico [Tue, 29 Sep 2009 05:56:39 +0000 (05:56 -0000)]
Make tbz2.get_data() return an empty dict on failure.

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

15 years agoDon't call self.scan() in tbz2.__init__ since all methods call it anyway.
Zac Medico [Tue, 29 Sep 2009 05:23:23 +0000 (05:23 -0000)]
Don't call self.scan() in tbz2.__init__ since all methods call it anyway.

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

15 years agoBug #286780 - Fix email.MIME* imports to use email.mime.* (works with python
Zac Medico [Mon, 28 Sep 2009 20:37:20 +0000 (20:37 -0000)]
Bug #286780 - Fix email.MIME* imports to use email.mime.* (works with python
2.6 and python 3). Thanks to Hanno Meyer-Thurow <h.mth@web.de> for this patch.

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

15 years agoFix breakage in file path -> package lookup code.
Zac Medico [Mon, 28 Sep 2009 01:50:14 +0000 (01:50 -0000)]
Fix breakage in file path -> package lookup code.

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

15 years agoMake _test_pty_eof() call process.spawn() instead of os.fork().
Zac Medico [Sun, 27 Sep 2009 21:55:41 +0000 (21:55 -0000)]
Make _test_pty_eof() call process.spawn() instead of os.fork().

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

15 years agoTry to avoid blocking on Darwin in _test_pty_eof() by using slave_fd directly
Zac Medico [Sun, 27 Sep 2009 21:07:38 +0000 (21:07 -0000)]
Try to avoid blocking on Darwin in _test_pty_eof() by using slave_fd directly
instead of fdopen.

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

15 years agoIn _test_pty_eof(), call waitpid on the child process only after reading all
Zac Medico [Sun, 27 Sep 2009 21:01:49 +0000 (21:01 -0000)]
In _test_pty_eof(), call waitpid on the child process only after reading all
the data from the pty.

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

15 years agoMake _test_pty_eof() fork when writing to the slave_fd, since otherwise
Zac Medico [Sun, 27 Sep 2009 20:12:29 +0000 (20:12 -0000)]
Make _test_pty_eof() fork when writing to the slave_fd, since otherwise
it would block on some platforms such as Darwin.

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

15 years agoFix TypeError in clear_screen() in dispatch-conf which occurs when Python 3 is used...
Arfrever Frehtes Taifersar Arahesis [Sun, 27 Sep 2009 19:47:13 +0000 (19:47 -0000)]
Fix TypeError in clear_screen() in dispatch-conf which occurs when Python 3 is used (bug #286682).

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

15 years agoMake _test_pty_eof() use non-blocking IO, required for Darwin kernel.
Zac Medico [Sun, 27 Sep 2009 19:45:09 +0000 (19:45 -0000)]
Make _test_pty_eof() use non-blocking IO, required for Darwin kernel.

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

15 years agoUse catsplit() instead of a regex to generate dbapi._categories. Thanks to
Zac Medico [Sun, 27 Sep 2009 19:07:57 +0000 (19:07 -0000)]
Use catsplit() instead of a regex to generate dbapi._categories. Thanks to
Marat Radchenko <marat@slonopotamus.org> for this patch.

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

15 years agoFix binTestsInit() to use correct values for PORTAGE_BIN_PATH and
Zac Medico [Sun, 27 Sep 2009 18:30:44 +0000 (18:30 -0000)]
Fix binTestsInit() to use correct values for PORTAGE_BIN_PATH and
PORTAGE_PYM_PATH.

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

15 years agoUse explicit imports instead of *.
Zac Medico [Sun, 27 Sep 2009 18:23:32 +0000 (18:23 -0000)]
Use explicit imports instead of *.

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

15 years agoUse mkdtemp() instead of hardcoded pym/portage/tests/bin/root directory.
Zac Medico [Sun, 27 Sep 2009 18:01:30 +0000 (18:01 -0000)]
Use mkdtemp() instead of hardcoded pym/portage/tests/bin/root directory.

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

15 years agoBug #286522 - Check all portdbapi.findname return values in case it
Zac Medico [Sat, 26 Sep 2009 23:37:34 +0000 (23:37 -0000)]
Bug #286522 - Check all portdbapi.findname return values in case it
returns None, and raise 'ebuild not found' exceptions when necessary.

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

15 years agoBug #286475 - Fix KeyValuePairFileLoader.lineParser() so it doesn't raise
Zac Medico [Sat, 26 Sep 2009 07:32:58 +0000 (07:32 -0000)]
Bug #286475 - Fix KeyValuePairFileLoader.lineParser() so it doesn't raise
AttributeError when a key/value is redefined.

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

15 years agoRevert r14430 and fix to do as intended. Thanks to Arfrever for reporting. v2.2_rc42
Zac Medico [Sat, 26 Sep 2009 00:01:19 +0000 (00:01 -0000)]
Revert r14430 and fix to do as intended. Thanks to Arfrever for reporting.

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

15 years agoBug #285767 - Add support to to identify and eliminate redundant package
Zac Medico [Fri, 25 Sep 2009 21:24:41 +0000 (21:24 -0000)]
Bug #285767 - Add support to to identify and eliminate redundant package
selections when multiple atoms happen to specify a version range.

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

15 years agoFix UnboundLocalError triggered by atom without category for nonexistent
Zac Medico [Fri, 25 Sep 2009 18:34:15 +0000 (18:34 -0000)]
Fix UnboundLocalError triggered by atom without category for nonexistent
package. Thanks to Jeremy Olexa <darkside@gentoo.org> for reporting.

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

15 years agoMake sure self._allowed_keys are sorted in the table create statement. They
Zac Medico [Fri, 25 Sep 2009 18:04:22 +0000 (18:04 -0000)]
Make sure self._allowed_keys are sorted in the table create statement. They
already are sorted, but do it explicitly here for clarity.

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

15 years agoFix formatting of sizes with Python 3.
Arfrever Frehtes Taifersar Arahesis [Fri, 25 Sep 2009 07:08:24 +0000 (07:08 -0000)]
Fix formatting of sizes with Python 3.

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

15 years agoRemove ugly code from __len__, since defining __bool__ fixes the same
Zac Medico [Fri, 25 Sep 2009 07:00:41 +0000 (07:00 -0000)]
Remove ugly code from __len__, since defining __bool__ fixes the same
issue.

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

15 years agoDefine __bool__() for compatibility with Python 3.
Arfrever Frehtes Taifersar Arahesis [Fri, 25 Sep 2009 06:34:34 +0000 (06:34 -0000)]
Define __bool__() for compatibility with Python 3.

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

15 years agoUse imp.reload() instead of reload() for compatibility with Python 3.
Arfrever Frehtes Taifersar Arahesis [Fri, 25 Sep 2009 06:18:25 +0000 (06:18 -0000)]
Use imp.reload() instead of reload() for compatibility with Python 3.

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

15 years agoRemove unused imports.
Zac Medico [Fri, 25 Sep 2009 06:04:00 +0000 (06:04 -0000)]
Remove unused imports.

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

15 years agoFix length calculation so it doesn't assume the length of the encoded
Zac Medico [Fri, 25 Sep 2009 06:01:56 +0000 (06:01 -0000)]
Fix length calculation so it doesn't assume the length of the encoded
string is the same as the unicode string.

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

15 years agoAdd a test case for this issue: http://bugs.python.org/issue5334
Zac Medico [Fri, 25 Sep 2009 05:58:16 +0000 (05:58 -0000)]
Add a test case for this issue: bugs.python.org/issue5334

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

15 years agoUse 'in' instead of has_key() in portage.glsa.Glsa.parse() when Python 3 is used.
Arfrever Frehtes Taifersar Arahesis [Fri, 25 Sep 2009 05:56:25 +0000 (05:56 -0000)]
Use 'in' instead of has_key() in portage.glsa.Glsa.parse() when Python 3 is used.

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

15 years agoUse list comprehensions instead of filter() or map() in some places for compatibility...
Arfrever Frehtes Taifersar Arahesis [Fri, 25 Sep 2009 05:29:02 +0000 (05:29 -0000)]
Use list comprehensions instead of filter() or map() in some places for compatibility with Python 3.

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

15 years agoFix more.
Zac Medico [Fri, 25 Sep 2009 05:04:21 +0000 (05:04 -0000)]
Fix more.

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

15 years agoFix ValueError in digestcheck(), reported by Arfrever.
Zac Medico [Fri, 25 Sep 2009 05:03:13 +0000 (05:03 -0000)]
Fix ValueError in digestcheck(), reported by Arfrever.

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

15 years agoRemove unnecessary dict.has_key() call (fix for python 3).
Zac Medico [Fri, 25 Sep 2009 03:29:54 +0000 (03:29 -0000)]
Remove unnecessary dict.has_key() call (fix for python 3).

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

15 years agoShow an appropriate error message in _create_pty_or_pipe() if openpty()
Zac Medico [Thu, 24 Sep 2009 22:47:09 +0000 (22:47 -0000)]
Show an appropriate error message in _create_pty_or_pipe() if openpty()
fails inside _test_pty_eof().

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

15 years agoFix regression in _getitem() from r14398, since myf.read().split("\n")
Zac Medico [Thu, 24 Sep 2009 22:15:48 +0000 (22:15 -0000)]
Fix regression in _getitem() from r14398, since myf.read().split("\n")
yields an empty string at the end which is causes _parse_data() to
catch a ValueError and raise CacheCorruption.

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

15 years agoAdd a test case for http://bugs.python.org/issue5380 and mark it as 'todo'
Zac Medico [Thu, 24 Sep 2009 21:50:10 +0000 (21:50 -0000)]
Add a test case for bugs.python.org/issue5380 and mark it as 'todo'
since it fails with current versions of python 3.

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

15 years agoMake _test_pty_eof() return None if openpty() fails.
Zac Medico [Thu, 24 Sep 2009 21:48:07 +0000 (21:48 -0000)]
Make _test_pty_eof() return None if openpty() fails.

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

15 years agoUse a runtime check to see if http://bugs.python.org/issue5380 is fixed.
Zac Medico [Thu, 24 Sep 2009 21:32:30 +0000 (21:32 -0000)]
Use a runtime check to see if bugs.python.org/issue5380 is fixed.

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

15 years agoUse dict.__iter__ instead of keys(), since it behaves identically in python
Zac Medico [Thu, 24 Sep 2009 20:43:14 +0000 (20:43 -0000)]
Use dict.__iter__ instead of keys(), since it behaves identically in python
2 and 3.

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

15 years agoFix previous commit.
Zac Medico [Thu, 24 Sep 2009 06:46:37 +0000 (06:46 -0000)]
Fix previous commit.

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

15 years agoWarn if cpv_getkey() is given invalid input that triggers legacy code.
Zac Medico [Thu, 24 Sep 2009 06:45:18 +0000 (06:45 -0000)]
Warn if cpv_getkey() is given invalid input that triggers legacy code.

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

15 years agoAvoid unicode errors in python 3. Thanks to Arfrever for reporting.
Zac Medico [Thu, 24 Sep 2009 06:36:47 +0000 (06:36 -0000)]
Avoid unicode errors in python 3. Thanks to Arfrever for reporting.

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

15 years agoDecode directory names where appropriate in digestcheck(). Thanks to
Zac Medico [Thu, 24 Sep 2009 06:03:58 +0000 (06:03 -0000)]
Decode directory names where appropriate in digestcheck(). Thanks to
Arfrever for reporting.

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

15 years agoMisc performance enhancements. Thanks to Marat Radchenko
Zac Medico [Thu, 24 Sep 2009 05:48:33 +0000 (05:48 -0000)]
Misc performance enhancements. Thanks to Marat Radchenko
<marat@slonopotamus.org> for this patch from bug #276813.

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

15 years agoFix test case for recent changes.
Zac Medico [Thu, 24 Sep 2009 05:35:08 +0000 (05:35 -0000)]
Fix test case for recent changes.

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

15 years agoBug #286118 - Fix dbapi.move_ent() methods so they don't assume Atom instances
Zac Medico [Wed, 23 Sep 2009 20:01:52 +0000 (20:01 -0000)]
Bug #286118 - Fix dbapi.move_ent() methods so they don't assume Atom instances
can be concatenated with strings (even though they can now, it's not really
a good assumption).

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

15 years agoFix "TypeError: object of type 'filter' has no len()".
Arfrever Frehtes Taifersar Arahesis [Wed, 23 Sep 2009 17:48:34 +0000 (17:48 -0000)]
Fix "TypeError: object of type 'filter' has no len()".

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

15 years agoFix formatting of size of downloads with Python 3.
Arfrever Frehtes Taifersar Arahesis [Wed, 23 Sep 2009 14:04:48 +0000 (14:04 -0000)]
Fix formatting of size of downloads with Python 3.

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

15 years agoBug #285979 - Replace references to CDEPEND with UNUSED_00, to make it clear
Zac Medico [Wed, 23 Sep 2009 06:44:54 +0000 (06:44 -0000)]
Bug #285979 - Replace references to CDEPEND with UNUSED_00, to make it clear
that this key really is unused.

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

15 years agoOptimize vardbapi.getpath(). Thanks to Marat Radchenko
Zac Medico [Wed, 23 Sep 2009 06:35:55 +0000 (06:35 -0000)]
Optimize vardbapi.getpath(). Thanks to Marat Radchenko
<marat@slonopotamus.org> for this patch.

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

15 years agoOptimize SlotDict.iteritems() a little.
Zac Medico [Tue, 22 Sep 2009 22:30:49 +0000 (22:30 -0000)]
Optimize SlotDict.iteritems() a little.

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

15 years agoMake SlotDict use call self.iteritems() where appropriate since it implements
Zac Medico [Tue, 22 Sep 2009 22:29:32 +0000 (22:29 -0000)]
Make SlotDict use call self.iteritems() where appropriate since it implements
that method even when running in python 3.x.

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

15 years agoFix stack_dicts() to always return a dict.
Zac Medico [Tue, 22 Sep 2009 22:00:42 +0000 (22:00 -0000)]
Fix stack_dicts() to always return a dict.

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

15 years agoDon't pass the ignore_none parameter to stack_dicts() since it does nothing
Zac Medico [Tue, 22 Sep 2009 21:59:19 +0000 (21:59 -0000)]
Don't pass the ignore_none parameter to stack_dicts() since it does nothing
now.

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

15 years agoClean up stack_dicts() a little.
Zac Medico [Tue, 22 Sep 2009 21:58:38 +0000 (21:58 -0000)]
Clean up stack_dicts() a little.

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

15 years agoDisable the ignore_none parameter for stack_dicts() since having it return
Zac Medico [Tue, 22 Sep 2009 21:42:07 +0000 (21:42 -0000)]
Disable the ignore_none parameter for stack_dicts() since having it return
None instead of a dict sometimes is hazardous.

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

15 years agoReplace dict.keys() usage with __iter__(), since it behaves identically in
Zac Medico [Tue, 22 Sep 2009 21:37:53 +0000 (21:37 -0000)]
Replace dict.keys() usage with __iter__(), since it behaves identically in
both python 2.x and 3.x.

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

15 years agoReplace dict.keys() usage with __iter__(), since it behaves identically in
Zac Medico [Tue, 22 Sep 2009 21:26:20 +0000 (21:26 -0000)]
Replace dict.keys() usage with __iter__(), since it behaves identically in
both python 2.x and 3.x.

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

15 years agoRemove code that's been commented out.
Zac Medico [Tue, 22 Sep 2009 20:47:11 +0000 (20:47 -0000)]
Remove code that's been commented out.

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

15 years agoReplace dict.keys() usage with __iter__(), since it behaves identically in
Zac Medico [Tue, 22 Sep 2009 20:43:34 +0000 (20:43 -0000)]
Replace dict.keys() usage with __iter__(), since it behaves identically in
both python 2.x and 3.x.

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

15 years agoFix for python 3.x compatibility.
Zac Medico [Tue, 22 Sep 2009 20:33:01 +0000 (20:33 -0000)]
Fix for python 3.x compatibility.

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

15 years agoReplace dict.keys() usage with __iter__(), since it behaves identically in
Zac Medico [Tue, 22 Sep 2009 20:18:45 +0000 (20:18 -0000)]
Replace dict.keys() usage with __iter__(), since it behaves identically in
both python 2.x and 3.x.

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

15 years agoReplace doct.keys() usage with __iter__(), since it behaves identically in
Zac Medico [Tue, 22 Sep 2009 20:03:10 +0000 (20:03 -0000)]
Replace doct.keys() usage with __iter__(), since it behaves identically in
both python 2.x and 3.x.

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

15 years agoDo manual unicode handling (instead of using the wrapped os module) in
Zac Medico [Tue, 22 Sep 2009 19:48:26 +0000 (19:48 -0000)]
Do manual unicode handling (instead of using the wrapped os module) in
portdbapi.findname2(), since it's a hotspot. Thanks to Marat Radchenko
<marat@slonopotamus.org> for the initial patch.

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

15 years agoFor python 3.x with boolean target, len() results in TypeError, so
Zac Medico [Tue, 22 Sep 2009 18:54:27 +0000 (18:54 -0000)]
For python 3.x with boolean target, len() results in TypeError, so
make __len__ return 0 or 1 in this case.

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

15 years agoOptimize unicode wrappers. Thanks to Marat Radchenko <marat@slonopotamus.org>
Zac Medico [Tue, 22 Sep 2009 18:37:31 +0000 (18:37 -0000)]
Optimize unicode wrappers. Thanks to Marat Radchenko <marat@slonopotamus.org>
for this patch from bug #276813.

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

15 years agoFix another potential 'RuntimeError: dictionary changed size during iteration'
Zac Medico [Tue, 22 Sep 2009 03:57:58 +0000 (03:57 -0000)]
Fix another potential 'RuntimeError: dictionary changed size during iteration'
exception in _owners_db._populate() for py3k.

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

15 years agoFix 'iteritems' attribute detection to look for 'items' instead.
Zac Medico [Tue, 22 Sep 2009 03:51:12 +0000 (03:51 -0000)]
Fix 'iteritems' attribute detection to look for 'items' instead.

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

15 years agoFix 'RuntimeError: dictionary changed size during iteration' in
Zac Medico [Tue, 22 Sep 2009 03:44:27 +0000 (03:44 -0000)]
Fix 'RuntimeError: dictionary changed size during iteration' in
bindbapi.aux_update() with py3k.

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

15 years agoRemove redundant list() since starred expressions work with iterators.
Zac Medico [Tue, 22 Sep 2009 02:46:02 +0000 (02:46 -0000)]
Remove redundant list() since starred expressions work with iterators.

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

15 years agoFix items to prevent infinite recursion.
Zac Medico [Tue, 22 Sep 2009 02:02:45 +0000 (02:02 -0000)]
Fix items to prevent infinite recursion.

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

15 years agoFix 'RuntimeError: dictionary changed size during iteration' in
Zac Medico [Mon, 21 Sep 2009 22:26:56 +0000 (22:26 -0000)]
Fix 'RuntimeError: dictionary changed size during iteration' in
_owners_db._populate() with py3k.

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

15 years agoDon't wrap os.statvfs since it requires unicode string args in py3k.
Zac Medico [Mon, 21 Sep 2009 22:20:28 +0000 (22:20 -0000)]
Don't wrap os.statvfs since it requires unicode string args in py3k.

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

15 years agoFix sorted() keyword arg for py3k.
Zac Medico [Mon, 21 Sep 2009 22:08:33 +0000 (22:08 -0000)]
Fix sorted() keyword arg for py3k.

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

15 years agoEncode/decode names from the xpak index where appropriate.
Zac Medico [Mon, 21 Sep 2009 22:02:09 +0000 (22:02 -0000)]
Encode/decode names from the xpak index where appropriate.

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

15 years agoIn _unicode_func_wrapper, only encode keyword argument values, and not the
Zac Medico [Mon, 21 Sep 2009 20:50:59 +0000 (20:50 -0000)]
In _unicode_func_wrapper, only encode keyword argument values, and not the
keys.

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

15 years agoFix PORTAGE_WORKDIR_MODE parsing code so it doesn't store python's octal
Zac Medico [Mon, 21 Sep 2009 20:44:30 +0000 (20:44 -0000)]
Fix PORTAGE_WORKDIR_MODE parsing code so it doesn't store python's octal
syntax in the environment variable.

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

15 years agoMake find_binary() use os.environ.get instead of os.getenv, since os.getenv
Zac Medico [Mon, 21 Sep 2009 20:29:30 +0000 (20:29 -0000)]
Make find_binary() use os.environ.get instead of os.getenv, since os.getenv
isn't behaving correctly in py3k (maybe a unicode wrapper issue?).

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

15 years agoDon't encode the env in py3k since it expects strings for the env that's
Zac Medico [Mon, 21 Sep 2009 20:12:40 +0000 (20:12 -0000)]
Don't encode the env in py3k since it expects strings for the env that's
passed into os.execve().

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

15 years agoTemporarily disable use of pty in py3k since it triggers an unresolved
Zac Medico [Mon, 21 Sep 2009 19:56:26 +0000 (19:56 -0000)]
Temporarily disable use of pty in py3k since it triggers an unresolved
issue, http://bugs.python.org/issue5380. With this workaround,
portage.tests.ebuild.test_spawn.SpawnTestCase.testLogfile() does
not raise IOError.

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

15 years agoFix decodeint() for py3k compat, since bytes are a sequence of integers
Zac Medico [Mon, 21 Sep 2009 19:51:02 +0000 (19:51 -0000)]
Fix decodeint() for py3k compat, since bytes are a sequence of integers
instead of characters.

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

15 years agoUse input() instead of raw_input() when Python 3 is used.
Arfrever Frehtes Taifersar Arahesis [Mon, 21 Sep 2009 18:34:38 +0000 (18:34 -0000)]
Use input() instead of raw_input() when Python 3 is used.

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

15 years agoDecode database name passed to portage.cache.sqlite.database._db_module.connect(...
Arfrever Frehtes Taifersar Arahesis [Mon, 21 Sep 2009 18:19:39 +0000 (18:19 -0000)]
Decode database name passed to portage.cache.sqlite.database._db_module.connect() for compatibility with Python 3.

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

15 years agoUse next(iterator) instead of iterator.next() for compatibility with Python 3.
Arfrever Frehtes Taifersar Arahesis [Mon, 21 Sep 2009 18:14:01 +0000 (18:14 -0000)]
Use next(iterator) instead of iterator.next() for compatibility with Python 3.
(2to3-3.1 -f next -nw ${FILES})

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

15 years agoDecode all keys in dictionary containing environment passed to os.execve() in portage...
Arfrever Frehtes Taifersar Arahesis [Mon, 21 Sep 2009 18:02:08 +0000 (18:02 -0000)]
Decode all keys in dictionary containing environment passed to os.execve() in portage.process._exec() for compatibility with Python 3.

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

15 years ago'filtered_auxdbkeys' should be a list to allow sorting.
Arfrever Frehtes Taifersar Arahesis [Mon, 21 Sep 2009 17:46:21 +0000 (17:46 -0000)]
'filtered_auxdbkeys' should be a list to allow sorting.

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

15 years agoDefine long as int when Python 3 is used.
Arfrever Frehtes Taifersar Arahesis [Mon, 21 Sep 2009 17:41:45 +0000 (17:41 -0000)]
Define long as int when Python 3 is used.

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

15 years agoSupport bytes in portage.util.normalize_path() with Python 3.
Arfrever Frehtes Taifersar Arahesis [Mon, 21 Sep 2009 17:03:17 +0000 (17:03 -0000)]
Support bytes in portage.util.normalize_path() with Python 3.

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

15 years agoFix portage._unicode_func_wrapper.__call__() to properly handle bytes with Python 3.
Arfrever Frehtes Taifersar Arahesis [Mon, 21 Sep 2009 17:00:59 +0000 (17:00 -0000)]
Fix portage._unicode_func_wrapper.__call__() to properly handle bytes with Python 3.

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

15 years agoFix dep_expand so that it doesn't use deprecated dep_getcpv() usage
Zac Medico [Mon, 21 Sep 2009 16:57:17 +0000 (16:57 -0000)]
Fix dep_expand so that it doesn't use deprecated dep_getcpv() usage
(with missing category).

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

15 years agoFix infinite recursion in items and values methods.
Zac Medico [Mon, 21 Sep 2009 16:25:27 +0000 (16:25 -0000)]
Fix infinite recursion in items and values methods.

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