portage.git
16 years agoAdd missing BinpkgFetcherAsync.registered attribute.
Zac Medico [Thu, 3 Jul 2008 04:10:30 +0000 (04:10 -0000)]
Add missing BinpkgFetcherAsync.registered attribute.

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

16 years agoMove post ebuild phase code (originally from spawnebuild) from
Zac Medico [Thu, 3 Jul 2008 03:49:06 +0000 (03:49 -0000)]
Move post ebuild phase code (originally from spawnebuild) from
EbuildExecuter.execute() to EbuildPhase._set_returncode().

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

16 years agoSplit out a SpawnProcess base class out of EbuildFetcherAsync.
Zac Medico [Thu, 3 Jul 2008 03:39:06 +0000 (03:39 -0000)]
Split out a SpawnProcess base class out of  EbuildFetcherAsync.

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

16 years agoUse stdout.write() instead of "print", for py3k compat.
Zac Medico [Thu, 3 Jul 2008 03:09:21 +0000 (03:09 -0000)]
Use stdout.write() instead of "print", for py3k compat.

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

16 years agoFix broken except statement. Thanks to hawking.
Zac Medico [Wed, 2 Jul 2008 22:44:03 +0000 (22:44 -0000)]
Fix broken except statement. Thanks to hawking.

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

16 years agoFix EbuildBuildDir so that it works properly with binary packages.
Zac Medico [Wed, 2 Jul 2008 12:04:53 +0000 (12:04 -0000)]
Fix EbuildBuildDir so that it works properly with binary packages.

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

16 years agoHandle missing select.poll on interix by using select() to emulate a poll
Zac Medico [Wed, 2 Jul 2008 11:33:55 +0000 (11:33 -0000)]
Handle missing select.poll on interix by using select() to emulate a poll
object.

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

16 years agoRemove $PORTAGE_BUILDDIR locking from portage.pkgmerge() and use
Zac Medico [Wed, 2 Jul 2008 08:21:20 +0000 (08:21 -0000)]
Remove $PORTAGE_BUILDDIR locking from portage.pkgmerge() and use
an instance of EbuildBuildDir instead.

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

16 years agoSplit out a SubProcess base class for EbuildFetcherAsync, EbuildPhase,
Zac Medico [Wed, 2 Jul 2008 08:07:38 +0000 (08:07 -0000)]
Split out a SubProcess base class for EbuildFetcherAsync, EbuildPhase,
and BinpkgFetcherAsync.

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

16 years agoPy3k compatibility patch by Ali Polatel <hawking@g.o>.
Zac Medico [Wed, 2 Jul 2008 07:50:54 +0000 (07:50 -0000)]
Py3k compatibility patch by Ali Polatel <hawking@g.o>.
Don't use the format raise Exception, "string"

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

16 years agoFix EbuildBuild.execute() to return os.EX_OK on success.
Zac Medico [Wed, 2 Jul 2008 06:45:00 +0000 (06:45 -0000)]
Fix EbuildBuild.execute() to return os.EX_OK on success.

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

16 years agoFix inverted buildpkgonly logic.
Zac Medico [Wed, 2 Jul 2008 02:09:56 +0000 (02:09 -0000)]
Fix inverted buildpkgonly logic.

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

16 years agoSplit out a Binpkg class from code inside Scheduler._execute_task().
Zac Medico [Wed, 2 Jul 2008 02:01:41 +0000 (02:01 -0000)]
Split out a Binpkg class from code inside Scheduler._execute_task().

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

16 years agoRemove debugging code from the previous commit.
Zac Medico [Wed, 2 Jul 2008 01:15:44 +0000 (01:15 -0000)]
Remove debugging code from the previous commit.

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

16 years ago* Rename existing EbuildBuild class to EbuildExecuter.
Zac Medico [Wed, 2 Jul 2008 01:13:15 +0000 (01:13 -0000)]
* Rename existing EbuildBuild class to EbuildExecuter.
* Split more code out of Scheduler._execute_task() and use it to make
  a more comprehensive EbuildBuild class.

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

16 years agoPy3k compatibility patch #6 by Ali Polatel <hawking@g.o>.
Zac Medico [Tue, 1 Jul 2008 12:55:49 +0000 (12:55 -0000)]
Py3k compatibility patch #6 by Ali Polatel <hawking@g.o>.
Replace dict.has_key() calls with "in" and "not in" operators.

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

