Package portage :: Package package :: Package ebuild :: Module _spawn_nofetch
[hide private]

Module _spawn_nofetch

source code

Functions [hide private]
 
spawn_nofetch(portdb, ebuild_path, settings=None, fd_pipes=None)
This spawns pkg_nofetch if appropriate.
source code
Variables [hide private]
  __package__ = 'portage.package.ebuild'

Imports: tempfile, portage, os, shutil, EBUILD_PHASES, elog_process, config, doebuild_environment, prepare_build_dirs, SchedulerInterface, EventLoop, global_event_loop, EbuildPhase


Function Details [hide private]

spawn_nofetch(portdb, ebuild_path, settings=None, fd_pipes=None)

source code 

This spawns pkg_nofetch if appropriate. The settings parameter is useful only if setcpv has already been called in order to cache metadata. It will be cloned internally, in order to prevent any changes from interfering with the calling code. If settings is None then a suitable config instance will be acquired from the given portdbapi instance. Do not use the settings parameter unless setcpv has been called on the given instance, since otherwise it's possible to trigger issues like bug #408817 due to fragile assumptions involving the config state inside doebuild_environment().

A private PORTAGE_BUILDDIR will be created and cleaned up, in order to avoid any interference with any other processes. If PORTAGE_TMPDIR is writable, that will be used, otherwise the default directory for the tempfile module will be used.

We only call the pkg_nofetch phase if either RESTRICT=fetch is set or the package has explicitly overridden the default pkg_nofetch implementation. This allows specialized messages to be displayed for problematic packages even though they do not set RESTRICT=fetch (bug #336499).

This function does nothing if the PORTAGE_PARALLEL_FETCHONLY variable is set in the config instance.