def _set_non_root_columns(self, addl, pkg_info, pkg): """sets the indent level and formats the output @param addl: already defined string to add to @param pkg_info: dictionary @param pkg: _emerge.Package instance @rtype string """ if self.conf.quiet: myprint = addl + " " + self.indent + \ self.pkgprint(pkg_info.cp, pkg_info) myprint = myprint+darkblue(" "+pkg_info.ver)+" " myprint = myprint+pkg_info.oldbest myprint = myprint+darkgreen("to "+pkg.root) self.verboseadd = None else: if not pkg_info.merge: myprint = "[%s] %s%s" % \ (self.pkgprint(pkg_info.operation.ljust(13), pkg_info), self.indent, self.pkgprint(pkg.cp, pkg_info)) else: myprint = "[%s %s] %s%s" % \ (self.pkgprint(pkg.type_name, pkg_info), addl, self.indent, self.pkgprint(pkg.cp, pkg_info)) if (self.newlp-nc_len(myprint)) > 0: myprint = myprint+(" "*(self.newlp-nc_len(myprint))) myprint = myprint+"["+darkblue(pkg_info.ver)+"] " if (self.oldlp-nc_len(myprint)) > 0: myprint = myprint+" "*(self.oldlp-nc_len(myprint)) myprint = myprint+pkg_info.oldbest myprint += darkgreen("to " + pkg.root) return myprint
def _set_non_root_columns(self, pkg, pkg_info): """sets the indent level and formats the output @param pkg: _emerge.Package.Package instance @param pkg_info: dictionary @rtype string """ ver_str = self._append_build_id(pkg_info.ver, pkg, pkg_info) if self.conf.verbosity == 3: ver_str = self._append_slot(ver_str, pkg, pkg_info) ver_str = self._append_repository(ver_str, pkg, pkg_info) if self.conf.quiet: myprint = (str(pkg_info.attr_display) + " " + self.indent + self.pkgprint(pkg_info.cp, pkg_info)) myprint = myprint + darkblue(" " + ver_str) + " " myprint = myprint + pkg_info.oldbest myprint = myprint + darkgreen("to " + pkg.root) self.verboseadd = None else: if not pkg_info.merge: myprint = "[%s] %s%s" % ( self.pkgprint(pkg_info.operation.ljust(13), pkg_info), self.indent, self.pkgprint(pkg.cp, pkg_info), ) else: myprint = "[%s %s] %s%s" % ( self.pkgprint(pkg.type_name, pkg_info), pkg_info.attr_display, self.indent, self.pkgprint(pkg.cp, pkg_info), ) if (self.newlp - nc_len(myprint)) > 0: myprint = myprint + (" " * (self.newlp - nc_len(myprint))) myprint = myprint + " " + darkblue("[" + ver_str + "]") + " " if (self.oldlp - nc_len(myprint)) > 0: myprint = myprint + " " * (self.oldlp - nc_len(myprint)) myprint = myprint + pkg_info.oldbest myprint += darkgreen("to " + pkg.root) return myprint
def _set_non_root_columns(self, pkg_info, pkg): """sets the indent level and formats the output @param pkg_info: dictionary @param pkg: _emerge.Package.Package instance @rtype string """ ver_str = pkg_info.ver 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 = str(pkg_info.attr_display) + " " + self.indent + \ self.pkgprint(pkg_info.cp, pkg_info) myprint = myprint + darkblue(" " + ver_str) + " " myprint = myprint + pkg_info.oldbest myprint = myprint + darkgreen("to " + pkg.root) self.verboseadd = None else: if not pkg_info.merge: myprint = "[%s] %s%s" % \ (self.pkgprint(pkg_info.operation.ljust(13), pkg_info), self.indent, self.pkgprint(pkg.cp, pkg_info)) else: myprint = "[%s %s] %s%s" % \ (self.pkgprint(pkg.type_name, pkg_info), pkg_info.attr_display, self.indent, self.pkgprint(pkg.cp, pkg_info)) if (self.newlp - nc_len(myprint)) > 0: myprint = myprint + (" " * (self.newlp - nc_len(myprint))) myprint = myprint + " " + darkblue("[" + ver_str + "]") + " " if (self.oldlp - nc_len(myprint)) > 0: myprint = myprint + " " * (self.oldlp - nc_len(myprint)) myprint = myprint + pkg_info.oldbest myprint += darkgreen("to " + pkg.root) return myprint
def _set_non_root_columns(self, pkg, pkg_info): """sets the indent level and formats the output @param pkg: _emerge.Package.Package instance @param pkg_info: dictionary @rtype string """ ver_str = pkg_info.ver if self.conf.verbosity == 3: ver_str = self._append_slot(ver_str, pkg, pkg_info) ver_str = self._append_repository(ver_str, pkg, pkg_info) if self.conf.quiet: myprint = _unicode(pkg_info.attr_display) + " " + self.indent + \ self.pkgprint(pkg_info.cp, pkg_info) myprint = myprint+darkblue(" "+ver_str)+" " myprint = myprint+pkg_info.oldbest myprint = myprint+darkgreen("to "+pkg.root) self.verboseadd = None else: if not pkg_info.merge: myprint = "[%s] %s%s" % \ (self.pkgprint(pkg_info.operation.ljust(13), pkg_info), self.indent, self.pkgprint(pkg.cp, pkg_info)) else: myprint = "[%s %s] %s%s" % \ (self.pkgprint(pkg.type_name, pkg_info), pkg_info.attr_display, self.indent, self.pkgprint(pkg.cp, pkg_info)) if (self.newlp-nc_len(myprint)) > 0: myprint = myprint+(" "*(self.newlp-nc_len(myprint))) myprint = myprint+" "+darkblue("["+ver_str+"]")+" " if (self.oldlp-nc_len(myprint)) > 0: myprint = myprint+" "*(self.oldlp-nc_len(myprint)) myprint = myprint+pkg_info.oldbest myprint += darkgreen("to " + pkg.root) return myprint
def _set_non_root_columns(self, addl, pkg_info, pkg): """sets the indent level and formats the output @param addl: already defined string to add to @param pkg_info: dictionary @param pkg: _emerge.Package.Package instance @rtype string """ ver_str = pkg_info.ver 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 + \ self.pkgprint(pkg_info.cp, pkg_info) myprint = myprint+darkblue(" "+ver_str)+" " myprint = myprint+pkg_info.oldbest myprint = myprint+darkgreen("to "+pkg.root) self.verboseadd = None else: if not pkg_info.merge: myprint = "[%s] %s%s" % \ (self.pkgprint(pkg_info.operation.ljust(13), pkg_info), self.indent, self.pkgprint(pkg.cp, pkg_info)) else: myprint = "[%s %s] %s%s" % \ (self.pkgprint(pkg.type_name, pkg_info), addl, self.indent, self.pkgprint(pkg.cp, pkg_info)) if (self.newlp-nc_len(myprint)) > 0: myprint = myprint+(" "*(self.newlp-nc_len(myprint))) myprint = myprint+" "+darkblue("["+ver_str+"]")+" " if (self.oldlp-nc_len(myprint)) > 0: myprint = myprint+" "*(self.oldlp-nc_len(myprint)) myprint = myprint+pkg_info.oldbest myprint += darkgreen("to " + pkg.root) return myprint