portage.git
16 years agoAdd GENTOO_MIRRORS to the variables exported by EbuildFetcher. v2.2_rc2
Zac Medico [Wed, 23 Jul 2008 07:23:08 +0000 (07:23 -0000)]
Add GENTOO_MIRRORS to the variables exported by EbuildFetcher.

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

16 years agoMake --fetchonly disable background mode.
Zac Medico [Wed, 23 Jul 2008 05:46:05 +0000 (05:46 -0000)]
Make --fetchonly disable background mode.

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

16 years agoHandle UnsatisfiedResumeDep in Scheduler._calc_resume_list().
Zac Medico [Tue, 22 Jul 2008 15:02:42 +0000 (15:02 -0000)]
Handle UnsatisfiedResumeDep in Scheduler._calc_resume_list().

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

16 years agoUpdate --depclean and --prune, removing warnings about libraries since those
Zac Medico [Tue, 22 Jul 2008 13:29:14 +0000 (13:29 -0000)]
Update --depclean and --prune, removing warnings about libraries since those
are now automatically accounted for.

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

16 years agoIn dblink.unmerge(), redirect preserve-libs "!needed" messages to the log file
Zac Medico [Tue, 22 Jul 2008 12:24:53 +0000 (12:24 -0000)]
In dblink.unmerge(), redirect preserve-libs "!needed" messages to the log file
when in background mode.

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

16 years agoFix resume_depgraph() so that it doesn't raise an AssertionError due to
Zac Medico [Tue, 22 Jul 2008 06:39:31 +0000 (06:39 -0000)]
Fix resume_depgraph() so that it doesn't raise an AssertionError due to
unsatisfied PDEPEND.

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

16 years agoShow the number of failed packages in the status display.
Zac Medico [Tue, 22 Jul 2008 04:09:12 +0000 (04:09 -0000)]
Show the number of failed packages in the status display.

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

16 years agoRedirect build log eqawarn messages to the log file when in background mode.
Zac Medico [Tue, 22 Jul 2008 03:58:53 +0000 (03:58 -0000)]
Redirect build log eqawarn messages to the log file when in background mode.

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

16 years agoDisable "Installing" status messages when in --pretend or --buildpkgonly
Zac Medico [Tue, 22 Jul 2008 03:42:34 +0000 (03:42 -0000)]
Disable "Installing" status messages when in --pretend or --buildpkgonly
mode.

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

16 years agoMake --pretend disable background mode and imply --jobs=1.
Zac Medico [Tue, 22 Jul 2008 03:25:08 +0000 (03:25 -0000)]
Make --pretend disable background mode and imply --jobs=1.

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

16 years agoRedirect dblink._preserve_libs() messages to the log when in background mode.
Zac Medico [Tue, 22 Jul 2008 02:02:54 +0000 (02:02 -0000)]
Redirect dblink._preserve_libs() messages to the log when in background mode.

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

16 years agoAdjust status messages for --fetchonly mode.
Zac Medico [Tue, 22 Jul 2008 00:35:17 +0000 (00:35 -0000)]
Adjust status messages for --fetchonly mode.

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

16 years agoAdjust --fetchonly failure messages to work better with background mode.
Zac Medico [Tue, 22 Jul 2008 00:24:27 +0000 (00:24 -0000)]
Adjust --fetchonly failure messages to work better with background mode.

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

16 years agoFix --depclean/--prune to add lib providers and their dependencies to the
Zac Medico [Mon, 21 Jul 2008 23:15:37 +0000 (23:15 -0000)]
Fix --depclean/--prune to add lib providers and their dependencies to the
graph and create a new clean list when necessary. This completes the fix
for bug #230053.

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

16 years agoAdd initial lib awareness for --depclean and --prune. Currently it will simply
Zac Medico [Mon, 21 Jul 2008 13:19:50 +0000 (13:19 -0000)]
Add initial lib awareness for --depclean and --prune. Currently it will simply
bail out if the clean list contains a package that will cause link breakage
if removed. TODO: Calculate a new cleanlist instead of bailing out, and
implement a package set for rebuilding consumers.

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

