portage.git
16 years agoAdd a CompositeTask._assert_current() method that asynchronous callbacks
Zac Medico [Sun, 6 Jul 2008 00:44:00 +0000 (00:44 -0000)]
Add a CompositeTask._assert_current() method that asynchronous callbacks
can use detect possible bugs.

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

16 years agoFix typo in xterm titles total package count which causes it to show the
Zac Medico [Sun, 6 Jul 2008 00:01:31 +0000 (00:01 -0000)]
Fix typo in xterm titles total package count which causes it to show the
current package instead. Thanks to Arfrever for this patch.

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

16 years ago* Fix AsynchronousTask.poll() to call _wait_hook() when necessary.
Zac Medico [Sat, 5 Jul 2008 23:17:01 +0000 (23:17 -0000)]
* Fix AsynchronousTask.poll() to call _wait_hook() when necessary.
* Use the default poll() and cancel() implementations for BinpkgVerifier.

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

16 years agoCall _wait_hook() from poll() if the wait call occurs there.
Zac Medico [Sat, 5 Jul 2008 14:02:13 +0000 (14:02 -0000)]
Call _wait_hook() from poll() if the wait call occurs there.

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

16 years agoCorrect TaskSequence docstring to refer to the addExitListener() method.
Zac Medico [Sat, 5 Jul 2008 13:44:19 +0000 (13:44 -0000)]
Correct TaskSequence docstring to refer to the addExitListener() method.

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

16 years agoThanks to Ali Polatel <hawking@g.o> for this patch to fix broken indentation.
Zac Medico [Sat, 5 Jul 2008 13:34:21 +0000 (13:34 -0000)]
Thanks to Ali Polatel <hawking@g.o> for this patch to fix broken indentation.

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

16 years agoSplit out common code from CompositeTask and EbuildExecuter into a new
Zac Medico [Sat, 5 Jul 2008 13:19:01 +0000 (13:19 -0000)]
Split out common code from CompositeTask and EbuildExecuter into a new
CompositeTask class and rename the old CompositeTask class to TaskSequence.

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

16 years agoMake EbuildExecuter inherit from AsynchronousTask.
Zac Medico [Sat, 5 Jul 2008 13:06:47 +0000 (13:06 -0000)]
Make EbuildExecuter inherit from AsynchronousTask.

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

16 years agoFix CompositeTask.cancel() so that it's safe to call when there is no
Zac Medico [Sat, 5 Jul 2008 12:36:40 +0000 (12:36 -0000)]
Fix CompositeTask.cancel() so that it's safe to call when there is no
running task.

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

16 years agoAdd a new CompositeTask class which can be used to combine separate
Zac Medico [Sat, 5 Jul 2008 12:21:43 +0000 (12:21 -0000)]
Add a new CompositeTask class which can be used to combine separate
AsynchronousTask instances into a single instance. The CompositeTask
instance used task exit listeners as a means to (asynchronously) trigger
progression from one subtask to the next. This technique is used to
group together all the ebuild phases executed by EbuildExecuter, and
should be useful for grouping many more sets of tasks into similar
composite tasks.

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

16 years agoAdd async support to EbuildBinpkg by making it inherit from EbuildPhase.
Zac Medico [Sat, 5 Jul 2008 08:52:46 +0000 (08:52 -0000)]
Add async support to EbuildBinpkg by making it inherit from EbuildPhase.

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

16 years agoUse the EbuildPhase class to execute the "clean" phase asynchronously.
Zac Medico [Sat, 5 Jul 2008 08:08:09 +0000 (08:08 -0000)]
Use the EbuildPhase class to execute the "clean" phase asynchronously.

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

16 years agoRemove unused variable.
Zac Medico [Sat, 5 Jul 2008 07:36:58 +0000 (07:36 -0000)]
Remove unused variable.

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

16 years agoRename BinpkgFetcherAsync class to BinpkgFetcher and use it to replace the
Zac Medico [Sat, 5 Jul 2008 07:34:25 +0000 (07:34 -0000)]
Rename BinpkgFetcherAsync class to BinpkgFetcher and use it to replace the
older class with the same name

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

16 years ago* Implement a new binarytree.digestCheck() method and use it to check
Zac Medico [Sat, 5 Jul 2008 07:18:31 +0000 (07:18 -0000)]
* Implement a new binarytree.digestCheck() method and use it to check
  digests for binary packages.

* Split out a AsynchronousTask base class from SubProcess.

* Derive a new BinpkgVerifier class from AsynchronousTask. Even though
  this is not really asynchronous yet, it can fake the interface by
  doing everything in the start() method.

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

16 years agoMake Binpkg inherit from EbuildBuildDir since it's going to hold
Zac Medico [Fri, 4 Jul 2008 22:49:04 +0000 (22:49 -0000)]
Make Binpkg inherit from EbuildBuildDir since it's going to hold
the build dir lock while it runs asynchronously.

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

