summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo in __all__.Zac Medico2009-02-221-1/+1
| | | | svn path=/main/trunk/; revision=12677
* Reduce bloat in portage.util by splitting ObjectProxy and lazyimport into aZac Medico2009-02-225-184/+215
| | | | | | new portage.proxy package. svn path=/main/trunk/; revision=12676
* Make lazy_import() skip proxy creation for modules that already existZac Medico2009-02-221-8/+19
| | | | | | in sys.modules. svn path=/main/trunk/; revision=12675
* Make the UserDict and LazyItemsDict constructors use an optional positionalZac Medico2009-02-213-8/+25
| | | | | | argument instead of a keyword argument. svn path=/main/trunk/; revision=12674
* In config.setcpv(), use LazyItemsDict to implement lazy evaluation ofZac Medico2009-02-212-8/+58
| | | | | | | | | | | PORTAGE_IUSE. The PORTAGE_IUSE value is lazily evaluated since re.escape() is slow and the value is only used when an ebuild phase needs to be executed (it's used only to generate QA notices). Thanks to Marat Radchenko <slonopotamusorama@gmail.com> for identifying this performance issue and submitting the initial patch which used a memoization approach instead of lazy evaluation. svn path=/main/trunk/; revision=12673
* In LazyItemsDict, when a singleton is instantiated, replace the wrapper withZac Medico2009-02-211-12/+22
| | | | | | the singleton since the wrapper is no longer needed at this point. svn path=/main/trunk/; revision=12672
* Revert r12639 and use string.ascii_letters for python-3.0 compatibility.Zac Medico2009-02-211-1/+2
| | | | svn path=/main/trunk/; revision=12669
* Inside portage.spawn(), open files for logfile handling in binary mode, forZac Medico2009-02-211-3/+3
| | | | | | compatibility with python-3.0. svn path=/main/trunk/; revision=12668
* Inside summarylist(), it's possible for myglsa.packages.keys() to containZac Medico2009-02-211-1/+1
| | | | | | | | | | | | | unicode objects, which trigger and exception like this: File "//usr/lib64/portage/pym/portage/dep.py", line 535, in __init__ obj_setattr(self, x, getattr(s, x)) AttributeError: 'unicode' object has no attribute '__eq__' To solve this problem, convert unicode objects to plain str before passing them to the portage api. svn path=/main/trunk/; revision=12667
* For python-3.0 compatibility, open files in binary mode insideZac Medico2009-02-211-3/+3
| | | | | | SpawnProcess._start(). svn path=/main/trunk/; revision=12666
* When loading vdb_metadata.pickle inside vardbapi._aux_cache_init(), inZac Medico2009-02-201-1/+9
| | | | | | | | order to avoid an extreme performance issue, disable buffering when opening the file under python-3.0. Unfortunately, performance is still poor relative to python-2.x, but buffering makes it much worse. svn path=/main/trunk/; revision=12665
* Add a cross reference from FEATURES=lmirror docs to the "local" mirror docsZac Medico2009-02-201-0/+3
| | | | | | in portage(5). svn path=/main/trunk/; revision=12664
* In python-3.0, integer division results in a float, so convert back to int.Zac Medico2009-02-201-1/+1
| | | | svn path=/main/trunk/; revision=12663
* Fix StringIO imports so that 2to3 can handle them. Also, replace shlex +Zac Medico2009-02-205-30/+20
| | | | | | StringIO usage with shlex.split() where appropriate. svn path=/main/trunk/; revision=12662
* Add a new portage.utils.lazy_import() function which behaves similar to theZac Medico2009-02-203-30/+126
| | | | | | snakeoil.demandload.demandload() function. svn path=/main/trunk/; revision=12661
* Try to fix svn:keywords again.Zac Medico2009-02-201-2/+2
| | | | svn path=/main/trunk/; revision=12659
* Try to fix svn:keywords again.Zac Medico2009-02-200-0/+0
| | | | svn path=/main/trunk/; revision=12658
* Add back Rev to svn:keywords (accidentally removed when setting Id). ThanksZac Medico2009-02-191-1/+1
| | | | | | to ABCD for reporting. svn path=/main/trunk/; revision=12656
* When displaying the list of failed packages, tell the number that failed.Zac Medico2009-02-191-2/+7
| | | | | | Thanks to Jeremy Olexa <darkside@g.o> for the suggestion. svn path=/main/trunk/; revision=12655
* Make isvalidatom() identify empty slot as invalid (missing slot is valid) andZac Medico2009-02-192-0/+5
| | | | | | add a corresponding test case. svn path=/main/trunk/; revision=12654
* Optimize depgraph._dep_expand() to avoid calling pordbapi.cp_all(),Zac Medico2009-02-193-18/+8
| | | | | | | | since it can be more efficient to call cp_list() on each category. Thanks to Marat Radchenko <slonopotamusorama@gmail.com> for the suggestion. svn path=/main/trunk/; revision=12653
* Decode terminal codes from binary when necessary, for python-3.0 compatibilityZac Medico2009-02-191-0/+3
| | | | | | since sys.stdout is a text stream. svn path=/main/trunk/; revision=12649
* Handle ValueError when unpickling, since this can be triggered by anZac Medico2009-02-194-4/+4
| | | | | | unsupported pickle protocol. svn path=/main/trunk/; revision=12648
* Fix update() methods to work with python-3.0.Zac Medico2009-02-191-8/+24
| | | | svn path=/main/trunk/; revision=12647
* Tweak exception handling indentation to avoid a bug in 2to3.Zac Medico2009-02-191-2/+4
| | | | svn path=/main/trunk/; revision=12646
* For python-3.0 compatibility, encode strings as binary before trying to passZac Medico2009-02-191-2/+2
| | | | | | them to hashlib. svn path=/main/trunk/; revision=12645
* Tweak code to avoid python-3.0 errors like this one:Zac Medico2009-02-191-3/+9
| | | | | | SyntaxError: can not delete variable 'e' referenced in nested scope svn path=/main/trunk/; revision=12644
* Revert accidental python-3.0 syntax.Zac Medico2009-02-191-2/+2
| | | | svn path=/main/trunk/; revision=12643
* For compatibility with python-3.0, open files in text mode where appropriate.Zac Medico2009-02-195-6/+6
| | | | svn path=/main/trunk/; revision=12642
* For compatibility with python-3.0, always open streams for pickles in binaryZac Medico2009-02-195-25/+15
| | | | | | mode. svn path=/main/trunk/; revision=12641
* For compatibility with python-3.0, inherit from ObjectProxy instead ofZac Medico2009-02-191-89/+123
| | | | | | inheriting directly from file. svn path=/main/trunk/; revision=12640
* For python-3.0 compatibility, don't use string.letters.Zac Medico2009-02-191-1/+1
| | | | svn path=/main/trunk/; revision=12639
* Use a regular expression for the file.name check. This replaces some oddZac Medico2009-02-191-15/+12
| | | | | | map() usage that 2to3 warns about. svn path=/main/trunk/; revision=12638
* Don't bother to calculate PORTAGE_COUNTER_HASH when in --pretend mode.Zac Medico2009-02-191-3/+4
| | | | svn path=/main/trunk/; revision=12637
* Inside post_emerge(), skip the vardbapi counter check when in --pretendZac Medico2009-02-191-2/+2
| | | | | | | mode (significant performance improvement). Thanks to Marat Radchenko (slonopotamus) for reporting. svn path=/main/trunk/; revision=12636
* For python-3.0 compatibility, raise a real exception instead of a string.Zac Medico2009-02-191-2/+2
| | | | svn path=/main/trunk/; revision=12635
* Bug #230483 - Convert glsa-check option parsing to use the optparse module.Zac Medico2009-02-191-93/+71
| | | | | | | This replaces some code which triggers a traceback from 2to3. Thanks to Ali Polatel <hawking@g.o> for this patch. svn path=/main/trunk/; revision=12634
* For compatibility with python-3.0, use isinstance() instead of type().Zac Medico2009-02-194-20/+17
| | | | svn path=/main/trunk/; revision=12633
* Fix classes that implement __iter__() to copy it to their keys() methodZac Medico2009-02-192-0/+10
| | | | | | when running under >=python-3.0. svn path=/main/trunk/; revision=12632
* Remove redundant ConfigLoaderKlass.__iter__() method.Zac Medico2009-02-191-3/+0
| | | | svn path=/main/trunk/; revision=12631
* Implement UserDict.__contains__() and __iter__().Zac Medico2009-02-191-0/+6
| | | | svn path=/main/trunk/; revision=12630
* Implement a substitute for UserDict.UserDict so that code converted viaZac Medico2009-02-192-5/+44
| | | | | | | | 2to3 will run: http://bugs.python.org/issue2876 svn path=/main/trunk/; revision=12629
* In python-3.0, the UserDict.DictMixin class has been replaced byZac Medico2009-02-193-32/+132
| | | | | | | | | | | | | Mapping and MutableMapping from the collections module, but 2to3 doesn't currently account for this change: http://bugs.python.org/issue2876 As a workaround for the above issue, implement Mapping and MutableMapping classes as substitutes for UserDict.DictMixin so that code converted via 2to3 will run. svn path=/main/trunk/; revision=12628
* Set svn:keywords Id on all files.Zac Medico2009-02-1819-19/+19
| | | | svn path=/main/trunk/; revision=12626
* Make save_ebuild_env() filter NOCOLOR, and remove related code from ebuild.shZac Medico2009-02-182-13/+1
| | | | | | since that variable is not loaded from $T/environment anymore. svn path=/main/trunk/; revision=12625
* Call depgraph._dep_check_composite_db._clear_cache() insideZac Medico2009-02-181-1/+2
| | | | | | | depgraph._add_pkg() since _dep_check_composite_db._visible() is now affected by which packages are added to the graph. svn path=/main/trunk/; revision=12624
* Bug #253904 - Add a lookahead mechanism insideZac Medico2009-02-171-0/+14
| | | | | | | | depgraph._dep_check_composite_db._visible() which masks package choices that are likely to trigger slot conflicts. Thanks to Vlastimil Babka <caster@g.o> for the suggestion. svn path=/main/trunk/; revision=12623
* Fix grabfile_package() to preprocess atoms before passing them toZac Medico2009-02-171-1/+4
| | | | | | | isvalidatom() because isvalidatom() has gotten more strict since r12614. Thanks to ABCD for reporting. svn path=/main/trunk/; revision=12622
* Bug #259124 - Inside EbuildFetcher._start(), pass the NOCOLOR variable intoZac Medico2009-02-161-0/+4
| | | | | | the fetch environment, so that --color=n is respected. svn path=/main/trunk/; revision=12621
* unify code for unpacking of tar filesMike Frysinger2009-02-161-23/+13
| | | | svn path=/main/trunk/; revision=12620