16 years agoIn dblink.findProviders(), clone the "path" variable before extending it
Zac Medico [Mon, 21 Jul 2008 10:29:14 +0000 (10:29 -0000)]
In dblink.findProviders(), clone the "path" variable before extending it
since obviously it shouldn't grow each time that findProviders() is called.

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

16 years agoIn dblink._preserve_libs(), strip leading $ROOT from contents paths so that
Zac Medico [Mon, 21 Jul 2008 06:08:38 +0000 (06:08 -0000)]
In dblink._preserve_libs(), strip leading $ROOT from contents paths so that
it works when $ROOT != /.

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

16 years agoFix breakage in the depclean/prune unsatisfied deps handling.
Zac Medico [Mon, 21 Jul 2008 02:39:05 +0000 (02:39 -0000)]
Fix breakage in the depclean/prune unsatisfied deps handling.

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

16 years agoFix typo.
Zac Medico [Mon, 21 Jul 2008 02:29:16 +0000 (02:29 -0000)]
Fix typo.

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

16 years agoFor --depclean and --prune, eliminate duplicate graph creation code by re-using
Zac Medico [Mon, 21 Jul 2008 02:20:28 +0000 (02:20 -0000)]
For --depclean and --prune, eliminate duplicate graph creation code by re-using
the depgraph class to do it. The depgraph class was used in the past for this
purpose but back then it didn't handle USE flags correctly for installed
packages. Now it works fine.

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

16 years agoRedirect the 'Recording <pkg> in "world" favorites file...' message through
Zac Medico [Mon, 21 Jul 2008 00:26:13 +0000 (00:26 -0000)]
Redirect the 'Recording <pkg> in "world" favorites file...' message through
_status_msg().

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

16 years agoFix broken references to the old elog_modules namespace.
Zac Medico [Sun, 20 Jul 2008 22:30:04 +0000 (22:30 -0000)]
Fix broken references to the old elog_modules namespace.

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

16 years agoRedirect some more unmerge() output through writemsg_level() so that it can
Zac Medico [Sun, 20 Jul 2008 05:01:22 +0000 (05:01 -0000)]
Redirect some more unmerge() output through writemsg_level() so that it can
filtered out when in background mode.

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

16 years agoFix Scheduler emergelog() interaction to properly disable emergelog()
Zac Medico [Sun, 20 Jul 2008 02:38:09 +0000 (02:38 -0000)]
Fix Scheduler emergelog() interaction to properly disable emergelog()
xterm titles whenever the status display is enabled.

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

16 years ago* Clean up _schedule_tasks_imp() a bit.
Zac Medico [Sun, 20 Jul 2008 01:16:14 +0000 (01:16 -0000)]
* Clean up _schedule_tasks_imp() a bit.
* Make _task() access _background directly instead of as a parameter.

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

16 years agoMake PollScheduler._poll() add poll events to the stack instead of returning
Zac Medico [Sun, 20 Jul 2008 01:00:26 +0000 (01:00 -0000)]
Make PollScheduler._poll() add poll events to the stack instead of returning
them. This makes it more useful as a hook, allowing Scheduler._poll() to
safely call _schedule().

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

16 years agoMerge tasks currently run synchronously which makes it necessary to disable
Zac Medico [Sat, 19 Jul 2008 15:09:38 +0000 (15:09 -0000)]
Merge tasks currently run synchronously which makes it necessary to disable
auto_schedule on the merge queue in order to avoid excess recursion which
prevents tasks from being marked complete as soon as they should be.

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

16 years agoFix Scheduler._schedule_tasks_imp() so that it never indicates that there
Zac Medico [Sat, 19 Jul 2008 13:56:54 +0000 (13:56 -0000)]
Fix Scheduler._schedule_tasks_imp() so that it never indicates that there
are remaining tasks in cases when it's supposed to bail out due to a
package failure.

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

