aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gmail.com>2015-06-22 23:23:32 -0400
committerTim Harder <radhermit@gmail.com>2015-06-28 11:47:00 -0400
commitb1dc100b2b252a0006862a29b418018a574684e3 (patch)
tree2a247d5b18ebce6cdc5610d63bbc6f5d50bbce0b
parentdomain: split configuring and filtering repos into separate method (diff)
downloadpkgcore-repos.tar.gz
pkgcore-repos.tar.bz2
pkgcore-repos.zip
Shorten 'repositories' usage to 'repos' to be more consistentrepos
This slightly breaks the API in a few places, namely in pkgcore.config.domain if the installed_repositories and source_repositories attrs are used externally.
-rw-r--r--pkgcore/binpkg/remote.py2
-rw-r--r--pkgcore/config/dhcpformat.py2
-rw-r--r--pkgcore/config/domain.py8
-rw-r--r--pkgcore/config/mke2fsformat.py2
-rw-r--r--pkgcore/ebuild/portage_conf.py4
-rw-r--r--pkgcore/ebuild/repository.py6
-rw-r--r--pkgcore/operations/domain.py15
-rw-r--r--pkgcore/repository/multiplex.py10
-rw-r--r--pkgcore/repository/util.py16
-rw-r--r--pkgcore/resolver/plan.py2
-rw-r--r--pkgcore/scripts/pconfig.py2
-rw-r--r--pkgcore/scripts/pinspect.py22
-rw-r--r--pkgcore/scripts/pmaint.py10
-rw-r--r--pkgcore/scripts/pmerge.py12
-rw-r--r--pkgcore/scripts/pquery.py4
15 files changed, 54 insertions, 63 deletions
diff --git a/pkgcore/binpkg/remote.py b/pkgcore/binpkg/remote.py
index ba4d52e34..2d8570a74 100644
--- a/pkgcore/binpkg/remote.py
+++ b/pkgcore/binpkg/remote.py
@@ -5,7 +5,7 @@
remote binpkg support
Currently this primarily just holds the Packages cache used for remote, and
-local binpkg repositories
+local binpkg repos
"""
__all__ = ("PackagesCacheV0", "PackagesCacheV1", "write_index")
diff --git a/pkgcore/config/dhcpformat.py b/pkgcore/config/dhcpformat.py
index 32ab7f919..00178fccc 100644
--- a/pkgcore/config/dhcpformat.py
+++ b/pkgcore/config/dhcpformat.py
@@ -23,7 +23,7 @@ Example of the supported format (not a complete config)::
package.keywords "/etc/portage/package.keywords";
default yes;
# this is a section reference, with a nested anonymous section.
- repositories {
+ repos {
type repo;
class pkgcore.ebuild.repository.tree;
location /usr/portage;
diff --git a/pkgcore/config/domain.py b/pkgcore/config/domain.py
index 309add9bf..88d1bd268 100644
--- a/pkgcore/config/domain.py
+++ b/pkgcore/config/domain.py
@@ -35,15 +35,15 @@ class domain(object):
return tuple(l)
@klass.jit_attr
- def source_repositories(self):
+ def source_repos(self):
return repo_utils.RepositoryGroup(self.repos)
@klass.jit_attr
- def installed_repositories(self):
+ def installed_repos(self):
return repo_utils.RepositoryGroup(self.vdb)
- all_repos = klass.alias_attr("source_repositories.combined")
- all_livefs_repos = klass.alias_attr("installed_repositories.combined")
+ all_repos = klass.alias_attr("source_repos.combined")
+ all_livefs_repos = klass.alias_attr("installed_repos.combined")
def pkg_operations(self, pkg, observer=None):
return pkg.operations(self, observer=observer)
diff --git a/pkgcore/config/mke2fsformat.py b/pkgcore/config/mke2fsformat.py
index baab2a2b6..211228dca 100644
--- a/pkgcore/config/mke2fsformat.py
+++ b/pkgcore/config/mke2fsformat.py
@@ -23,7 +23,7 @@ Example of the supported format (not a complete config)::
package.keywords = "/etc/portage/package.keywords"
default = yes
# this is a section reference, with a nested anonymous section.
- repositories = {
+ repos = {
type = repo
class = pkgcore.ebuild.repository.tree
location = /usr/portage
diff --git a/pkgcore/ebuild/portage_conf.py b/pkgcore/ebuild/portage_conf.py
index 68f3800d9..e48a819ec 100644
--- a/pkgcore/ebuild/portage_conf.py
+++ b/pkgcore/ebuild/portage_conf.py
@@ -496,7 +496,7 @@ def config_from_make_conf(location="/etc/", profile_override=None, **kwargs):
config['repo-stack'] = basics.FakeIncrementalDictConfigSection(
my_convert_hybrid, {
'class': 'pkgcore.repository.multiplex.config_tree',
- 'repositories': tuple(repos)})
+ 'repos': tuple(repos)})
else:
config['repo-stack'] = basics.section_alias(repos[0], 'repo')
@@ -597,7 +597,7 @@ def config_from_make_conf(location="/etc/", profile_override=None, **kwargs):
# finally... domain.
make_conf.update({
'class': 'pkgcore.ebuild.domain.domain',
- 'repositories': tuple(repos),
+ 'repos': tuple(repos),
'fetcher': 'fetcher',
'default': True,
'vdb': ('vdb',),
diff --git a/pkgcore/ebuild/repository.py b/pkgcore/ebuild/repository.py
index 2a33672ed..a2f4ac1f1 100644
--- a/pkgcore/ebuild/repository.py
+++ b/pkgcore/ebuild/repository.py
@@ -136,9 +136,9 @@ def _sort_eclasses(config, raw_repo, eclasses):
% (raw_repo.repo_id, repo_path, ', '.join(map(repr, masters)), missing))
eclasses = [repo_map[x] for x in masters]
- # add the repositories eclasses directories if it's not specified.
- # do it in this fashion so that the repositories masters can actually interpose
- # this repositories eclasses in between others.
+ # add the repo's eclasses directories if it's not specified.
+ # do it in this fashion so that the repo's masters can actually interpose
+ # this repo's eclasses in between others.
# admittedly an odd thing to do, but it has some benefits
if repo_path not in eclasses:
eclasses.append(repo_path)
diff --git a/pkgcore/operations/domain.py b/pkgcore/operations/domain.py
index 16851d315..feaf4036d 100644
--- a/pkgcore/operations/domain.py
+++ b/pkgcore/operations/domain.py
@@ -128,10 +128,7 @@ class base(object):
class install(base):
- """base interface for installing a pkg into a livefs repo.
-
- repositories should override as needed.
- """
+ """base interface for installing a pkg into a livefs repo."""
stage_depends = {
"finish": "postinst",
@@ -197,10 +194,7 @@ class install(base):
class uninstall(base):
- """base interface for uninstalling a pkg from a livefs repo.
-
- Repositories should override as needed.
- """
+ """base interface for uninstalling a pkg from a livefs repo."""
stage_depends = {
"finish": "postrm",
@@ -269,10 +263,7 @@ class uninstall(base):
class replace(install, uninstall):
- """base interface for replacing a pkg in a livefs repo with another.
-
- Repositories should override as needed.
- """
+ """base interface for replacing a pkg in a livefs repo with another."""
stage_depends = {
"finish": "postinst",
diff --git a/pkgcore/repository/multiplex.py b/pkgcore/repository/multiplex.py
index 30474bac2..b8f7af614 100644
--- a/pkgcore/repository/multiplex.py
+++ b/pkgcore/repository/multiplex.py
@@ -2,7 +2,7 @@
# License: GPL2/BSD
"""
-repository that combines multiple repositories together
+repository that combines multiple repos together
"""
__all__ = ("tree", "operations")
@@ -60,13 +60,13 @@ class operations(repo_interface.operations_proxy):
return ret
-@configurable({'repositories': 'refs:repo'}, typename='repo')
-def config_tree(repositories):
- return tree(*repositories)
+@configurable({'repos': 'refs:repo'}, typename='repo')
+def config_tree(repos):
+ return tree(*repos)
class tree(prototype.tree):
- """repository combining multiple repositories into one"""
+ """repository combining multiple repos into one"""
zero_index_grabber = itemgetter(0)
frozen_settable = False
diff --git a/pkgcore/repository/util.py b/pkgcore/repository/util.py
index 99b9d7ce4..5cfe42afc 100644
--- a/pkgcore/repository/util.py
+++ b/pkgcore/repository/util.py
@@ -56,13 +56,13 @@ class SimpleTree(tree):
class RepositoryGroup(object):
- def __init__(self, repositories, combined=None):
- self.repositories = tuple(repositories)
+ def __init__(self, repos, combined=None):
+ self.repos = tuple(repos)
if combined is None:
- if len(self.repositories) == 1:
- combined = self.repositories[0]
+ if len(self.repos) == 1:
+ combined = self.repos[0]
else:
- combined = multiplex.tree(*self.repositories)
+ combined = multiplex.tree(*self.repos)
self.combined = combined
itermatch = klass.alias_attr("combined.itermatch")
@@ -70,8 +70,8 @@ class RepositoryGroup(object):
match = klass.alias_attr("combined.match")
def __iter__(self):
- return iter(self.repositories)
+ return iter(self.repos)
@classmethod
- def change_repos(cls, repositories):
- return cls(repositories)
+ def change_repos(cls, repos):
+ return cls(repos)
diff --git a/pkgcore/resolver/plan.py b/pkgcore/resolver/plan.py
index a4661a416..f9a827bed 100644
--- a/pkgcore/resolver/plan.py
+++ b/pkgcore/resolver/plan.py
@@ -832,7 +832,7 @@ class merge_plan(object):
:param dbs: db list to walk
:param just_vdb: if None, no filtering; if True, just vdb, if False,
non-vdb only
- :return: yields repositories in requested ordering
+ :return: yields repos in requested ordering
"""
return chain(cls.just_livefs_dbs(dbs), cls.just_nonlivefs_dbs(dbs))
diff --git a/pkgcore/scripts/pconfig.py b/pkgcore/scripts/pconfig.py
index 03dfbcdc5..e7baf7e87 100644
--- a/pkgcore/scripts/pconfig.py
+++ b/pkgcore/scripts/pconfig.py
@@ -336,7 +336,7 @@ commandline.make_query(
def package_func(options, out, err):
matched = True
domain = options.domain
- for pkg in domain.installed_repositories.combined.itermatch(options.query):
+ for pkg in domain.installed_repos.combined.itermatch(options.query):
matched = True
ops = domain.pkg_operations(pkg)
if not ops.supports("configure"):
diff --git a/pkgcore/scripts/pinspect.py b/pkgcore/scripts/pinspect.py
index 61dafa6be..cf0311ef5 100644
--- a/pkgcore/scripts/pinspect.py
+++ b/pkgcore/scripts/pinspect.py
@@ -126,7 +126,7 @@ class histo_data(commandline.ArgparseCommand):
"repos", metavar='repo', nargs='*',
action=commandline.StoreRepoObject, store_name=True,
default=commandline.CONFIG_ALL_DEFAULT,
- help="repositories to inspect")
+ help="repos to inspect")
commandline.ArgparseCommand.bind_to_parser(self, parser)
@@ -188,7 +188,7 @@ class eapi_usage_kls(histo_data):
per_repo_format = ("eapi: %(key)r %(val)s pkgs found, %(percent)s of the repository")
- summary_format = ("eapi: %(key)r %(val)s pkgs found, %(percent)s of all repositories")
+ summary_format = ("eapi: %(key)r %(val)s pkgs found, %(percent)s of all repos")
def get_data(self, repo, options):
eapis = {}
@@ -199,7 +199,7 @@ class eapi_usage_kls(histo_data):
return eapis, pos + 1
eapi_usage = subparsers.add_parser(
- "eapi_usage", description="report of eapi usage for targeted repositories")
+ "eapi_usage", description="report of eapi usage for targeted repos")
eapi_usage.bind_class(eapi_usage_kls())
@@ -207,7 +207,7 @@ class license_usage_kls(histo_data):
per_repo_format = "license: %(key)r %(val)s pkgs found, %(percent)s of the repository"
- summary_format = "license: %(key)r %(val)s pkgs found, %(percent)s of all repositories"
+ summary_format = "license: %(key)r %(val)s pkgs found, %(percent)s of all repos"
def get_data(self, repo, options):
data = {}
@@ -219,7 +219,7 @@ class license_usage_kls(histo_data):
return data, pos + 1
license_usage = subparsers.add_parser(
- "license_usage", description="report of license usage for targeted repositories")
+ "license_usage", description="report of license usage for targeted repos")
license_usage.bind_class(license_usage_kls())
@@ -227,7 +227,7 @@ class eclass_usage_kls(histo_data):
per_repo_format = "eclass: %(key)r %(val)s pkgs found, %(percent)s of the repository"
- summary_format = "eclass: %(key)r %(val)s pkgs found, %(percent)s of all repositories"
+ summary_format = "eclass: %(key)r %(val)s pkgs found, %(percent)s of all repos"
def get_data(self, repo, options):
pos, data = 0, defaultdict(lambda:0)
@@ -237,7 +237,7 @@ class eclass_usage_kls(histo_data):
return data, pos + 1
eclass_usage = subparsers.add_parser(
- "eclass_usage", description="report of eclass usage for targeted repositories")
+ "eclass_usage", description="report of eclass usage for targeted repos")
eclass_usage.bind_class(eclass_usage_kls())
@@ -245,7 +245,7 @@ class mirror_usage_kls(histo_data):
per_repo_format = "mirror: %(key)r %(val)s pkgs found, %(percent)s of the repository"
- summary_format = "mirror: %(key)r %(val)s pkgs found, %(percent)s of all repositories"
+ summary_format = "mirror: %(key)r %(val)s pkgs found, %(percent)s of all repos"
def get_data(self, repo, options):
data = {}
@@ -261,7 +261,7 @@ class mirror_usage_kls(histo_data):
return data, pos + 1
mirror_usage = subparsers.add_parser(
- "mirror_usage", description="report of SRC_URI mirror usage for targeted repositories")
+ "mirror_usage", description="report of SRC_URI mirror usage for targeted repos")
mirror_usage.bind_class(mirror_usage_kls())
@@ -271,7 +271,7 @@ class distfiles_usage_kls(histo_data):
per_repo_summary = "unique total %(total)i bytes, sharing %(shared)i bytes"
- summary_format = "package: %(key)r %(val)s pkgs found, %(percent)s of all repositories"
+ summary_format = "package: %(key)r %(val)s pkgs found, %(percent)s of all repos"
allow_no_detail = True
@@ -315,7 +315,7 @@ class distfiles_usage_kls(histo_data):
distfiles_usage = subparsers.add_parser(
"distfiles_usage",
- description="report detailing distfiles space usage for targeted repositories")
+ description="report detailing distfiles space usage for targeted repos")
distfiles_usage.bind_class(distfiles_usage_kls())
diff --git a/pkgcore/scripts/pmaint.py b/pkgcore/scripts/pmaint.py
index 572d4b86e..c56c1b412 100644
--- a/pkgcore/scripts/pmaint.py
+++ b/pkgcore/scripts/pmaint.py
@@ -50,7 +50,7 @@ sync = subparsers.add_parser(
"sync", parents=shared_options,
description="synchronize a local repository with its defined remote")
sync.add_argument(
- 'repos', nargs='*', help="repositories to sync",
+ 'repos', nargs='*', help="repos to sync",
action=commandline.StoreRepoObject, store_name=True, raw=True)
sync.add_argument(
"-q", "--quiet", action='store_true',
@@ -60,7 +60,7 @@ sync.add_argument(
help="show verbose output")
@sync.bind_main_func
def sync_main(options, out, err):
- """Update local repositories to match their remote parents"""
+ """Update local repos to match their remote parents"""
if options.quiet:
options.verbose = 0
@@ -107,7 +107,7 @@ def sync_main(options, out, err):
copy = subparsers.add_parser(
"copy", parents=shared_options,
- description="copy binpkgs between repositories; primarily useful for "
+ description="copy binpkgs between repos; primarily useful for "
"quickpkging a livefs pkg")
copy.add_argument(
'target_repo', action=commandline.StoreRepoObject,
@@ -127,7 +127,7 @@ copy.add_argument(
@copy.bind_main_func
def copy_main(options, out, err):
- """Copy pkgs between repositories."""
+ """Copy pkgs between repos."""
src_repo = options.source_repo
if src_repo is None:
@@ -335,7 +335,7 @@ def mirror_main(options, out, err):
digest = subparsers.add_parser(
"digest",
- description="update a repositories package manifest/digest information",
+ description="update a repo's package manifest/digest information",
parents=(commandline.mk_argparser(add_help=False),))
digest.add_argument(
"--repo", "--repository", help="repository to update",
diff --git a/pkgcore/scripts/pmerge.py b/pkgcore/scripts/pmerge.py
index 6f3a55613..69df73d9d 100644
--- a/pkgcore/scripts/pmerge.py
+++ b/pkgcore/scripts/pmerge.py
@@ -149,7 +149,7 @@ output_options.add_argument(
output_options.add_argument(
'--quiet-repo-display', action='store_true',
help="In the package merge list display, suppress ::repository "
- "output, and instead use numbers to indicate which repositories "
+ "output, and instead use numbers to indicate which repos "
"packages come from.")
output_options.add_argument(
'-F', '--formatter', priority=90,
@@ -453,8 +453,8 @@ def main(options, out, err):
return 1
return
- source_repos = domain.source_repositories
- installed_repos = domain.installed_repositories
+ source_repos = domain.source_repos
+ installed_repos = domain.installed_repos
if options.usepkgonly:
source_repos = source_repos.change_repos(
@@ -545,7 +545,7 @@ def main(options, out, err):
# hp.setrelheap()
resolver_inst = resolver_kls(
- installed_repos.repositories, source_repos.repositories,
+ installed_repos.repos, source_repos.repos,
verify_vdb=options.deep, nodeps=options.nodeps,
drop_cycles=options.ignore_cycles, force_replace=options.replace,
process_built_depends=options.with_bdeps, **extra_kwargs)
@@ -587,14 +587,14 @@ def main(options, out, err):
out.error("failed '%s'" % (restrict,))
out.write('potentials:')
match_count = 0
- for r in repo_utils.get_raw_repos(source_repos.repositories):
+ for r in repo_utils.get_raw_repos(source_repos.repos):
l = r.match(restrict)
if l:
out.write(
"repo %s: [ %s ]" % (r, ", ".join(str(x) for x in l)))
match_count += len(l)
if not match_count:
- out.write("No matches found in %s" % (source_repos.repositories,))
+ out.write("No matches found in %s" % (source_repos.repos,))
out.write()
if not options.ignore_failures:
return 1
diff --git a/pkgcore/scripts/pquery.py b/pkgcore/scripts/pquery.py
index c9f2302d4..df6ef858c 100644
--- a/pkgcore/scripts/pquery.py
+++ b/pkgcore/scripts/pquery.py
@@ -416,7 +416,7 @@ def print_packages_noversion(options, out, err, pkgs):
# priority 0 (commandline sets this):
# basically, sort the config first (additions/removals/etc),
# priority 30:
-# sort the repositories
+# sort the repos
# priority 50:
# sort the query args individually (potentially accessing the config) along
# or lines for each (thus multiple revdep args are or'd together)
@@ -431,7 +431,7 @@ argparser = commandline.mk_argparser(
repo_group = argparser.add_argument_group(
'Repository matching options',
- 'options controlling which repositories to inspect.')
+ 'options controlling which repos to inspect.')
repo_group.add_argument(
'--raw', action='store_true', default=False,
help="With this switch enabled, no configuration is used, and no filtering "