16 years agoPy3k compatibility patch #5 by Ali Polatel <hawking@g.o>.
Zac Medico [Tue, 1 Jul 2008 12:53:07 +0000 (12:53 -0000)]
Py3k compatibility patch #5 by Ali Polatel <hawking@g.o>.
Replace dict.has_key() calls with "in" and "not in" operators.

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

16 years agoPy3k compatibility patch #4 by Ali Polatel <hawking@g.o>.
Zac Medico [Tue, 1 Jul 2008 12:50:41 +0000 (12:50 -0000)]
Py3k compatibility patch #4 by Ali Polatel <hawking@g.o>.
Replace dict.has_key() calls with "in" and "not in" operators.

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

16 years agoPy3k compatibility patch #3 by Ali Polatel <hawking@g.o>.
Zac Medico [Tue, 1 Jul 2008 12:48:57 +0000 (12:48 -0000)]
Py3k compatibility patch #3 by Ali Polatel <hawking@g.o>.
Replace dict.has_key() calls with "in" and "not in" operators.

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

16 years agoPy3k compatibility patch #2 by Ali Polatel <hawking@g.o>.
Zac Medico [Tue, 1 Jul 2008 12:42:15 +0000 (12:42 -0000)]
Py3k compatibility patch #2 by Ali Polatel <hawking@g.o>.
Replace dict.has_key() calls with "in" and "not in" operators.

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

16 years agoPy3k compatibility patch #1 by Ali Polatel <hawking@g.o>.
Zac Medico [Tue, 1 Jul 2008 12:38:49 +0000 (12:38 -0000)]
Py3k compatibility patch #1 by Ali Polatel <hawking@g.o>.
Replace dict.has_key() calls with "in" and "not in" operators..

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

16 years agoAdd a "prefix" keyword parameter to slot_dict_class() which controls the
Zac Medico [Tue, 1 Jul 2008 10:11:10 +0000 (10:11 -0000)]
Add a "prefix" keyword parameter to slot_dict_class() which controls the
prefix used when mapping attribute names from keys. Use this to change
the syntax from files["foo"] to files.foo (it's fewer characters to look
at).

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

16 years agoAdd a new BinpkgFetcherAsync class and use it to implement parellel-fetch
Zac Medico [Tue, 1 Jul 2008 09:47:32 +0000 (09:47 -0000)]
Add a new BinpkgFetcherAsync class and use it to implement parellel-fetch
for --getbinpkg.

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

16 years agoNever do realpath() on an empty string for portdbapi.porttree_root since
Zac Medico [Tue, 1 Jul 2008 08:43:10 +0000 (08:43 -0000)]
Never do realpath() on an empty string for portdbapi.porttree_root since
otherwise it can evaluate to $CWD which leads to undesireable results.

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

16 years agoAlso avoid sandbox violations in PreservedLibsRegistry.store(), for running
Zac Medico [Tue, 1 Jul 2008 08:29:41 +0000 (08:29 -0000)]
Also avoid sandbox violations in PreservedLibsRegistry.store(), for running
portage inside ebuild phases.

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

16 years agoHandle potential errors in PreservedLibsRegistry.store() now that it can
Zac Medico [Tue, 1 Jul 2008 08:24:07 +0000 (08:24 -0000)]
Handle potential errors in PreservedLibsRegistry.store() now that it can
be called via pruneNonExisting(), due to things such as portageq calls
where the user may not have write permission to the registry.

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

16 years agoSplit out a write_contents() function and a vardbapi.removeFromContents()
Zac Medico [Tue, 1 Jul 2008 08:10:17 +0000 (08:10 -0000)]
Split out a write_contents() function and a vardbapi.removeFromContents()
function. This is refactoring of code from the blocker file collision
contents handling in dblink.treewalk(). Also, there is a new
dblink._match_contents() method derived from isowner(). It returns the
exact path from the contents file that matches the given path, regardless
of path differences due to things such as symlinks.

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