16 years agoCalling _schedule() from Scheduler._poll() is unsafe since the _schedule()
Zac Medico [Sat, 19 Jul 2008 13:22:56 +0000 (13:22 -0000)]
Calling _schedule() from Scheduler._poll() is unsafe since the _schedule()
call itself can consume poll events. Therefore, until a safe way exists,
don't do it.

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

16 years agoUse the memoized _choose_pkg() result to return earlier from
Zac Medico [Sat, 19 Jul 2008 12:30:53 +0000 (12:30 -0000)]
Use the memoized _choose_pkg() result to return earlier from
_schedule_tasks() when possible.

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

16 years agoWhen Scheduler._choose_pkg() is unable to find a package, memoize the result
Zac Medico [Sat, 19 Jul 2008 12:25:39 +0000 (12:25 -0000)]
When Scheduler._choose_pkg() is unable to find a package, memoize the result
until at least one of the existing jobs completes.

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

16 years agoBug #231464 - Replace erroneous "return" statement in elog_process() with
Zac Medico [Sat, 19 Jul 2008 11:46:23 +0000 (11:46 -0000)]
Bug #231464 - Replace erroneous "return" statement in elog_process() with
a continue statement. Thanks to TGL for this patch.

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

16 years agoInstead of calling _background_mode(), use the cached result.
Zac Medico [Sat, 19 Jul 2008 10:55:50 +0000 (10:55 -0000)]
Instead of calling _background_mode(), use the cached result.

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

16 years agoFix JobStatusDisplay._init_term() to supply default codes in cases when
Zac Medico [Sat, 19 Jul 2008 10:28:09 +0000 (10:28 -0000)]
Fix JobStatusDisplay._init_term() to supply default codes in cases when
curses.tigetstr() returns None.

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

16 years ago* Call self._schedule() from inside Scheduler._poll(). This ensures that
Zac Medico [Sat, 19 Jul 2008 10:07:13 +0000 (10:07 -0000)]
* Call self._schedule() from inside Scheduler._poll(). This ensures that
  new jobs can scheduled as soon a the load average is low enough, and
  one of the running jobs doesn't have to complete for _schedule() to
  get called.

* Cache the result of _background_mode() so it doesn't have to be called
  inside _schedule(), since this method is called a lot more often now.

* Move background related state adjustments into _background_mode().

* Call _status_display.display() unconditionally inside _schedule_tasks(),
  since we want to update the display to show current load average even
  if no new jobs are added.

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

16 years agoFix typos.
Zac Medico [Sat, 19 Jul 2008 07:33:26 +0000 (07:33 -0000)]
Fix typos.

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

16 years agoAdd a Scheduler._background_mode() method to control background mode, and
Zac Medico [Sat, 19 Jul 2008 07:24:43 +0000 (07:24 -0000)]
Add a Scheduler._background_mode() method to control background mode, and
trigger it if either --quiet is enabled or --jobs > 1.

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

16 years agoDisplay "Verifying ebuild manifests" and "Starting parallel fetch" via
Zac Medico [Sat, 19 Jul 2008 05:37:43 +0000 (05:37 -0000)]
Display "Verifying ebuild manifests" and "Starting parallel fetch" via
the status display instead of directly to stdout.

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

16 years agoAdd a hook in Scheduler._poll() that updates the display once every 2 seconds
Zac Medico [Sat, 19 Jul 2008 04:30:30 +0000 (04:30 -0000)]
Add a hook in Scheduler._poll() that updates the display once every 2 seconds
if stdout is a tty, so that the load average numbers are always current.

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

16 years agoMake all poll() calls pass through PollScheduler._poll().
Zac Medico [Sat, 19 Jul 2008 03:46:38 +0000 (03:46 -0000)]
Make all poll() calls pass through PollScheduler._poll().

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

16 years agoWhen JobStatusDisplay.displayMessage() is called while the status is currently
Zac Medico [Sat, 19 Jul 2008 03:25:29 +0000 (03:25 -0000)]
When JobStatusDisplay.displayMessage() is called while the status is currently
displayed, call display() after showing the given message.

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

