Fetch metadata.dtd if it doesn't exist or the ctime is older than
metadata_dtd_ctime_interval.
@rtype: bool
- @returns: True if successful, otherwise False
+ @return: True if successful, otherwise False
"""
must_fetch = True
def __getitem__(self, cpv):
"""
@rtype: BlockerData
- @returns: An object with counter and atoms attributes.
+ @return: An object with counter and atoms attributes.
"""
return self.BlockerData(*self._cache_data["blockers"][cpv])
Subclasses can use this as a generic task exit callback.
@rtype: int
- @returns: The task.returncode attribute.
+ @return: The task.returncode attribute.
"""
self._assert_current(task)
if task.returncode != os.EX_OK:
"""
Initialize term control codes.
@rtype: bool
- @returns: True if term codes were successfully initialized,
+ @return: True if term codes were successfully initialized,
False otherwise.
"""
def is_valid_flag(self, flags):
"""
- @returns: True if all flags are valid USE values which may
+ @return: True if all flags are valid USE values which may
be specified in USE dependencies, False otherwise.
"""
if isinstance(flags, basestring):
def get_missing_iuse(self, flags):
"""
- @returns: A list of flags missing from IUSE.
+ @return: A list of flags missing from IUSE.
"""
if isinstance(flags, basestring):
flags = [flags]
def _keep_scheduling(self):
"""
@rtype: bool
- @returns: True if there may be remaining tasks to schedule,
+ @return: True if there may be remaining tasks to schedule,
False otherwise.
"""
return False
def _schedule_tasks(self):
"""
@rtype: bool
- @returns: True if there may be remaining tasks to schedule,
+ @return: True if there may be remaining tasks to schedule,
False otherwise.
"""
if self._terminated_tasks:
Check if background mode is enabled and adjust states as necessary.
@rtype: bool
- @returns: True if background mode is enabled, False otherwise.
+ @return: True if background mode is enabled, False otherwise.
"""
background = (self._max_jobs is True or \
self._max_jobs > 1 or "--quiet" in self.myopts \
merge order
@type later: set
@rtype: bool
- @returns: True if the package is dependent, False otherwise.
+ @return: True if the package is dependent, False otherwise.
"""
graph = self._digraph
def _job_delay(self):
"""
@rtype: bool
- @returns: True if job scheduling should be delayed, False otherwise.
+ @return: True if job scheduling should be delayed, False otherwise.
"""
if self._jobs and self._max_load is not None:
def _schedule_tasks_imp(self):
"""
@rtype: bool
- @returns: True if state changed, False otherwise.
+ @return: True if state changed, False otherwise.
"""
state_change = 0
Use the current resume list to calculate a new one,
dropping any packages with unsatisfied deps.
@rtype: bool
- @returns: True if successful, False otherwise.
+ @return: True if successful, False otherwise.
"""
print(colorize("GOOD", "*** Resuming merge..."))
Dump the mod_echo output now so that our other
notifications are shown last.
@rtype: bool
- @returns: True if messages were shown, False otherwise.
+ @return: True if messages were shown, False otherwise.
"""
messages_shown = bool(mod_echo._items)
mod_echo.finalize()
relationships from nested sets
@type add_to_digraph: Boolean
@rtype: Iterable
- @returns: All args given in the input together with additional
+ @return: All args given in the input together with additional
SetArg instances that are generated from nested sets
"""
@param atom_without_category: an atom without a category component
@type atom_without_category: String
@rtype: list
- @returns: a list of atoms containing categories (possibly empty)
+ @return: a list of atoms containing categories (possibly empty)
"""
null_cp = portage.dep_getkey(insert_category_into_atom(
atom_without_category, "null"))
PackageNotFound or depgraph.UnsatisfiedResumeDep when necessary.
TODO: Return reasons for dropped_tasks, for display/logging.
@rtype: tuple
- @returns: (success, depgraph, dropped_tasks)
+ @return: (success, depgraph, dropped_tasks)
"""
skip_masked = True
skip_unsatisfied = True
def _insert_slot(self, pkg, pkg_info, myinslotlist):
"""Adds slot info to the message
- @returns addl: formatted slot info
- @returns myoldbest: installed version list
+ @return addl: formatted slot info
+ @return myoldbest: installed version list
Modifies self.counters.downgrades, self.counters.upgrades,
self.counters.binary
"""
def _new_slot(self, pkg, pkg_info):
"""New slot, mark it new.
- @returns addl: formatted slot info
- @returns myoldbest: installed version list
+ @return addl: formatted slot info
+ @return myoldbest: installed version list
Modifies self.counters.newslot, self.counters.binary
"""
addl = " " + green("NS") + pkg_info.fetch_symbol + " "
attribute names from keys
@type prefix: String
@rtype: SlotDict
- @returns: A class that constructs SlotDict instances
+ @return: A class that constructs SlotDict instances
having the specified keys.
"""
if isinstance(keys, frozenset):
@param pkgindex: A PackageIndex instance.
@type pkgindex: PackageIndex
@rtype: dict
- @returns: a dict containing entry for the give cpv.
+ @return: a dict containing entry for the give cpv.
"""
cpv_map = {}
Performs checksums and evaluates USE flag conditionals.
Raises InvalidDependString if necessary.
@rtype: dict
- @returns: a dict containing entry for the give cpv.
+ @return: a dict containing entry for the give cpv.
"""
pkg_path = self.getname(cpv)
Verify digests for the given package and raise DigestException
if verification fails.
@rtype: bool
- @returns: True if digests could be located, False otherwise.
+ @return: True if digests could be located, False otherwise.
"""
cpv = pkg
if not isinstance(cpv, basestring):
@param canonical_repo_path: the canonical path of a repository, as
resolved by os.path.realpath()
@type canonical_repo_path: String
- @returns: The repo_name for the corresponding repository, or None
+ @return: The repo_name for the corresponding repository, or None
if the path does not correspond a known repository
@rtype: String or None
"""
Create an EbuildMetadataPhase instance to generate metadata for the
give ebuild.
@rtype: EbuildMetadataPhase
- @returns: A new EbuildMetadataPhase instance, or None if the
+ @return: A new EbuildMetadataPhase instance, or None if the
metadata cache is already valid.
"""
metadata, ebuild_hash = self._pull_valid_cache(cpv, ebuild_path, repo_path)
@param mytree: The canonical path of the tree in which the ebuild
is located, or None for automatic lookup
@type mypkg: String
- @returns: A dict which maps each file name to a set of alternative
+ @return: A dict which maps each file name to a set of alternative
URIs.
@rtype: dict
"""
@param myroot: ignored, self._eroot is used instead
@param mycpv: ignored
@rtype: int
- @returns: new counter value
+ @return: new counter value
"""
myroot = None
mycpv = None
PreservedLibsRegistry yet.
@type preserve_paths: set
@rtype: Integer
- @returns:
+ @return:
1. os.EX_OK if everything went well.
2. return code of the failed phase (for prerm, postrm, cleanrm)
"""
@param destroot:
@type destroot:
@rtype: Boolean
- @returns:
+ @return:
1. True if this package owns the file.
2. False if this package does not own the file.
"""
@param prev_mtimes: { Filename:mtime } mapping for env_update
@type prev_mtimes: Dictionary
@rtype: Boolean
- @returns:
+ @return:
1. 0 on success
2. 1 on failure
@param thismtime: The current time (typically long(time.time())
@type thismtime: Long
@rtype: None or Boolean
- @returns:
+ @return:
1. True on failure
2. None otherwise
@param cpv2: CategoryPackageVersion (no operators) Example: "sys-apps/portage-2.1"
@type cpv2: String
@rtype: Boolean
- @returns:
+ @return:
1. True if cpv1 = cpv2
2. False Otherwise
3. Throws PortageException if cpv1 or cpv2 is not a CPV
@param filename: name of a file/directory to traverse
@rtype: list
- @returns: List of files to process
+ @return: List of files to process
"""
try:
load all files in self.fname
@type: Boolean
@rtype: tuple
- @returns:
+ @return:
Returns (data,errors), both may be empty dicts or populated.
"""
data = {}
@type myfile: String
@param myfile: Filename to grab the XML data from
@rtype: None
- @returns: None
+ @return: None
"""
self.DOM = xml.dom.minidom.parse(myfile)
if not self.DOM.doctype:
architectures.
@rtype: Boolean
- @returns: True if the system is affected, False if not
+ @return: True if the system is affected, False if not
"""
rValue = False
for k in self.packages:
GLSA was already applied.
@rtype: Boolean
- @returns: True if the GLSA was applied, False if not
+ @return: True if the GLSA was applied, False if not
"""
return (self.nr in get_applied_glsas(self.config))
applied or on explicit user request.
@rtype: None
- @returns: None
+ @return: None
"""
if not self.isApplied():
checkfile = io.open(
@param update: check for new items (default is True)
@type update: boolean
@rtype: dict
- @returns: dictionary mapping repos to integer counts of unread news items
+ @return: dictionary mapping repos to integer counts of unread news items
"""
NEWS_PATH = os.path.join("metadata", "news")
def __call__(self, argv):
"""
- @returns: tuple of (stdout, stderr, returncode)
+ @return: tuple of (stdout, stderr, returncode)
"""
cmd, root, atom_str = argv
"""
Verifies checksums. Assumes all files have been downloaded.
@rtype: int
- @returns: 1 on success and 0 on failure
+ @return: 1 on success and 0 on failure
"""
if justmanifest is not None:
@param myportdb: a portdbapi instance
@type myportdb: portdbapi
@rtype: int
- @returns: 1 on success and 0 on failure
+ @return: 1 on success and 0 on failure
"""
if mysettings is None or myportdb is None:
raise TypeError("portage.digestgen(): 'mysettings' and 'myportdb' parameter are required.")
caller clean up all returned PIDs.
@type returnpid: Boolean
@rtype: Boolean
- @returns:
+ @return:
1. 0 for success
2. 1 for error
@param keywords: Extra options encoded as a dict, to be passed to spawn
@type keywords: Dictionary
@rtype: Integer
- @returns:
+ @return:
1. The return code of the spawned process.
"""
@param pre_exec: A function to be called with no arguments just prior to the exec call.
@type pre_exec: callable
@rtype: None
- @returns: Never returns (calls os.execve)
+ @return: Never returns (calls os.execve)
"""
# If the process we're creating hasn't been given a name
@param binary: Name of the binary to find
@type string
@rtype: None or string
- @returns: full path to binary or None if the binary could not be located.
+ @return: full path to binary or None if the binary could not be located.
"""
for path in os.environ.get("PATH", "").split(":"):
filename = "%s/%s" % (path, binary)
@param base_dir: Path to sources (usually /usr/src/linux)
@type base_dir: string
@rtype: tuple( version[string], error[string])
- @returns:
+ @return:
1. tuple( version[string], error[string])
Either version or error is populated (but never both)
@param incremental: Append to the return list, don't overwrite
@type incremental: Boolean (integer)
@rtype: Dictionary
- @returns:
+ @return:
1. Returns the lines in a file in a dictionary, for example:
'sys-apps/portage x86 amd64 ppc'
would return
def getPreservedLibs(self):
""" Return a mapping of packages->preserved objects.
- @returns mapping of package instances to preserved objects
+ @return mapping of package instances to preserved objects
@rtype Dict cpv->list-of-paths
"""
if self._data is None:
Test if it's possible to use poll() on a device such as a pty. This
is known to fail on Darwin.
@rtype: bool
- @returns: True if poll() on a device succeeds, False otherwise.
+ @return: True if poll() on a device succeeds, False otherwise.
"""
global _can_poll_device
then the term size will be copied to the pty.
@type copy_term_size: int
@rtype: tuple
- @returns: A tuple of (is_pty, master_fd, slave_fd) where
+ @return: A tuple of (is_pty, master_fd, slave_fd) where
is_pty is True if a pty was successfully allocated, and
False if a normal pipe was allocated.
"""
@param contents: the contents of a libtool archive file
@type contents: bytes
@rtype: tuple
- @returns: (True, fixed_contents) if something needed to be
+ @return: (True, fixed_contents) if something needed to be
fixed, (False, None) otherwise.
"""
#Parse the 'dependency_libs' and 'inherited_linker_flags' lines.
@param dirsonly: Only return directories.
@type dirsonly: Boolean
@rtype: List
- @returns: A list of files and directories (or just files or just directories) or an empty list.
+ @return: A list of files and directories (or just files or just directories) or an empty list.
"""
list, ftype = cacheddir(mypath, ignorecvs, ignorelist, EmptyOnError, followSymlinks)
@param editor: An EDITOR value from the environment.
@type: string
@rtype: bool
- @returns: True if an executable is found, False otherwise.
+ @return: True if an executable is found, False otherwise.
"""
editor_split = util.shlex_split(editor)
if not editor_split:
@param message: An iterable of lines to show in the editor.
@type: iterable
@rtype: string or None
- @returns: A string on success or None if an error occurs.
+ @return: A string on success or None if an error occurs.
"""
fd, filename = mkstemp()
try:
Read a commit message from the user and return it.
@rtype: string or None
- @returns: A string on success or None if an error occurs.
+ @return: A string on success or None if an error occurs.
"""
print("Please enter a commit message. Use Ctrl-d to finish or Ctrl-c to abort.")
commitmessage = []