16 years agoMake EbuildBuild inherit from EbuildBuildDir since it's going to hold
Zac Medico [Fri, 4 Jul 2008 22:39:57 +0000 (22:39 -0000)]
Make EbuildBuild inherit from EbuildBuildDir since it's going to hold
the build dir lock while it runs asynchronously.

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

16 years agoConvert EbuildFetcher to an asynchronous interface:
Zac Medico [Fri, 4 Jul 2008 22:19:18 +0000 (22:19 -0000)]
Convert EbuildFetcher to an asynchronous interface:
* Rename EbuildFetcher to EbuildFetchPretend.
* Rename EbuildFetcherAsync to EbuildFetcher.

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

16 years agoTODO: For parallel scheduling, everything in MergeListItem needs
Zac Medico [Fri, 4 Jul 2008 21:46:05 +0000 (21:46 -0000)]
TODO: For parallel scheduling, everything in MergeListItem needs
asynchronous execution support (start, poll, and wait methods).

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

16 years agoAdd a PollConstants class to serve as a layer of indirection for accessing
Zac Medico [Fri, 4 Jul 2008 21:27:10 +0000 (21:27 -0000)]
Add a PollConstants class to serve as a layer of indirection for accessing
select.POLL* attributes which do not exist on interix. Thanks to grobian
for reporting.

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

16 years agoBug #230525 - Work around ObjectProxy breakage in `portageq vdb_path`.
Zac Medico [Fri, 4 Jul 2008 20:57:24 +0000 (20:57 -0000)]
Bug #230525 - Work around ObjectProxy breakage in `portageq vdb_path`.

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

16 years agoIn --keep-going mode, display the new merge list when appropriate.
Zac Medico [Fri, 4 Jul 2008 13:58:30 +0000 (13:58 -0000)]
In --keep-going mode, display the new merge list when appropriate.

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

16 years agoSplit a _main_loop() method out of Scheduler._merge().
Zac Medico [Fri, 4 Jul 2008 13:20:13 +0000 (13:20 -0000)]
Split a _main_loop() method out of Scheduler._merge().

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

16 years agoSplit out a Scheduler._execute_pkg() method from _merge().
Zac Medico [Fri, 4 Jul 2008 11:12:01 +0000 (11:12 -0000)]
Split out a Scheduler._execute_pkg() method from _merge().

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

16 years agoRename PollSelectFallback to PollSelectAdapter.
Zac Medico [Fri, 4 Jul 2008 10:48:41 +0000 (10:48 -0000)]
Rename PollSelectFallback to PollSelectAdapter.

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

16 years ago* Split out a MergeListItem class from Scheduler._execute_task().
Zac Medico [Fri, 4 Jul 2008 10:45:41 +0000 (10:45 -0000)]
* Split out a MergeListItem class from Scheduler._execute_task().
* Remove Scheduler._execute_task() and migrate some of it's code
  to Scheduler._merge().
* Fix _world_atom() so that it doesn't add an atom in --oneshot
  mode or similar.

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

16 years agoFix broken references to portage.exception.
Zac Medico [Fri, 4 Jul 2008 10:15:37 +0000 (10:15 -0000)]
Fix broken references to portage.exception.

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

16 years agoCreate a Scheduler._task_queues attribute which has "build" and "prefetch"
Zac Medico [Fri, 4 Jul 2008 07:09:00 +0000 (07:09 -0000)]
Create a Scheduler._task_queues attribute which has "build" and "prefetch"
queues. The build queue is currently unused and the prefetch queue is used
for parallel fetch.

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

16 years agoChange the way the way things that have to call the scheduler interact
Zac Medico [Fri, 4 Jul 2008 06:15:43 +0000 (06:15 -0000)]
Change the way the way things that have to call the scheduler interact
with it:

 * Return a unique integer id from scheduler.register(), to be passed back
   into other scheduler methods.

 * Control handler unregistration with the handler's return value, like
   some other frameworks do for similar callbacks.

 * Add a SpawnProcess.reg_id attribute to store the id returned from
   scheduler.register()

 * Pass the SpawnProcess.reg_id value into scheduler.schedule() calls,
   so the scheduler knows to return when the callback referred to by
   the given id unregisters itself by returning False.

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

16 years agoWhen logging is disabled, make the EbuildPhase create a dummy pipe to provide
Zac Medico [Fri, 4 Jul 2008 03:03:44 +0000 (03:03 -0000)]
When logging is disabled, make the EbuildPhase create a dummy pipe to provide
a file descriptor that the scheduler can use to monitor the process from
inside a poll() loop.

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

16 years agoImport portage before trying to access portage.exception for exception
Zac Medico [Fri, 4 Jul 2008 00:46:07 +0000 (00:46 -0000)]
Import portage before trying to access portage.exception for exception
handling.

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