16 years agoAdd support to JobStatusDisplay() to update the current line on the terminal,
Zac Medico [Sat, 19 Jul 2008 03:18:21 +0000 (03:18 -0000)]
Add support to JobStatusDisplay() to update the current line on the terminal,
which in the future can be used to erase the line and update it with new
information such as the latest load average measurement. This uses curses
to obtain the simple control codes that are needed, and has fallback codes
in case the curses module is unavailable or raises an error. When stdout
is not a tty then the line erasing behavior is automatically disabled and
display updates are simply show on a new line.

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

16 years agoAdd a MergeListItem.statusMessage(msg) callback for displaying messages like
Zac Medico [Sat, 19 Jul 2008 00:37:17 +0000 (00:37 -0000)]
Add a MergeListItem.statusMessage(msg) callback for displaying messages like
"Building this" or "Installing that". This delegates the resposibility of
generating \r and \n control characters, to guarantee that lines are created
or erased when necessary and appropriate. TODO: Make JobStatusDisplay display
the output.

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

16 years agoBug #199788 - Make repoman parse GLEP 56 USE flag descriptions from
Zac Medico [Fri, 18 Jul 2008 12:40:58 +0000 (12:40 -0000)]
Bug #199788 - Make repoman parse GLEP 56 USE flag descriptions from
metadata.xml (in addition to use.local.desc). Thanks to Doug Goldstein
<cardoe@g.o> for this patch.

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

16 years agoFix typo.
Zac Medico [Fri, 18 Jul 2008 08:56:07 +0000 (08:56 -0000)]
Fix typo.

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

16 years agoSuppress counter initialization warning messages in
Zac Medico [Fri, 18 Jul 2008 07:47:12 +0000 (07:47 -0000)]
Suppress counter initialization warning messages in
vardbapi.get_counter_tick_core() in cases when the vdb is empty. This
avoids pointless error messages when merging packages into a new root,
like when building stage 1.

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

16 years agoAdd background output redirection and async ebuild phase support for
Zac Medico [Fri, 18 Jul 2008 03:45:44 +0000 (03:45 -0000)]
Add background output redirection and async ebuild phase support for
PackageUninstall (automatic uninstalls that solve blockers).

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

16 years agoChange package status messages to give more accurate information about what
Zac Medico [Fri, 18 Jul 2008 01:42:38 +0000 (01:42 -0000)]
Change package status messages to give more accurate information about what
is happening at a given time:

 * Change "Emerging" messages to "Building" for ebuilds and "Extracting" for
   binary packages.

 * Change "Merging" messages to "Installing" and "Uninstalling".

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

