summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-02-17 15:56:56 -0800
committerZac Medico <zmedico@gentoo.org>2012-02-17 16:00:32 -0800
commitce20cdf1e868e8628b541abec9b99f3527ca22a1 (patch)
treeb952a908cf22fa18fa86e5b3ef1480afd06805cc
parentportage.5: layout.conf manifest-hashes example (diff)
downloadportage-ce20cdf1e868e8628b541abec9b99f3527ca22a1.tar.gz
portage-ce20cdf1e868e8628b541abec9b99f3527ca22a1.tar.bz2
portage-ce20cdf1e868e8628b541abec9b99f3527ca22a1.zip
repoman: make virtual.oldstyle an error
Also, add "allow-provide-virtuals = true" setting for metadata/layout.conf which reduces it to a warning.
-rwxr-xr-xbin/repoman4
-rw-r--r--man/repoman.15
-rw-r--r--pym/portage/repository/config.py9
3 files changed, 13 insertions, 5 deletions
diff --git a/bin/repoman b/bin/repoman
index f3946eae5..bcb48e464 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -427,7 +427,6 @@ qawarnings = set((
"portage.internal",
"usage.obsolete",
"upstream.workaround",
-"virtual.oldstyle",
"LIVEVCS.stable",
"LIVEVCS.unmasked",
))
@@ -580,6 +579,9 @@ repo_config = repoman_settings.repositories.get_repo_for_location(repodir)
portdb.porttrees = list(repo_config.eclass_db.porttrees)
portdir = portdb.porttrees[0]
+if repo_config.allow_provide_virtual:
+ qawarnings.add("virtual.oldstyle")
+
if repo_config.sign_commit:
if vcs == 'git':
# NOTE: It's possible to use --gpg-sign=key_id to specify the key in
diff --git a/man/repoman.1 b/man/repoman.1
index f53a19e5f..ddabbbb5b 100644
--- a/man/repoman.1
+++ b/man/repoman.1
@@ -1,4 +1,4 @@
-.TH "REPOMAN" "1" "Oct 2011" "Portage VERSION" "Portage"
+.TH "REPOMAN" "1" "Feb 2012" "Portage VERSION" "Portage"
.SH NAME
repoman \- Gentoo's program to enforce a minimal level of quality assurance in packages added to the portage tree
.SH SYNOPSIS
@@ -363,7 +363,8 @@ Assigning a readonly variable
Ebuild uses D, ROOT, ED, EROOT or EPREFIX with helpers
.TP
.B virtual.oldstyle
-The ebuild PROVIDEs an old-style virtual (see GLEP 37)
+The ebuild PROVIDEs an old-style virtual (see GLEP 37). This is an error
+unless "allow\-provide\-virtuals = true" is set in metadata/layout.conf.
.TP
.B wxwidgets.eclassnotused
Ebuild DEPENDs on x11-libs/wxGTK without inheriting wxwidgets.eclass. Refer to
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index 84d97411e..defdb47c8 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -45,7 +45,7 @@ def _gen_valid_repo(name):
class RepoConfig(object):
"""Stores config of one repository"""
- __slots__ = ('aliases', 'allow_missing_manifest',
+ __slots__ = ('aliases', 'allow_missing_manifest', 'allow_provide_virtual',
'cache_formats', 'create_manifest', 'disable_manifest', 'eapi',
'eclass_db', 'eclass_locations', 'eclass_overrides', 'format', 'location',
'main_repo', 'manifest_hashes', 'masters', 'missing_repo_name',
@@ -123,6 +123,7 @@ class RepoConfig(object):
self.sign_manifest = True
self.thin_manifest = False
self.allow_missing_manifest = False
+ self.allow_provide_virtual = False
self.create_manifest = True
self.disable_manifest = False
self.manifest_hashes = None
@@ -149,7 +150,8 @@ class RepoConfig(object):
# them the ability to do incremental overrides
self.aliases = layout_data['aliases'] + tuple(aliases)
- for value in ('allow-missing-manifest', 'cache-formats',
+ for value in ('allow-missing-manifest',
+ 'allow-provide-virtual', 'cache-formats',
'create-manifest', 'disable-manifest', 'manifest-hashes',
'sign-commit', 'sign-manifest', 'thin-manifest', 'update-changelog'):
setattr(self, value.lower().replace("-", "_"), layout_data[value])
@@ -691,6 +693,9 @@ def parse_layout_conf(repo_location, repo_name=None):
data['masters'] = masters
data['aliases'] = tuple(layout_data.get('aliases', '').split())
+ data['allow-provide-virtual'] = \
+ layout_data.get('allow-provide-virtuals', 'false').lower() == 'true'
+
data['sign-commit'] = layout_data.get('sign-commits', 'false').lower() \
== 'true'