summaryrefslogtreecommitdiffstats
path: root/pym/_emerge
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix typo.Zac Medico2008-07-211-1/+1
| | | | svn path=/main/trunk/; revision=11153
* For --depclean and --prune, eliminate duplicate graph creation code by re-usingZac Medico2008-07-211-187/+200
| | | | | | | | 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
* Redirect the 'Recording <pkg> in "world" favorites file...' message throughZac Medico2008-07-211-2/+2
| | | | | | _status_msg(). svn path=/main/trunk/; revision=11151
* Redirect some more unmerge() output through writemsg_level() so that it canZac Medico2008-07-201-4/+6
| | | | | | filtered out when in background mode. svn path=/main/trunk/; revision=11147
* Fix Scheduler emergelog() interaction to properly disable emergelog()Zac Medico2008-07-201-6/+7
| | | | | | xterm titles whenever the status display is enabled. svn path=/main/trunk/; revision=11146
* * Clean up _schedule_tasks_imp() a bit.Zac Medico2008-07-201-9/+9
| | | | | | * Make _task() access _background directly instead of as a parameter. svn path=/main/trunk/; revision=11145
* Make PollScheduler._poll() add poll events to the stack instead of returningZac Medico2008-07-201-6/+7
| | | | | | | them. This makes it more useful as a hook, allowing Scheduler._poll() to safely call _schedule(). svn path=/main/trunk/; revision=11144
* Merge tasks currently run synchronously which makes it necessary to disableZac Medico2008-07-191-1/+8
| | | | | | | 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
* Fix Scheduler._schedule_tasks_imp() so that it never indicates that thereZac Medico2008-07-191-2/+5
| | | | | | | are remaining tasks in cases when it's supposed to bail out due to a package failure. svn path=/main/trunk/; revision=11142
* Calling _schedule() from Scheduler._poll() is unsafe since the _schedule()Zac Medico2008-07-191-1/+1
| | | | | | | call itself can consume poll events. Therefore, until a safe way exists, don't do it. svn path=/main/trunk/; revision=11141
* Use the memoized _choose_pkg() result to return earlier fromZac Medico2008-07-191-1/+2
| | | | | | _schedule_tasks() when possible. svn path=/main/trunk/; revision=11140
* When Scheduler._choose_pkg() is unable to find a package, memoize the resultZac Medico2008-07-191-2/+23
| | | | | | until at least one of the existing jobs completes. svn path=/main/trunk/; revision=11139
* Instead of calling _background_mode(), use the cached result.Zac Medico2008-07-191-4/+4
| | | | svn path=/main/trunk/; revision=11137
* Fix JobStatusDisplay._init_term() to supply default codes in cases whenZac Medico2008-07-191-6/+10
| | | | | | curses.tigetstr() returns None. svn path=/main/trunk/; revision=11136
* * Call self._schedule() from inside Scheduler._poll(). This ensures thatZac Medico2008-07-191-10/+20
| | | | | | | | | | | | | | | | | 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
* Fix typos.Zac Medico2008-07-191-2/+2
| | | | svn path=/main/trunk/; revision=11134
* Add a Scheduler._background_mode() method to control background mode, andZac Medico2008-07-191-6/+9
| | | | | | trigger it if either --quiet is enabled or --jobs > 1. svn path=/main/trunk/; revision=11133
* Display "Verifying ebuild manifests" and "Starting parallel fetch" viaZac Medico2008-07-191-2/+2
| | | | | | the status display instead of directly to stdout. svn path=/main/trunk/; revision=11132
* Add a hook in Scheduler._poll() that updates the display once every 2 secondsZac Medico2008-07-191-4/+24
| | | | | | if stdout is a tty, so that the load average numbers are always current. svn path=/main/trunk/; revision=11131
* Make all poll() calls pass through PollScheduler._poll().Zac Medico2008-07-191-5/+11
| | | | svn path=/main/trunk/; revision=11130
* When JobStatusDisplay.displayMessage() is called while the status is currentlyZac Medico2008-07-191-0/+6
| | | | | | displayed, call display() after showing the given message. svn path=/main/trunk/; revision=11129
* Add support to JobStatusDisplay() to update the current line on the terminal,Zac Medico2008-07-191-5/+91
| | | | | | | | | | | 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
* Add a MergeListItem.statusMessage(msg) callback for displaying messages likeZac Medico2008-07-191-21/+25
| | | | | | | | | "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
* Add background output redirection and async ebuild phase support forZac Medico2008-07-181-38/+66
| | | | | | PackageUninstall (automatic uninstalls that solve blockers). svn path=/main/trunk/; revision=11122
* Change package status messages to give more accurate information about whatZac Medico2008-07-181-18/+34
| | | | | | | | | | | 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
* In dblink._dblink_display_merge(), when in background mode and no log isZac Medico2008-07-181-2/+3
| | | | | | | | | 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
* Redirect dblink elog messages from stdout to the log file when in backgroundZac Medico2008-07-171-2/+22
| | | | | | | | 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
* When dblink is looping over files for merge/unmerge, temporarily yield to theZac Medico2008-07-171-5/+43
| | | | | | | | | | 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
* Also, reset "merges" in JobStatusDisplay.reset().Zac Medico2008-07-171-0/+1
| | | | svn path=/main/trunk/; revision=11115
* Initialize JobStatusDisplay.merges since it's not initialized with the boundZac Medico2008-07-171-0/+1
| | | | | | properties anymore. svn path=/main/trunk/; revision=11114
* Also, don't count "merges" as changes in the status display.Zac Medico2008-07-171-1/+1
| | | | svn path=/main/trunk/; revision=11113
* Since it's not very interesting, disable the "merges" part of status display.Zac Medico2008-07-171-1/+2
| | | | svn path=/main/trunk/; revision=11112
* Reformat the status display. Here's an example:Zac Medico2008-07-171-27/+52
| | | | | | | | >>> 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
* Don't show "Merging" and "merged." messages when in background mode.Zac Medico2008-07-171-2/+4
| | | | svn path=/main/trunk/; revision=11105
* Make Binpkg send "Extracting" messages to the log file when in backgroundZac Medico2008-07-171-3/+16
| | | | | | mode, instead of stdout. svn path=/main/trunk/; revision=11104
* Update the status display in _build_exit(), after decrementing the job count.Zac Medico2008-07-171-0/+1
| | | | svn path=/main/trunk/; revision=11103
* Make BinpkgVerifier redirect output to the fetch log when in background mode.Zac Medico2008-07-171-20/+41
| | | | svn path=/main/trunk/; revision=11102
* Don't show a blank newline before ">>> Emerging" when in background mode.Zac Medico2008-07-171-1/+4
| | | | svn path=/main/trunk/; revision=11101
* Tweak interaction between Scheduler and status display so that it doesn'tZac Medico2008-07-171-5/+6
| | | | | | display more often than necessary and avoids showing inconsistent counts. svn path=/main/trunk/; revision=11099
* * Add a new portage.util.writemsg_level() function which uses a "level"Zac Medico2008-07-171-10/+5
| | | | | | | | | | | | | | | | 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
* Don't increment the "complete" count for uninstall tasks.Zac Medico2008-07-171-1/+2
| | | | svn path=/main/trunk/; revision=11097
* Add a JobStatusDisplay class to encapsulate the status display. This objectZac Medico2008-07-171-45/+100
| | | | | | | | | 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
* In SequentialTaskQueue.clear(), remove the exit listener from each task beforeZac Medico2008-07-171-0/+1
| | | | | | cancelling it. svn path=/main/trunk/; revision=11095
* When SpawnProcess._start() spawns a process in the background, use /dev/nullZac Medico2008-07-171-2/+14
| | | | | | | | 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
* Eliminate duplicate code by making EbuildProcess inherit from SpawnProcessZac Medico2008-07-171-128/+27
| | | | | | instead of SubProcess. svn path=/main/trunk/; revision=11092
* Pass background=True into prefetcher constructors.Zac Medico2008-07-161-5/+6
| | | | svn path=/main/trunk/; revision=11076
* Add a progress counter showing "x of y complete" toZac Medico2008-07-161-8/+24
| | | | | | Scheduler._display_status(). svn path=/main/trunk/; revision=11075
* * Add xterm titles support to Scheduler._display_status().Zac Medico2008-07-161-9/+19
| | | | | | * Tweak emergelog() so that it won't interfere with the scheduler summary. svn path=/main/trunk/; revision=11073
* Add async support for calling functions in misc-functions.sh:Zac Medico2008-07-161-47/+98
| | | | | | | | | | | | | | * 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
* Show LDFLAGS in emerge --info <pkg> output. Thanks to dirtyepic for thisZac Medico2008-07-161-1/+1
| | | | | | patch. svn path=/main/trunk/; revision=11070