16 years agoIn dblink._dblink_display_merge(), when in background mode and no log is
Zac Medico [Fri, 18 Jul 2008 00:52:45 +0000 (00:52 -0000)]
In dblink._dblink_display_merge(), when in background mode and no log is
available, suppress output when level < logging.WARNING. This hides
">>> Regenerating /etc/ld.so.cache..." messages that appear after postrm
when PORT_LOGDIR is unset (the log file if it exists is removed after
postrm so there's no place to log the message).

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

16 years agoUse dblink._eerror() to eliminate duplicate code.
Zac Medico [Fri, 18 Jul 2008 00:34:42 +0000 (00:34 -0000)]
Use dblink._eerror() to eliminate duplicate code.

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

16 years agoIf an problem is detected in dblink._security_check(), log it via elog so
Zac Medico [Fri, 18 Jul 2008 00:13:17 +0000 (00:13 -0000)]
If an problem is detected in dblink._security_check(), log it via elog so
that it's properly displayed in the foreground even when in background mode.

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

16 years agoRedirect dblink elog messages from stdout to the log file when in background
Zac Medico [Thu, 17 Jul 2008 23:53:49 +0000 (23:53 -0000)]
Redirect dblink elog messages from stdout to the log file when in background
mode. This is implemented by adding a new "out" parameter to the
portage.elog.e* functions, which can be used to send output to an arbitary
file instead of stdout.

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

16 years agoWhen dblink is looping over files for merge/unmerge, temporarily yield to the
Zac Medico [Thu, 17 Jul 2008 22:41:04 +0000 (22:41 -0000)]
When dblink is looping over files for merge/unmerge, temporarily yield to the
scheduler each time a fixed number of files are processed (currently 20).
This gives the scheduler an opportunity to service pending poll events. This
is implemented with a new PollScheduler._schedule_yield() method which calls
poll() exactly once, without blocking, and any services any resulting poll
events.

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

16 years agoAlso, reset "merges" in JobStatusDisplay.reset().
Zac Medico [Thu, 17 Jul 2008 16:11:13 +0000 (16:11 -0000)]
Also, reset "merges" in JobStatusDisplay.reset().

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

16 years agoInitialize JobStatusDisplay.merges since it's not initialized with the bound
Zac Medico [Thu, 17 Jul 2008 16:09:15 +0000 (16:09 -0000)]
Initialize JobStatusDisplay.merges since it's not initialized with the bound
properties anymore.

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

16 years agoAlso, don't count "merges" as changes in the status display.
Zac Medico [Thu, 17 Jul 2008 16:05:27 +0000 (16:05 -0000)]
Also, don't count "merges" as changes in the status display.

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

16 years agoSince it's not very interesting, disable the "merges" part of status display.
Zac Medico [Thu, 17 Jul 2008 16:04:00 +0000 (16:04 -0000)]
Since it's not very interesting, disable the "merges" part of status display.

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

16 years agoFix identation (tabnanny complains about this) branches/prefix r11110
Zac Medico [Thu, 17 Jul 2008 14:21:58 +0000 (14:21 -0000)]
Fix identation (tabnanny complains about this) branches/prefix r11110

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

16 years agoReformat the status display. Here's an example:
Zac Medico [Thu, 17 Jul 2008 14:01:22 +0000 (14:01 -0000)]
Reformat the status display. Here's an example:

>>> Jobs: 0 of 2 complete, 2 running             Load average: 2.9, 2.4, 2.0
>>> Jobs: 0 of 2 complete, 1 running, 2 merges   Load average: 2.8, 2.4, 2.0
>>> Jobs: 2 of 2 complete                        Load average: 2.6, 2.3, 2.0

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

16 years agoDon't show "Merging" and "merged." messages when in background mode.
Zac Medico [Thu, 17 Jul 2008 13:08:11 +0000 (13:08 -0000)]
Don't show "Merging" and "merged." messages when in background mode.

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

16 years agoMake Binpkg send "Extracting" messages to the log file when in background
Zac Medico [Thu, 17 Jul 2008 13:02:59 +0000 (13:02 -0000)]
Make Binpkg send "Extracting" messages to the log file when in background
mode, instead of stdout.

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

16 years agoUpdate the status display in _build_exit(), after decrementing the job count.
Zac Medico [Thu, 17 Jul 2008 12:21:09 +0000 (12:21 -0000)]
Update the status display in _build_exit(), after decrementing the job count.

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

16 years agoMake BinpkgVerifier redirect output to the fetch log when in background mode.
Zac Medico [Thu, 17 Jul 2008 11:39:16 +0000 (11:39 -0000)]
Make BinpkgVerifier redirect output to the fetch log when in background mode.

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

16 years agoDon't show a blank newline before ">>> Emerging" when in background mode.
Zac Medico [Thu, 17 Jul 2008 11:21:17 +0000 (11:21 -0000)]
Don't show a blank newline before ">>> Emerging" when in background mode.

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

16 years agoHandle the case in dblink.unmerge() when the log file is a temp file and so
Zac Medico [Thu, 17 Jul 2008 10:57:38 +0000 (10:57 -0000)]
Handle the case in dblink.unmerge() when the log file is a temp file and so
it doesn't exist after postrm cleaning.

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

16 years agoTweak interaction between Scheduler and status display so that it doesn't
Zac Medico [Thu, 17 Jul 2008 10:40:44 +0000 (10:40 -0000)]
Tweak interaction between Scheduler and status display so that it doesn't
display more often than necessary and avoids showing inconsistent counts.

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

16 years ago* Add a new portage.util.writemsg_level() function which uses a "level"
Zac Medico [Thu, 17 Jul 2008 10:11:26 +0000 (10:11 -0000)]
* Add a new portage.util.writemsg_level() function which uses a "level"
  parameter to control whether the message is sent to stdout or stderr.
  When level >= logging.WARNING then the message is sent to stderr,
  otherwise it is sent to stdout. The noiselevel is passed directly to
  writemsg().

* Use writemsg_level() for handling merge messages from dblink and add
  appropriate noiselevel values to each call.

* Add a writemsg_level parameter to portage.env_update() so that dblink
  can pass in dblink._display_merge() as a means to redirect output back
  to the scheduler for appropriate handling when running in the background.

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

16 years agoDon't increment the "complete" count for uninstall tasks.
Zac Medico [Thu, 17 Jul 2008 09:57:30 +0000 (09:57 -0000)]
Don't increment the "complete" count for uninstall tasks.

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

16 years agoAdd a JobStatusDisplay class to encapsulate the status display. This object
Zac Medico [Thu, 17 Jul 2008 08:57:19 +0000 (08:57 -0000)]
Add a JobStatusDisplay class to encapsulate the status display. This object
tracks whether or not any of it's attributes have changed since the last
time it was displayed, so the it's only displayed when something has changed.
Unlike before, now the display should always update whenever a relevant change
occurs.

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

16 years agoIn SequentialTaskQueue.clear(), remove the exit listener from each task before
Zac Medico [Thu, 17 Jul 2008 06:31:00 +0000 (06:31 -0000)]
In SequentialTaskQueue.clear(), remove the exit listener from each task before
cancelling it.

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

16 years agoAdd the new --anon option to the getopt args.
Zac Medico [Thu, 17 Jul 2008 04:50:49 +0000 (04:50 -0000)]
Add the new --anon option to the getopt args.

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

16 years agoWhen SpawnProcess._start() spawns a process in the background, use /dev/null
Zac Medico [Thu, 17 Jul 2008 04:20:12 +0000 (04:20 -0000)]
When SpawnProcess._start() spawns a process in the background, use /dev/null
so that any attempts to read from stdin will immediately return EOF instead
of blocking indefinitely. TODO: Use job control functions like tcsetpgrp()
to control access to stdin.

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

16 years agoEliminate duplicate code by making EbuildProcess inherit from SpawnProcess
Zac Medico [Thu, 17 Jul 2008 03:52:24 +0000 (03:52 -0000)]
Eliminate duplicate code by making EbuildProcess inherit from SpawnProcess
instead of SubProcess.

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

16 years agoAdd --anon to the usage message.
Zac Medico [Wed, 16 Jul 2008 21:57:04 +0000 (21:57 -0000)]
Add --anon to the usage message.

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

16 years agoAdd --anon option for anonsvn.gentoo.org users.
Zac Medico [Wed, 16 Jul 2008 21:52:01 +0000 (21:52 -0000)]
Add --anon option for anonsvn.gentoo.org users.

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

16 years agoRemove TODO since it no longer exists.
Zac Medico [Wed, 16 Jul 2008 21:11:32 +0000 (21:11 -0000)]
Remove TODO since it no longer exists.

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

16 years agoAvoid raising an IndexError from deprecated_profile_check() if the deprecated
Zac Medico [Wed, 16 Jul 2008 20:43:12 +0000 (20:43 -0000)]
Avoid raising an IndexError from deprecated_profile_check() if the deprecated
file happens to be empty. Instead just refer to the "Gentoo Upgrading Guide".
Thanks to armin76 for reporting.

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

16 years agoPass background=True into prefetcher constructors.
Zac Medico [Wed, 16 Jul 2008 08:47:54 +0000 (08:47 -0000)]
Pass background=True into prefetcher constructors.

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

16 years agoAdd a progress counter showing "x of y complete" to
Zac Medico [Wed, 16 Jul 2008 08:37:30 +0000 (08:37 -0000)]
Add a progress counter showing "x of y complete" to
Scheduler._display_status().

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

16 years ago* Add xterm titles support to Scheduler._display_status().
Zac Medico [Wed, 16 Jul 2008 07:38:07 +0000 (07:38 -0000)]
* Add xterm titles support to Scheduler._display_status().
* Tweak emergelog() so that it won't interfere with the scheduler summary.

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

16 years agoAdd async support for calling functions in misc-functions.sh:
Zac Medico [Wed, 16 Jul 2008 07:09:51 +0000 (07:09 -0000)]
Add async support for calling functions in misc-functions.sh:

* Create a new MiscFunctionsProcess class derived from SpawnProcess.

* Add "background" support to the SpawnProcess class and split out a
  _spawn() template function so MiscFunctionsProcess can override it.

* Rename the existing EbuildPhase class to EbuildProcess.

* Create a new EbuildPhase class derived from CompositeTask. This class
  spawns the EbuildProcess and MiscFunctionsProcess classes as sub-tasks.

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

16 years agoRemove the config._filter_calling_env attribute since it's not really needed.
Zac Medico [Wed, 16 Jul 2008 03:32:53 +0000 (03:32 -0000)]
Remove the config._filter_calling_env attribute since it's not really needed.
Replace it with an simple os.path.exists() call inside config.environ().

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

16 years agoShow LDFLAGS in emerge --info <pkg> output. Thanks to dirtyepic for this
Zac Medico [Wed, 16 Jul 2008 02:38:53 +0000 (02:38 -0000)]
Show LDFLAGS in emerge --info <pkg> output. Thanks to dirtyepic for this
patch.

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

16 years agoPass the whole dblink instance into Scheduler._dblink_display_merge() in case
Zac Medico [Wed, 16 Jul 2008 01:42:42 +0000 (01:42 -0000)]
Pass the whole dblink instance into Scheduler._dblink_display_merge() in case
it's ever needed.

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

16 years agoRedirect dblink.merge() output to the log file when --jobs > 1.
Zac Medico [Wed, 16 Jul 2008 01:37:27 +0000 (01:37 -0000)]
Redirect dblink.merge() output to the log file when --jobs > 1.

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

16 years agoMake dblink._display_merge() detect scheduler presence internally.
Zac Medico [Wed, 16 Jul 2008 01:15:18 +0000 (01:15 -0000)]
Make dblink._display_merge() detect scheduler presence internally.

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

16 years agoAdapt the dblink merge display callback to use log levels from the logging
Zac Medico [Wed, 16 Jul 2008 01:09:46 +0000 (01:09 -0000)]
Adapt the dblink merge display callback to use log levels from the logging
module so that it can be used as an interface for both writemsg() and
writemsg_stdout().

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

16 years agoRedirect dblink.unmerge() output to the log file when --jobs > 1.
Zac Medico [Wed, 16 Jul 2008 00:44:58 +0000 (00:44 -0000)]
Redirect dblink.unmerge() output to the log file when --jobs > 1.

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

16 years agoWhen --jobs > 1, display a status message each time that
Zac Medico [Wed, 16 Jul 2008 00:11:44 +0000 (00:11 -0000)]
When --jobs > 1, display a status message each time that
Scheduler._schedule_tasks() is called. For example:

>>> Jobs:  2 running,  0 merges, load average: 0.34, 0.46, 0.27

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

16 years agoAdd some cross references between emerge's new parallel build options and
Zac Medico [Tue, 15 Jul 2008 23:19:16 +0000 (23:19 -0000)]
Add some cross references between emerge's new parallel build options and
MAKEOPTS.

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

16 years agoMake EbuildFetcher copy FETCHCOMMAND and RESUMECOMMAND to the fetch
Zac Medico [Tue, 15 Jul 2008 22:31:13 +0000 (22:31 -0000)]
Make EbuildFetcher copy FETCHCOMMAND and RESUMECOMMAND to the fetch
environment, in case the default values have been overridden.

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

16 years agoIn Scheduler._restart_if_necessary(), use list.remove() instead of assuming
Zac Medico [Tue, 15 Jul 2008 21:17:37 +0000 (21:17 -0000)]
In Scheduler._restart_if_necessary(), use list.remove() instead of assuming
that portage is first in the resume list.

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

16 years agoSince lots of packages will have to be fixed before stable portage can abort
Zac Medico [Tue, 15 Jul 2008 10:45:42 +0000 (10:45 -0000)]
Since lots of packages will have to be fixed before stable portage can abort
with "this code is not 64bit clean", convert the die call to an eerror message
instructing the user to file a bug at bugs.gentoo.org. This should allow us
to stabilize portage-2.2 without having to ensure that the entire stable tree
is 64 bit clean first.

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

16 years agoWhen packages fail with --jobs > 1 and the "echo" elog module is not enabled,
Zac Medico [Tue, 15 Jul 2008 09:50:41 +0000 (09:50 -0000)]
When packages fail with --jobs > 1 and the "echo" elog module is not enabled,
emulate elog's mod_echo module to show the 'error' level messages, which should
include the important die message. This is implemented by adding a private
hook inside elog_process() which the scheduler uses to collect error messages.

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

16 years agoWhen there is more than one failure, show a summary packages that failed to
Zac Medico [Tue, 15 Jul 2008 08:58:05 +0000 (08:58 -0000)]
When there is more than one failure, show a summary packages that failed to
build or install. This is especially useful when using --jobs or --keep-going
since there can be multiple failures.

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

16 years ago* Fix --keep-going breakage that occured when Scheduler._choose_pkg() was
Zac Medico [Tue, 15 Jul 2008 08:28:16 +0000 (08:28 -0000)]
* Fix --keep-going breakage that occured when Scheduler._choose_pkg() was
  introduced.

* Handle multiple failed builds when buildinding in parallel.

* Fix Scheduler._do_merge_exit() to remove the correct package since it's
  not always at position 0 when using --jobs.

in parallel, so

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

16 years agoMake AsynchronousTask "registered" attributes private since poll() and wait()
Zac Medico [Tue, 15 Jul 2008 03:03:42 +0000 (03:03 -0000)]
Make AsynchronousTask "registered" attributes private since poll() and wait()
do the job now. Also, hide SubProcess.files since there's no reason to expose
it.

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

16 years agoUse self.registered to return early from SubProcess.poll() when possible,
Zac Medico [Tue, 15 Jul 2008 02:49:31 +0000 (02:49 -0000)]
Use self.registered to return early from SubProcess.poll() when possible,
and remove the related code from SequentialTaskQueue.schedule() since
this makes it obsolete.

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

16 years agoAdd a PollScheduler._next_poll_event() method to maintain a central event
Zac Medico [Tue, 15 Jul 2008 02:11:39 +0000 (02:11 -0000)]
Add a PollScheduler._next_poll_event() method to maintain a central event
queue between _poll_loop() and _schedule_wait(). This solves an intermittent
KeyError from _poll_loop() which occured when an event handler called
_schedule_wait() which unregistered an event handler for an event that
_poll_loop() had already recieved but hadn't processed yet.

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

16 years agoSplit out a _main_loop_cleanup() method from Scheduler._merge() and call it
Zac Medico [Tue, 15 Jul 2008 00:50:13 +0000 (00:50 -0000)]
Split out a _main_loop_cleanup() method from Scheduler._merge() and call it
before restarting in _restart_if_necessary() to kill any parallel-fetch tasks
that may still be running.

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