"""Processes pkg for blockers and adds colorized strings to
self.print_msg and self.blockers
- @param pkg: _emerge.Package instance
+ @param pkg: _emerge.Package.Package instance
@param fetch_symbol: string
@rtype: bool
Modifies class globals: self.blocker_style, self.resolved,
def _display_use(self, pkg, myoldbest, myinslotlist):
""" USE flag display
- @param pkg: _emerge.Package instance
+ @param pkg: _emerge.Package.Package instance
@param myoldbest: list of installed versions
@param myinslotlist: list of installed slots
Modifies class globals: self.forced_flags, self.cur_iuse,
def gen_mask_str(self, pkg):
"""
- @param pkg: _emerge.Package instance
+ @param pkg: _emerge.Package.Package instance
"""
hardmasked = pkg.isHardMasked()
mask_str = " "
""" Prevent USE_EXPAND_HIDDEN flags from being hidden if they
are the only thing that triggered reinstallation.
- @param pkg: _emerge.Package instance
+ @param pkg: _emerge.Package.Package instance
Modifies self.use_expand_hidden, self.use_expand, self.verboseadd
"""
reinst_flags_map = {}
def verbose_size(self, pkg, repoadd_set, pkg_info):
"""Determines the size of the downloads required
- @param pkg: _emerge.Package instance
+ @param pkg: _emerge.Package.Package instance
@param repoadd_set: set of repos to add
@param pkg_info: dictionary
Modifies class globals: self.myfetchlist, self.counters.totalsize,
repoadd_set.add(self.repoadd)
- def convert_myoldbest(self, myoldbest):
+ def convert_myoldbest(self, pkg, myoldbest):
"""converts and colorizes a version list to a string
+ @param pkg: _emerge.Package.Package instance
@param myoldbest: list
@rtype string.
"""
myoldbest_str = ""
if myoldbest:
versions = []
- for pos, pkg in enumerate(myoldbest):
- key = catpkgsplit(pkg.cpv)[2] + \
- "-" + catpkgsplit(pkg.cpv)[3]
+ for pos, old_pkg in enumerate(myoldbest):
+ key = catpkgsplit(old_pkg.cpv)[2] + "-" + catpkgsplit(old_pkg.cpv)[3]
if key[-3:] == "-r0":
key = key[:-3]
- if self.conf.verbosity == 3 and not self.quiet_repo_display:
- key += _repo_separator + pkg.repo
+ if self.conf.verbosity == 3 and not self.quiet_repo_display and (self.verbose_main_repo_display or
+ (any(x.repo != self.portdb.repositories.mainRepo().name for x in myoldbest + [pkg]))):
+ key += _repo_separator + old_pkg.repo
versions.append(key)
myoldbest_str = blue("["+", ".join(versions)+"]")
return myoldbest_str
"""Increments counters.interactive if the pkg is to
be merged and it's metadata has interactive set True
- @param pkg: _emerge.Package instance
+ @param pkg: _emerge.Package.Package instance
@param ordered: boolean
@param addl: already defined string to add to
"""
@param addl: already defined string to add to
@param pkg_info: dictionary
- @param pkg: _emerge.Package instance
+ @param pkg: _emerge.Package.Package instance
@rtype string
"""
ver_str = pkg_info.ver
- if self.conf.verbosity == 3 and not self.quiet_repo_display:
+ if self.conf.verbosity == 3 and not self.quiet_repo_display and (self.verbose_main_repo_display or
+ (any(x.repo != self.portdb.repositories.mainRepo().name for x in pkg_info.oldbest_list + [pkg]))):
ver_str += _repo_separator + pkg.repo
if self.conf.quiet:
myprint = addl + " " + self.indent + \
@param addl: already defined string to add to
@param pkg_info: dictionary
- @param pkg: _emerge.Package instance
+ @param pkg: _emerge.Package.Package instance
@rtype string
Modifies self.verboseadd
"""
ver_str = pkg_info.ver
- if self.conf.verbosity == 3 and not self.quiet_repo_display:
+ if self.conf.verbosity == 3 and not self.quiet_repo_display and (self.verbose_main_repo_display or
+ (any(x.repo != self.portdb.repositories.mainRepo().name for x in pkg_info.oldbest_list + [pkg]))):
ver_str += _repo_separator + pkg.repo
if self.conf.quiet:
myprint = addl + " " + self.indent + \
def _set_no_columns(self, pkg, pkg_info, addl):
"""prints pkg info without column indentation.
- @param pkg: _emerge.Package instance
+ @param pkg: _emerge.Package.Package instance
@param pkg_info: dictionary
@param addl: the current text to add for the next line to output
@rtype the updated addl
"""
pkg_str = pkg.cpv
- if self.conf.verbosity == 3 and not self.quiet_repo_display:
+ if self.conf.verbosity == 3 and not self.quiet_repo_display and (self.verbose_main_repo_display or
+ (any(x.repo != self.portdb.repositories.mainRepo().name for x in pkg_info.oldbest_list + [pkg]))):
pkg_str += _repo_separator + pkg.repo
if not pkg_info.merge:
addl = self.empty_space_in_brackets()
def set_pkg_info(self, pkg, ordered):
"""Sets various pkg_info dictionary variables
- @param pkg: _emerge.Package instance
+ @param pkg: _emerge.Package.Package instance
@param ordered: bool
@rtype pkg_info dictionary
Modifies self.counters.restrict_fetch,
def do_changelog(self, pkg, pkg_info):
"""Processes and adds the changelog text to the master text for output
- @param pkg: _emerge.Package instance
+ @param pkg: _emerge.Package.Package instance
@param pkg_info: dictionay
Modifies self.changelogs
"""
def check_system_world(self, pkg):
"""Checks for any occurances of the package in the system or world sets
- @param pkg: _emerge.Package instance
+ @param pkg: _emerge.Package.Package instance
@rtype system and world booleans
"""
root_config = self.conf.roots[pkg.root]
@staticmethod
def get_ver_str(pkg):
"""Obtains the version string
- @param pkg: _emerge.Package instance
+ @param pkg: _emerge.Package.Package instance
@rtype string
"""
ver_str = list(catpkgsplit(pkg.cpv)[2:])
param is used for -u, where you still *do* want to see when
something is being upgraded.
- @param pkg: _emerge.Package instance
+ @param pkg: _emerge.Package.Package instance
@param pkg_info: dictionay
@rtype addl, myoldbest: list, myinslotlist: list
Modifies self.counters.reinst, self.counters.binary, self.counters.new
# and disable the entire repo display in this case.
repoadd_set = set()
+ self.verbose_main_repo_display = "--verbose-main-repo-display" in depgraph._frozen_config.myopts
+
for mylist_index in range(len(mylist)):
pkg, depth, ordered = mylist[mylist_index]
self.portdb = self.conf.trees[pkg.root]["porttree"].dbapi
continue
else:
pkg_info = self.set_pkg_info(pkg, ordered)
- addl, pkg_info.oldbest, myinslotlist = \
+ addl, pkg_info.oldbest_list, myinslotlist = \
self._get_installed_best(pkg, pkg_info)
self.verboseadd = ""
if self.quiet_repo_display:
self.repoadd = None
- self._display_use(pkg, pkg_info.oldbest, myinslotlist)
+ self._display_use(pkg, pkg_info.oldbest_list, myinslotlist)
self.recheck_hidden(pkg)
if self.conf.verbosity == 3:
if self.quiet_repo_display:
self.oldlp = self.conf.columnwidth - 30
self.newlp = self.oldlp - 30
- pkg_info.oldbest = self.convert_myoldbest(pkg_info.oldbest)
+ pkg_info.oldbest = self.convert_myoldbest(pkg, pkg_info.oldbest_list)
pkg_info.system, pkg_info.world = \
self.check_system_world(pkg)
addl = self.set_interactive(pkg, pkg_info.ordered, addl)
addl, pkg_info, pkg)
else:
pkg_str = pkg.cpv
- if self.conf.verbosity == 3 and not self.quiet_repo_display:
+ if self.conf.verbosity == 3 and not self.quiet_repo_display and (self.verbose_main_repo_display or
+ (any(x.repo != self.portdb.repositories.mainRepo().name for x in pkg_info.oldbest_list + [pkg]))):
pkg_str += _repo_separator + pkg.repo
if not pkg_info.merge:
addl = self.empty_space_in_brackets()