16 years ago* Split out a SequentialTaskQueue class to encapsulate the parallel-fetch
Zac Medico [Fri, 4 Jul 2008 00:11:03 +0000 (00:11 -0000)]
* Split out a SequentialTaskQueue class to encapsulate the parallel-fetch
  prefetcher queue.

* Fix broken return value status handling in Scheduler.merge().

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

16 years agoBug #230469 - Implement non-blocking distlocks for --fetchonly. This adds
Zac Medico [Thu, 3 Jul 2008 22:48:21 +0000 (22:48 -0000)]
Bug #230469 - Implement non-blocking distlocks for --fetchonly. This adds
a "flags" keyword parameter to the portage.locks.lock() function. Default
is flags=0. If flags contains os.O_NONBLOCK then lock() will raise
portage.exception.TryAgain instead of blocking. This new flags parameter
is used to implement non-blocking distlocks in fetch() when fetchonly
mode is enabled.

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

16 years agoFix typo.
Zac Medico [Thu, 3 Jul 2008 21:53:37 +0000 (21:53 -0000)]
Fix typo.

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

16 years agoBug #230579 - Handle EOFError raised from cPickle.load() in
Zac Medico [Thu, 3 Jul 2008 21:52:56 +0000 (21:52 -0000)]
Bug #230579 - Handle EOFError raised from cPickle.load() in
PreservedLibsRegistry.load().

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

16 years agoSplit out a _create_prefetcher() method from _add_prefetchers().
Zac Medico [Thu, 3 Jul 2008 12:04:45 +0000 (12:04 -0000)]
Split out a _create_prefetcher() method from _add_prefetchers().

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

16 years agoRemove old unused vars inside _execute_task() and fix code not to use the
Zac Medico [Thu, 3 Jul 2008 11:42:06 +0000 (11:42 -0000)]
Remove old unused vars inside _execute_task() and fix code not to use the
old vars.

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

16 years agoSplit logging and world atom code out of Scheduler._execute() task, and
Zac Medico [Thu, 3 Jul 2008 11:17:43 +0000 (11:17 -0000)]
Split logging and world atom code out of Scheduler._execute() task, and
trigger it inside EbuildPhase.execute().

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

16 years agoClean up Scheduler.merge() and split out a _save_resume_list() method.
Zac Medico [Thu, 3 Jul 2008 09:30:05 +0000 (09:30 -0000)]
Clean up Scheduler.merge() and split out a _save_resume_list() method.

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

16 years agoAdd a portage._disable_legacy_globals() function. This deletes the
Zac Medico [Thu, 3 Jul 2008 09:05:38 +0000 (09:05 -0000)]
Add a portage._disable_legacy_globals() function. This deletes the
ObjectProxy instances that are used for lazy initialization of legacy
global variables. The purpose of deleting them is to prevent new code
from referencing these deprecated variables. This allows the removal
of the PORTAGE_LEGACY_GLOBALS variable which used to serve the same
purpose.

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

16 years agoSplit out a _restart_if_necessary() method from Scheduler._merge().
Zac Medico [Thu, 3 Jul 2008 08:44:29 +0000 (08:44 -0000)]
Split out a _restart_if_necessary() method from Scheduler._merge().

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

16 years agoRemove unused BinpkgMerge class.
Zac Medico [Thu, 3 Jul 2008 08:17:09 +0000 (08:17 -0000)]
Remove unused BinpkgMerge class.

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

16 years agoRemove the Scheduler._post_merge() method, and create a new
Zac Medico [Thu, 3 Jul 2008 07:38:55 +0000 (07:38 -0000)]
Remove the Scheduler._post_merge() method, and create a new
_show_failed_fetches() method.

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

16 years agoSplit out a new _add_prefetchers() method from Scheduler._merge().
Zac Medico [Thu, 3 Jul 2008 07:04:44 +0000 (07:04 -0000)]
Split out a new _add_prefetchers() method from Scheduler._merge().

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

16 years agoSplit out a new _check_manifests() method from Scheduler._merge() since
Zac Medico [Thu, 3 Jul 2008 06:39:20 +0000 (06:39 -0000)]
Split out a new _check_manifests() method from Scheduler._merge() since
this method is not useful for parallel scheduling and any useful code needs
to be relocated.

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

16 years agoImplement asynchronous binary package extraction, so that the scheduler
Zac Medico [Thu, 3 Jul 2008 06:06:34 +0000 (06:06 -0000)]
Implement asynchronous binary package extraction, so that the scheduler
can run while a package is extracting in the background.

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

16 years agoMake BinpkgFetcherAsync inherit from SpawnProcess.
Zac Medico [Thu, 3 Jul 2008 04:24:42 +0000 (04:24 -0000)]
Make BinpkgFetcherAsync inherit from SpawnProcess.

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

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