16 years agoadd a call to pruneNonExisting() at the end of dbapi.vartree.PreservedLibsRegistry...
Zac Medico [Tue, 1 Jul 2008 05:22:57 +0000 (05:22 -0000)]
add a call to pruneNonExisting() at the end of dbapi.vartree.PreservedLibsRegistry.__init__()

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

16 years agoFix typo.
Zac Medico [Mon, 30 Jun 2008 22:20:35 +0000 (22:20 -0000)]
Fix typo.

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

16 years agoBug #230249 - Disable the "ebuild.notadded" check when not in commit mode and
Zac Medico [Mon, 30 Jun 2008 22:18:46 +0000 (22:18 -0000)]
Bug #230249 - Disable the "ebuild.notadded" check when not in commit mode and
running `svn list` and `svn status` calls in every package dir will be too
expensive.

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

16 years agoBug #230245 - Use os.path.basename() on paths returned from `svn list`
Zac Medico [Mon, 30 Jun 2008 21:54:20 +0000 (21:54 -0000)]
Bug #230245 - Use os.path.basename() on paths returned from `svn list`
and `svn status`.

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

16 years agoBug #230245 - Pass the correct directory when calling `snv list` and
Zac Medico [Mon, 30 Jun 2008 21:51:19 +0000 (21:51 -0000)]
Bug #230245 - Pass the correct directory when calling `snv list` and
`svn status` since repoman supports category-level and repo-level
commits.

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

16 years agoAdd "(no inline comments)" to qualify "comments begin with #" statements.
Zac Medico [Mon, 30 Jun 2008 21:13:14 +0000 (21:13 -0000)]
Add "(no inline comments)" to qualify "comments begin with #" statements.

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

16 years agoClear the self._task_queue to avoid duplicate parallel-fetch tasks
Zac Medico [Mon, 30 Jun 2008 12:46:29 +0000 (12:46 -0000)]
Clear the self._task_queue to avoid duplicate parallel-fetch tasks
in --keep-going mode.

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

16 years agoReimplement parallel-fetch by spawning the `ebuild fetch` command for each
Zac Medico [Mon, 30 Jun 2008 12:08:16 +0000 (12:08 -0000)]
Reimplement parallel-fetch by spawning the `ebuild fetch` command for each
ebuild. The benefit of using this approach is that it can be integrated
together with parallel build scheduling that's planned. Parallel-fetch
support for binhost is not implemented yet, though it worked previously.

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

16 years agoAvoid python-2.6 deprecation warnings for md5 and sha modules by trying
Zac Medico [Mon, 30 Jun 2008 03:18:07 +0000 (03:18 -0000)]
Avoid python-2.6 deprecation warnings for md5 and sha modules by trying
to import hashlib first and then falling back to the deprecated modules
if necessary. Thanks to ColdWind for reporting.

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

16 years agoRename the MergeTask class to Scheduler.
Zac Medico [Mon, 30 Jun 2008 02:34:16 +0000 (02:34 -0000)]
Rename the MergeTask class to Scheduler.

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

16 years ago* Tweak conditionals in doebuild() to fix emerge --fetch breakage reported
Zac Medico [Mon, 30 Jun 2008 00:18:56 +0000 (00:18 -0000)]
* Tweak conditionals in doebuild() to fix emerge --fetch breakage reported
  by Arfrever.

* Change a couple EMERGE_FROM conditionals to use the "returnpid" parameter
  instead.

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

16 years agoCentralize select.poll() event handling in MergeTask._schedule(). This will
Zac Medico [Sun, 29 Jun 2008 17:27:37 +0000 (17:27 -0000)]
Centralize select.poll() event handling in MergeTask._schedule(). This will
allow the parent process to handle output of multiple child processes
running in parllel.

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

16 years agoAdd EMERGE_FROM to the blacklisted vars in the config constructor.
Zac Medico [Sun, 29 Jun 2008 15:08:37 +0000 (15:08 -0000)]
Add EMERGE_FROM to the blacklisted vars in the config constructor.

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

16 years ago * Add "fd_pipes" and "returnpid" parameters to doebuild() and pass
Zac Medico [Sun, 29 Jun 2008 14:51:05 +0000 (14:51 -0000)]
 * Add "fd_pipes" and "returnpid" parameters to doebuild() and pass
   these into spawn calls, enabling ebuild processes to execute
   asynchronously.

 * Add a EbuildPhase class that's derived from the pty logging code
   inside portage.spawn().

 * Integrate post-phase code from spawnebuild() into EbuildBuild.execute()
   so that it still gets called even though doebuild() calls execute
   asynchronously.

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

