From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com>
To: Gentoo Portage Development <gentoo-portage-dev@lists.gentoo.org>
Subject: [gentoo-portage-dev] [PATCH] emerge --info: Always print ::repository
Date: Sat, 13 Dec 2014 08:24:03 +0100 [thread overview]
Message-ID: <201412130824.04672.Arfrever.FTA@gmail.com> (raw)
[-- Attachment #1.1: Type: Text/Plain, Size: 193 bytes --]
[[[
emerge --info: Always print ::repository.
1 call to deprecated portage.repository.config.RepoConfigLoader.mainRepo() function
has been deleted.
]]]
--
Arfrever Frehtes Taifersar Arahesis
[-- Attachment #1.2: portage.patch --]
[-- Type: text/x-patch, Size: 2765 bytes --]
--- pym/_emerge/actions.py
+++ pym/_emerge/actions.py
@@ -42,7 +42,7 @@ from portage.const import GLOBAL_CONFIG_PATH, VCS_DIRS, _DEPCLEAN_LIB_CHECK_DEFA
from portage.const import SUPPORTED_BINPKG_FORMATS, TIMESTAMP_FORMAT
from portage.dbapi.dep_expand import dep_expand
from portage.dbapi._expand_new_virt import expand_new_virt
-from portage.dep import Atom
+from portage.dep import Atom, _repo_separator, _slot_separator
from portage.eclass_cache import hashed_path
from portage.exception import InvalidAtom, InvalidData, ParseError
from portage.output import blue, colorize, create_color_func, darkgreen, \
@@ -1668,9 +1668,6 @@ def action_info(settings, trees, myopts, myfiles):
myvars = sorted(set(atoms))
- main_repo = portdb.repositories.mainRepo()
- if main_repo is not None:
- main_repo = main_repo.name
cp_map = {}
cp_max_len = 0
@@ -1692,12 +1689,10 @@ def action_info(settings, trees, myopts, myfiles):
if len(matched_cp) > cp_max_len:
cp_max_len = len(matched_cp)
repo = vardb.aux_get(cpv, ["repository"])[0]
- if repo == main_repo:
- repo_suffix = ""
- elif not repo:
- repo_suffix = "::<unknown repository>"
+ if repo:
+ repo_suffix = _repo_separator + repo
else:
- repo_suffix = "::" + repo
+ repo_suffix = _repo_separator + "<unknown repository>"
if matched_cp == orig_atom.cp:
provide_suffix = ""
@@ -1826,13 +1821,13 @@ def action_info(settings, trees, myopts, myfiles):
if pkg_type == "installed":
append("\n%s was built with the following:" % \
- colorize("INFORM", str(pkg.cpv)))
+ colorize("INFORM", str(pkg.cpv + _repo_separator + pkg.repo)))
elif pkg_type == "ebuild":
- append("\n%s would be build with the following:" % \
- colorize("INFORM", str(pkg.cpv)))
+ append("\n%s would be built with the following:" % \
+ colorize("INFORM", str(pkg.cpv + _repo_separator + pkg.repo)))
elif pkg_type == "binary":
append("\n%s (non-installed binary) was built with the following:" % \
- colorize("INFORM", str(pkg.cpv)))
+ colorize("INFORM", str(pkg.cpv + _repo_separator + pkg.repo)))
append('%s' % pkg_use_display(pkg, myopts))
if pkg_type == "installed":
@@ -2015,10 +2010,10 @@ def action_uninstall(settings, trees, ldpath_mtimes,
atom = "=" + atom + "-" + \
portage.versions.cpv_getversion(cpv)
if ext_atom.slot:
- atom += ":" + ext_atom.slot
+ atom += _slot_separator + ext_atom.slot
require_metadata = True
if ext_atom.repo:
- atom += "::" + ext_atom.repo
+ atom += _repo_separator + ext_atom.repo
require_metadata = True
atom = Atom(atom, allow_repo=True)
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next reply other threads:[~2014-12-13 7:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-13 7:24 Arfrever Frehtes Taifersar Arahesis [this message]
2014-12-13 13:32 ` [gentoo-portage-dev] [PATCH] emerge --info: Always print ::repository Alexander Berntsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201412130824.04672.Arfrever.FTA@gmail.com \
--to=arfrever.fta@gmail.com \
--cc=gentoo-portage-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox