summaryrefslogtreecommitdiffstats
path: root/pym/portage
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo.Zac Medico2008-07-181-1/+1
| | | | svn path=/main/trunk/; revision=11124
* Suppress counter initialization warning messages inZac Medico2008-07-181-4/+7
| | | | | | | | 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
* Add background output redirection and async ebuild phase support forZac Medico2008-07-181-3/+4
| | | | | | PackageUninstall (automatic uninstalls that solve blockers). svn path=/main/trunk/; revision=11122
* Use dblink._eerror() to eliminate duplicate code.Zac Medico2008-07-181-14/+2
| | | | svn path=/main/trunk/; revision=11119
* If an problem is detected in dblink._security_check(), log it via elog soZac Medico2008-07-181-10/+21
| | | | | | that it's properly displayed in the foreground even when in background mode. svn path=/main/trunk/; revision=11118
* Redirect dblink elog messages from stdout to the log file when in backgroundZac Medico2008-07-172-11/+26
| | | | | | | | 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-6/+33
| | | | | | | | | | 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
* Fix identation (tabnanny complains about this) branches/prefix r11110Zac Medico2008-07-171-1/+1
| | | | svn path=/main/trunk/; revision=11111
* Handle the case in dblink.unmerge() when the log file is a temp file and soZac Medico2008-07-171-1/+6
| | | | | | it doesn't exist after postrm cleaning. svn path=/main/trunk/; revision=11100
* * Add a new portage.util.writemsg_level() function which uses a "level"Zac Medico2008-07-173-25/+54
| | | | | | | | | | | | | | | | 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
* Eliminate duplicate code by making EbuildProcess inherit from SpawnProcessZac Medico2008-07-171-6/+6
| | | | | | instead of SubProcess. svn path=/main/trunk/; revision=11092
* Avoid raising an IndexError from deprecated_profile_check() if the deprecatedZac Medico2008-07-161-1/+5
| | | | | | | file happens to be empty. Instead just refer to the "Gentoo Upgrading Guide". Thanks to armin76 for reporting. svn path=/main/trunk/; revision=11088
* Add async support for calling functions in misc-functions.sh:Zac Medico2008-07-161-7/+23
| | | | | | | | | | | | | | * 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
* Remove the config._filter_calling_env attribute since it's not really needed.Zac Medico2008-07-161-14/+13
| | | | | | Replace it with an simple os.path.exists() call inside config.environ(). svn path=/main/trunk/; revision=11071
* Pass the whole dblink instance into Scheduler._dblink_display_merge() in caseZac Medico2008-07-161-2/+1
| | | | | | it's ever needed. svn path=/main/trunk/; revision=11069
* Redirect dblink.merge() output to the log file when --jobs > 1.Zac Medico2008-07-161-26/+38
| | | | svn path=/main/trunk/; revision=11068
* Make dblink._display_merge() detect scheduler presence internally.Zac Medico2008-07-161-6/+6
| | | | svn path=/main/trunk/; revision=11067
* Adapt the dblink merge display callback to use log levels from the loggingZac Medico2008-07-161-5/+14
| | | | | | | module so that it can be used as an interface for both writemsg() and writemsg_stdout(). svn path=/main/trunk/; revision=11066
* Redirect dblink.unmerge() output to the log file when --jobs > 1.Zac Medico2008-07-161-2/+10
| | | | svn path=/main/trunk/; revision=11065
* When packages fail with --jobs > 1 and the "echo" elog module is not enabled,Zac Medico2008-07-151-1/+6
| | | | | | | | 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
* Call prepare_build_dirs() prior to pkg_preinst so that logging worksZac Medico2008-07-141-0/+2
| | | | | | properly. svn path=/main/trunk/; revision=11046
* * Fix doebuild so "returnpid" works for preinst and postinst.Zac Medico2008-07-142-31/+96
| | | | | | | | | * Add async support for pkg_prerm and pkg_postrm. * Add missing "treetype" parameter to dblink constructor calls. * Fix SubProcess._wait() to check self.returncode _after_ calling the scheduler. svn path=/main/trunk/; revision=11045
* Add async execution support for pkg_preinst and pkg_postinst. This allows theZac Medico2008-07-142-13/+28
| | | | | | | scheduler's poll loop to run so that other parallel tasks aren't starved for output handling while pkg_preinst and pkg_postinst are executing. svn path=/main/trunk/; revision=11044
* * Since can_poll_pty() is unsafe due to he possibility of the poll() callZac Medico2008-07-131-16/+0
| | | | | | | | | blocking forever, replace it with a simpler test on /dev/null that's derived from a test in a glib2 configure script. * Remove PtyReaderTestCase since it has the same problem as can_poll_pty(). svn path=/main/trunk/; revision=11039
* Fix broken binpkg path comparison in in binarytree.inject() so that duplicateZac Medico2008-07-131-1/+1
| | | | | | entries are correctly from the Packages index. svn path=/main/trunk/; revision=11034
* Split out a portage._create_pty_or_pipe() function to avoid duplicate code.Zac Medico2008-07-122-55/+60
| | | | svn path=/main/trunk/; revision=11024
* Derive a PtyReaderTestCase from PipeReaderTestCase. This test is expected toZac Medico2008-07-121-3/+52
| | | | | | | fail on some operating systems such as Darwin that do not support poll() on pty devices. svn path=/main/trunk/; revision=11023
* Create a test case for the poll loop which uses the loop to read data from aZac Medico2008-07-123-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | pipe and assert that the data written to the pipe is identical to the data read from the pipe. In order to implement this test, several useful classes have been added: * PipeReader Reads output from one or more files and saves it in memory, for retrieval via the getvalue() method. This is driven by the scheduler's poll() loop, so it runs entirely within the current process. * QueueScheduler Add instances of SequentialTaskQueue and then call run(). The run() method returns when no tasks remain. * TaskScheduler A simple way to handle scheduling of AsynchrousTask instances. Simply add tasks and call run(). The run() method returns when no tasks remain. svn path=/main/trunk/; revision=11022
* * Add a digraph.get() method, analogous to dict.get(), used to simplifyZac Medico2008-07-121-0/+4
| | | | | | | | Scheduler._pkg(). * Define digraph.__contains__ for containment tests via the "in" operator. svn path=/main/trunk/; revision=11021
* Copy INHERITED/_eclasses_ handling from portdbapi._metadata_callback() toZac Medico2008-07-111-0/+6
| | | | | | | portdbapi.aux_get() since it's still needed there or else aux_get won't properly return INHERITED. svn path=/main/trunk/; revision=11016
* Add support for parallel --regen, using the existing --jobs and --load-averageZac Medico2008-07-102-67/+108
| | | | | | | | | | | | | | | | options: * Split out a PollLoop base class from Scheduler and derive a MetadataRegen class to handle parallel scheduling for --regen. * Add pordbapi._metadata_process() and _metadata_callback() methods to implement asynchronous metadata generation. One method returns an EbuildMetadataPhase instance to encapsulate the async task. The other method is called to save the metadata when the process completes successfully. These methods share code with aux_get to avoid duplicate code. svn path=/main/trunk/; revision=11012
* Bug #231382 - If the open() call in getconfig() raises an unexpected IOError,Zac Medico2008-07-101-0/+1
| | | | | | | write a message to stderr showing the exact call that failed, including the path of the file, in order to aid in debugging. svn path=/main/trunk/; revision=11010
* Make digestcheck() skip the "checking ebuild checksums" part when fetching inZac Medico2008-07-101-1/+1
| | | | | | the background. svn path=/main/trunk/; revision=11009
* Bug #231358 - Fix 'NameError: global name 'p' is not defined' inZac Medico2008-07-091-1/+1
| | | | | | getmaskingstatus() that's triggered by a conditional in LICENSE. svn path=/main/trunk/; revision=11004
* Use the EbuildFetcher class to implement async fetch for the EbuildBuildZac Medico2008-07-091-2/+1
| | | | | | | | | | | class. When in background mode, fetch output is logged to emerge-fetch.log. This solves a problem with calling doebuild(returnpid=1) and then doebuild calling fetch() synchronously. In that case, doebuild would return an int if fetch() failed (including when running pkg_nofetch), which would lead to a TypeError since doebuild(returnpid=1) is supposed to return a list containing a spawned pid. svn path=/main/trunk/; revision=11002
* Use the EbuildPhase class to execute the "clean" phase asynchronously.Zac Medico2008-07-051-1/+2
| | | | svn path=/main/trunk/; revision=10938
* * Implement a new binarytree.digestCheck() method and use it to checkZac Medico2008-07-052-32/+79
| | | | | | | | | | | | | 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
* Fix broken references to portage.exception.Zac Medico2008-07-041-3/+2
| | | | svn path=/main/trunk/; revision=10923
* Bug #230469 - Implement non-blocking distlocks for --fetchonly. This addsZac Medico2008-07-033-11/+32
| | | | | | | | | | 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
* Fix typo.Zac Medico2008-07-031-1/+1
| | | | svn path=/main/trunk/; revision=10916
* Bug #230579 - Handle EOFError raised from cPickle.load() inZac Medico2008-07-031-2/+2
| | | | | | PreservedLibsRegistry.load(). svn path=/main/trunk/; revision=10915
* Add a portage._disable_legacy_globals() function. This deletes theZac Medico2008-07-031-5/+17
| | | | | | | | | | 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
* Implement asynchronous binary package extraction, so that the schedulerZac Medico2008-07-031-2/+2
| | | | | | can run while a package is extracting in the background. svn path=/main/trunk/; revision=10902
* Use stdout.write() instead of "print", for py3k compat.Zac Medico2008-07-031-14/+24
| | | | svn path=/main/trunk/; revision=10897
* Remove $PORTAGE_BUILDDIR locking from portage.pkgmerge() and useZac Medico2008-07-021-23/+1
| | | | | | an instance of EbuildBuildDir instead. svn path=/main/trunk/; revision=10892
* Py3k compatibility patch by Ali Polatel <hawking@g.o>.Zac Medico2008-07-027-37/+58
| | | | | | Don't use the format raise Exception, "string" svn path=/main/trunk/; revision=10890
* Py3k compatibility patch #6 by Ali Polatel <hawking@g.o>.Zac Medico2008-07-013-1/+18
| | | | | | Replace dict.has_key() calls with "in" and "not in" operators. svn path=/main/trunk/; revision=10875
* Py3k compatibility patch #4 by Ali Polatel <hawking@g.o>.Zac Medico2008-07-015-7/+7
| | | | | | Replace dict.has_key() calls with "in" and "not in" operators. svn path=/main/trunk/; revision=10873
* Py3k compatibility patch #3 by Ali Polatel <hawking@g.o>.Zac Medico2008-07-014-14/+15
| | | | | | Replace dict.has_key() calls with "in" and "not in" operators. svn path=/main/trunk/; revision=10872
* Py3k compatibility patch #2 by Ali Polatel <hawking@g.o>.Zac Medico2008-07-012-2/+2
| | | | | | Replace dict.has_key() calls with "in" and "not in" operators. svn path=/main/trunk/; revision=10871