16 years agoIn EbuildBuild.execute(), call doebuild() separately for each phase since
Zac Medico [Sun, 29 Jun 2008 09:38:16 +0000 (09:38 -0000)]
In EbuildBuild.execute(), call doebuild() separately for each phase since
it will be easier to add asynchronous support to doebuild() if it's called
this way.

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

16 years agoSplit out a _check_build_log() function from spawnebuild().
Zac Medico [Sun, 29 Jun 2008 08:50:36 +0000 (08:50 -0000)]
Split out a _check_build_log() function from spawnebuild().

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

16 years agoSplit out a _post_src_install_uid_fix() function from spawnebuild().
Zac Medico [Sun, 29 Jun 2008 08:23:17 +0000 (08:23 -0000)]
Split out a _post_src_install_uid_fix() function from spawnebuild().

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

16 years agoSplit out a _spawn_misc_sh() function from spawnebuild().
Zac Medico [Sun, 29 Jun 2008 08:09:58 +0000 (08:09 -0000)]
Split out a _spawn_misc_sh() function from spawnebuild().

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

16 years agoHandle invalid atoms inside depgraph._add_pkg_deps(), to avoid an
Zac Medico [Sun, 29 Jun 2008 06:46:13 +0000 (06:46 -0000)]
Handle invalid atoms inside depgraph._add_pkg_deps(), to avoid an
unhandled InvalidAtom exception from dep_expand() when matching
against the vardb.

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

16 years agoMove clean code, from the previous commit, from doebuild() to
Zac Medico [Sun, 29 Jun 2008 04:27:57 +0000 (04:27 -0000)]
Move clean code, from the previous commit, from doebuild() to
EbuildBuild.execute() where it fits better.

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

16 years agoInstead of calling the ebuild "clean" phase in MergeTask.merge(),
Zac Medico [Sun, 29 Jun 2008 03:13:17 +0000 (03:13 -0000)]
Instead of calling the ebuild "clean" phase in MergeTask.merge(),
move it inside doebuild() where it can be tied into the actionmap_deps
framework.

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

16 years agoSplit out an EbuildBuildDir class to handle locking of the build dir.
Zac Medico [Sun, 29 Jun 2008 01:43:13 +0000 (01:43 -0000)]
Split out an EbuildBuildDir class to handle locking of the build dir.

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

16 years agoHandle re.error exceptions raised from re.compile() when ACCEPT_CHOSTS
Zac Medico [Sat, 28 Jun 2008 23:54:43 +0000 (23:54 -0000)]
Handle re.error exceptions raised from re.compile() when ACCEPT_CHOSTS
is invalid. Thanks to solar for reporting.

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

16 years agoMake EbuildBinpkg delegate everything up to src_install() to
Zac Medico [Sat, 28 Jun 2008 23:32:58 +0000 (23:32 -0000)]
Make EbuildBinpkg delegate everything up to src_install() to
the EbuildBuild class.

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

16 years ago* Remove unused EbuildBuild.pretend attribute.
Zac Medico [Sat, 28 Jun 2008 22:38:51 +0000 (22:38 -0000)]
* Remove unused EbuildBuild.pretend attribute.
* Add TODO not about asynchronous execution.

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

16 years agoBug #229859 - Also add atom validation to match().
Zac Medico [Sat, 28 Jun 2008 22:14:25 +0000 (22:14 -0000)]
Bug #229859 - Also add atom validation to match().

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

16 years agoCopy portageq exit code validation from has_version() to best_version().
Zac Medico [Sat, 28 Jun 2008 21:58:02 +0000 (21:58 -0000)]
Copy portageq exit code validation from has_version() to best_version().

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

16 years agoBug #229859 - Make portageq check atom validity when has_version() and
Zac Medico [Sat, 28 Jun 2008 21:54:31 +0000 (21:54 -0000)]
Bug #229859 - Make portageq check atom validity when has_version() and
best_version() are called from inside the ebuild environment.

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

16 years agoUse the EbuildMerge class instead of portage.merge().
Zac Medico [Sat, 28 Jun 2008 09:16:08 +0000 (09:16 -0000)]
Use the EbuildMerge class instead of portage.merge().

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

16 years agoSplit out a PackageUninstall class.
Zac Medico [Sat, 28 Jun 2008 09:08:24 +0000 (09:08 -0000)]
Split out a PackageUninstall class.

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

16 years ago* Split out an EbuildBinpkg class.
Zac Medico [Sat, 28 Jun 2008 07:00:45 +0000 (07:00 -0000)]
* Split out an EbuildBinpkg class.
* Remove unused EbuildBuild.ldpath_mtimes attribute.

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

16 years agoSplit out an EbuildBuild class.
Zac Medico [Sat, 28 Jun 2008 06:10:23 +0000 (06:10 -0000)]
Split out an EbuildBuild class.

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

16 years agoFix typo.
Zac Medico [Sat, 28 Jun 2008 06:06:10 +0000 (06:06 -0000)]
Fix typo.

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

16 years agoSplit out an EbuildMerge class.
Zac Medico [Sat, 28 Jun 2008 05:24:13 +0000 (05:24 -0000)]
Split out an EbuildMerge class.

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

16 years ago * Split out a BinpkgMerge class.
Zac Medico [Sat, 28 Jun 2008 05:04:19 +0000 (05:04 -0000)]
 * Split out a BinpkgMerge class.
 * Fix typos in _get_hash_key() methods.

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

16 years agoSplit out a BinpkgFetcher class.
Zac Medico [Sat, 28 Jun 2008 04:20:53 +0000 (04:20 -0000)]
Split out a BinpkgFetcher class.

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

16 years agoSplit out an EbuildFetcher class.
Zac Medico [Sat, 28 Jun 2008 02:53:36 +0000 (02:53 -0000)]
Split out an EbuildFetcher class.

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

16 years agoSplit the MergeTask._merge() method into 3 smaller methods. The new
Zac Medico [Sat, 28 Jun 2008 01:45:14 +0000 (01:45 -0000)]
Split the MergeTask._merge() method into 3 smaller methods. The new
methods are _execute_task() and _post_merge().

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

16 years agoBug #226307 - Copy come code from depgraph._iter_atoms_for_pkg() that
Zac Medico [Sat, 28 Jun 2008 01:01:42 +0000 (01:01 -0000)]
Bug #226307 - Copy come code from depgraph._iter_atoms_for_pkg() that
was used to solve bug #218854, and use it inside unmerge() when
matching sets to packages.

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

16 years agoFix depgraph.break_refs() to work with DependencyArg instances (or anything
Zac Medico [Fri, 27 Jun 2008 23:42:29 +0000 (23:42 -0000)]
Fix depgraph.break_refs() to work with DependencyArg instances (or anything
else that may have a "root_config" attribute).

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

16 years agoRemove the MergeTask._blocker_db attribute since it can just be a
Zac Medico [Fri, 27 Jun 2008 23:34:55 +0000 (23:34 -0000)]
Remove the MergeTask._blocker_db attribute since it can just be a
local variable.

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

16 years agoBreak references from Package instances in the digraph before passing
Zac Medico [Fri, 27 Jun 2008 23:17:56 +0000 (23:17 -0000)]
Break references from Package instances in the digraph before passing
it into the MergeTask constructor.

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

16 years agoPass the digraph into the MergeTask constructor. It's currently unused
Zac Medico [Fri, 27 Jun 2008 22:53:08 +0000 (22:53 -0000)]
Pass the digraph into the MergeTask constructor. It's currently unused
but it will be useful for parallel scheduling.

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

16 years agoFix typo.
Zac Medico [Fri, 27 Jun 2008 22:44:01 +0000 (22:44 -0000)]
Fix typo.

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

16 years agoAdd documentation for the new --keep-going option.
Zac Medico [Fri, 27 Jun 2008 22:26:22 +0000 (22:26 -0000)]
Add documentation for the new --keep-going option.

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

16 years agoGenerate and log eerror messages for any packages that need to be dropped
Zac Medico [Fri, 27 Jun 2008 20:58:40 +0000 (20:58 -0000)]
Generate and log eerror messages for any packages that need to be dropped
due to unsatisfied dependencies when --keep-going is enabled.

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

16 years agoCall clear_caches() after the depgraph is out of scope, in MergeTask.merge().
Zac Medico [Fri, 27 Jun 2008 08:04:12 +0000 (08:04 -0000)]
Call clear_caches() after the depgraph is out of scope, in MergeTask.merge().

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

16 years agoBug #12768 - Add a --keep-going option. This uses the same resume_depgraph()
Zac Medico [Fri, 27 Jun 2008 07:49:57 +0000 (07:49 -0000)]
Bug #12768 - Add a --keep-going option. This uses the same resume_depgraph()
function that's called for emerge --resume operations. Given the remaining
tasks, depedencies are recalculated and any tasks with unsatisfied
dependencies are automatically dropped.

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

16 years agoUse bool() to simplify ObjectProxy.__nonzero__().
Zac Medico [Fri, 27 Jun 2008 06:44:29 +0000 (06:44 -0000)]
Use bool() to simplify ObjectProxy.__nonzero__().

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

16 years agoSplit the --skipfirst code into a resume_depgraph() function that will
Zac Medico [Fri, 27 Jun 2008 04:00:48 +0000 (04:00 -0000)]
Split the --skipfirst code into a resume_depgraph() function that will
be useful for implementing a --keep-going option (bug #12768).

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

16 years agoFor brevity, and consistency with pkgcore, rename "all-installed" to just
Zac Medico [Thu, 26 Jun 2008 22:05:00 +0000 (22:05 -0000)]
For brevity, and consistency with pkgcore, rename "all-installed" to just
"installed". Thanks to ferringb for the suggestion.

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

16 years agoCall use_reduce() with matchall=1 when checking depstrings. Otherwise it's
Zac Medico [Thu, 26 Jun 2008 21:36:17 +0000 (21:36 -0000)]
Call use_reduce() with matchall=1 when checking depstrings. Otherwise it's
possible for invalid deps to be ignored. Thanks to grobian for reporting.

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

16 years agoAdd "PATH" to the set of allowed pacakge metadata keys for the PackageIndex.
Zac Medico [Thu, 26 Jun 2008 21:16:04 +0000 (21:16 -0000)]
Add "PATH" to the set of allowed pacakge metadata keys for the PackageIndex.

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

16 years agoFix the PermissionDenied message for color.map.
Zac Medico [Thu, 26 Jun 2008 19:34:02 +0000 (19:34 -0000)]
Fix the PermissionDenied message for color.map.

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

16 years ago* Remove PORTAGE_LEGACY_GLOBALS hack for portage import since late
Zac Medico [Thu, 26 Jun 2008 19:28:29 +0000 (19:28 -0000)]
* Remove PORTAGE_LEGACY_GLOBALS hack for portage import since late
  initialization of portage.settings (via ObjectProxy) allows us
  to rely on being able to access the portage.exception namespace
  before portage.settings is initialized.

* Use portage.settings["ROOT"] instead of portage.root to avoid
  potential ObjectProxy compatibility issues.

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

16 years agoUse settings["ROOT"] at the beginning of env_update() to avoid breakage
Zac Medico [Thu, 26 Jun 2008 18:49:14 +0000 (18:49 -0000)]
Use settings["ROOT"] at the beginning of env_update() to avoid breakage
due to "root" being an ObjectProxy instance.

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

16 years agoHandle KeyError from aux_get() inside dbapi._iter_match_slot() and
Zac Medico [Thu, 26 Jun 2008 18:24:34 +0000 (18:24 -0000)]
Handle KeyError from aux_get() inside dbapi._iter_match_slot() and
_iter_match_use(). Thanks to grobian for reporting.

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

16 years agochange default name of EverythingSet to @all-installed (bug #229467)
Marius Mauch [Thu, 26 Jun 2008 17:11:52 +0000 (17:11 -0000)]
change default name of EverythingSet to @all-installed (bug #229467)

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

16 years agoAlso use a separate proxy type for portage.mtimedb since it's independent
Zac Medico [Thu, 26 Jun 2008 06:43:47 +0000 (06:43 -0000)]
Also use a separate proxy type for portage.mtimedb since it's independent
from the portdb and settings.

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

16 years agoUse a separate proxy type to trigger portage.portdb initialization separately
Zac Medico [Thu, 26 Jun 2008 06:01:30 +0000 (06:01 -0000)]
Use a separate proxy type to trigger portage.portdb initialization separately
from the rest of the legacy global variables. This can be useful since
sometimes the other variables are needed while the portdb is not.

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

16 years agoImplement lazy initialization of global "portdb", "settings" and other
Zac Medico [Thu, 26 Jun 2008 05:28:04 +0000 (05:28 -0000)]
Implement lazy initialization of global "portdb", "settings" and other
variables that pollute the portage module. This works by initializing
the global variables with dummy "proxy" objects that serve as a means
to trigger lazy initialization. As soon as the first attribute access
or method call occurs on one of the proxy objects, it causes all the
proxy objects to be replaced with the real ones.

It's possible for an unsupported attribute access or method call on a
proxy object to trigger an error, leading to breakage. However, hopefully
these such corner cases will negligible (only time will tell).

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

16 years agoMake PackageIndex use SlotDict for package metadata storage. The set of
Zac Medico [Thu, 26 Jun 2008 00:49:10 +0000 (00:49 -0000)]
Make PackageIndex use SlotDict for package metadata storage. The set of
allowed keys is passed into the PackageIndex constructor (normal dict
instances will be used if the set of keys is not passed in for some
reason). A SlotDict.allowed_keys attribute now provides access to a
frozenset of allowed keys.

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

16 years agoUse SlotDict where appropriate in binarytree._populate().
Zac Medico [Wed, 25 Jun 2008 23:10:28 +0000 (23:10 -0000)]
Use SlotDict where appropriate in binarytree._populate().

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

16 years agoFix typo.
Zac Medico [Wed, 25 Jun 2008 22:54:17 +0000 (22:54 -0000)]
Fix typo.

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

16 years agoAdd docstring to slot_dict_class().
Zac Medico [Wed, 25 Jun 2008 22:49:32 +0000 (22:49 -0000)]
Add docstring to slot_dict_class().

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

16 years agoFix typo.
Zac Medico [Wed, 25 Jun 2008 22:39:42 +0000 (22:39 -0000)]
Fix typo.

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

16 years agoFix KeyError constructor style.
Zac Medico [Wed, 25 Jun 2008 22:39:00 +0000 (22:39 -0000)]
Fix KeyError constructor style.

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

16 years agoFix indentation.
Zac Medico [Wed, 25 Jun 2008 22:37:43 +0000 (22:37 -0000)]
Fix indentation.

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

16 years agoAdd a generic portage.cache.mappings.slot_dict_class() function which
Zac Medico [Wed, 25 Jun 2008 22:36:19 +0000 (22:36 -0000)]
Add a generic portage.cache.mappings.slot_dict_class() function which
generates mapping classes that behave similar to a dict but store
values as object attributes that are allocated via __slots__. Instances
of these objects have a smaller memory footprint than a normal dict object.
These classes are used to reduce the memory footprint of the dbapi.aux_get()
caches and the Package.metadata attribute.

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

16 years agoSwap out the whole Package.root_config attribute inside depgraph.break_refs().
Zac Medico [Wed, 25 Jun 2008 20:47:38 +0000 (20:47 -0000)]
Swap out the whole Package.root_config attribute inside depgraph.break_refs().

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

16 years agoClarify EverythingSet.description a bit. Thanks to Necoro.
Zac Medico [Wed, 25 Jun 2008 20:08:35 +0000 (20:08 -0000)]
Clarify EverythingSet.description a bit. Thanks to Necoro.

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

16 years agoClarify EverythingSet.description a bit. Thanks to Necoro.
Zac Medico [Wed, 25 Jun 2008 20:06:11 +0000 (20:06 -0000)]
Clarify EverythingSet.description a bit. Thanks to Necoro.

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

16 years agoFix Atom -> str breakage in depgraph.saveNomergeFavorites(). Thanks to
Zac Medico [Wed, 25 Jun 2008 19:45:07 +0000 (19:45 -0000)]
Fix Atom -> str breakage in depgraph.saveNomergeFavorites(). Thanks to
grobian and darsiide.

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