public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:master commit in: man/, bin/, pym/portage/repository/
@ 2012-02-04 14:26 Zac Medico
  0 siblings, 0 replies; 5+ messages in thread
From: Zac Medico @ 2012-02-04 14:26 UTC (permalink / raw
  To: gentoo-commits

commit:     6cbf430ed3db0e9128a29280ca08f0309cbd933d
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  4 14:26:12 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Feb  4 14:26:12 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=6cbf430e

repoman: support git commit --gpg-sign

In order to sign commits with git, you will need Git >=1.7.9 and your
key will have to be configured by `git config user.signingkey key_id`.
Also, the repository will need to have "sign-commits = true" in
metadata/layout.conf. This will fix bug #333687.

---
 bin/repoman                      |    7 +++++++
 man/make.conf.5                  |    4 +++-
 man/portage.5                    |    3 +++
 pym/portage/repository/config.py |   10 ++++++++--
 4 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/bin/repoman b/bin/repoman
index 6e91254..bee6661 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -582,6 +582,13 @@ 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.sign_commit:
+	if vcs == 'git':
+		# NOTE: It's possible to use --gpg-sign=key_id to specify the key in
+		# the commit arguments. If key_id is unspecified, then it must be
+		# configured by `git config user.signingkey key_id`.
+		vcs_local_opts.append("--gpg-sign")
+
 # In order to disable manifest signatures, repos may set
 # "sign-manifests = false" in metadata/layout.conf. This
 # can be used to prevent merge conflicts like those that

diff --git a/man/make.conf.5 b/man/make.conf.5
index e5a9ae1..e8777c8 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -722,7 +722,9 @@ Defaults to $HOME/.gnupg.
 .TP
 .B PORTAGE_GPG_KEY
 The \fBgpg\fR(1) key used by \fBrepoman\fR(1) to sign manifests
-when \fBsign\fR is in \fBFEATURES\fR.
+when \fBsign\fR is in \fBFEATURES\fR. In order to sign commits with
+\fBgit\fR(1), you will need Git >=1.7.9 and your commit key will have
+to be configured by \fI`git config user.signingkey key_id`\fR.
 .TP
 .B PORTAGE_GPG_SIGNING_COMMAND
 The command used by \fBrepoman\fR(1) to sign manifests when \fBsign\fR is

diff --git a/man/portage.5 b/man/portage.5
index e2ed754..dd94a79 100644
--- a/man/portage.5
+++ b/man/portage.5
@@ -785,6 +785,9 @@ precedence over settings in \fBlayout.conf\fR, except tools such as
 masters = gentoo java-overlay
 # indicate that this repo can be used as a substitute for foo-overlay
 aliases = foo-overlay
+# sign commits in this repo, which requires Git >=1.7.9, and
+# key configured by `git config user.signingkey key_id`
+sign\-commits = true
 # do not sign manifests in this repo
 sign\-manifests = false
 # thin\-manifests only contain DIST entries

diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index ebee234..8896b2d 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -49,7 +49,7 @@ class RepoConfig(object):
 		'cache_formats', 'create_manifest', 'disable_manifest', 'eapi',
 		'eclass_db', 'eclass_locations', 'eclass_overrides', 'format', 'location',
 		'main_repo', 'manifest_hashes', 'masters', 'missing_repo_name',
-		'name', 'priority', 'sign_manifest', 'sync', 'thin_manifest',
+		'name', 'priority', 'sign_commit', 'sign_manifest', 'sync', 'thin_manifest',
 		'update_changelog', 'user_location', 'portage1_profiles',
 		'portage1_profiles_compat')
 
@@ -117,6 +117,9 @@ class RepoConfig(object):
 		self.eapi = eapi
 		self.name = name
 		self.missing_repo_name = missing
+		# sign_commit is disabled by default, since it requires Git >=1.7.9,
+		# and key_id configured by `git config user.signingkey key_id`
+		self.sign_commit = False
 		self.sign_manifest = True
 		self.thin_manifest = False
 		self.allow_missing_manifest = False
@@ -148,7 +151,7 @@ class RepoConfig(object):
 
 			for value in ('allow-missing-manifest', 'cache-formats',
 				'create-manifest', 'disable-manifest', 'manifest-hashes',
-				'sign-manifest', 'thin-manifest', 'update-changelog'):
+				'sign-commit', 'sign-manifest', 'thin-manifest', 'update-changelog'):
 				setattr(self, value.lower().replace("-", "_"), layout_data[value])
 
 			self.portage1_profiles = any(x.startswith("portage-1") \
@@ -688,6 +691,9 @@ def parse_layout_conf(repo_location, repo_name=None):
 	data['masters'] = masters
 	data['aliases'] = tuple(layout_data.get('aliases', '').split())
 
+	data['sign-commit'] = layout_data.get('sign-commits', 'true').lower() \
+		== 'true'
+
 	data['sign-manifest'] = layout_data.get('sign-manifests', 'true').lower() \
 		== 'true'
 



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/portage:master commit in: man/, bin/, pym/portage/repository/
@ 2012-02-04 14:39 Zac Medico
  0 siblings, 0 replies; 5+ messages in thread
From: Zac Medico @ 2012-02-04 14:39 UTC (permalink / raw
  To: gentoo-commits

commit:     1d6850f3ac839326c5596db5a570bc7832bb394e
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  4 14:26:12 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Feb  4 14:38:32 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=1d6850f3

repoman: support git commit --gpg-sign

In order to sign commits with git, you will need Git >=1.7.9 and your
key will have to be configured by `git config user.signingkey key_id`.
Also, the repository will need to have "sign-commits = true" in
metadata/layout.conf. This will fix bug #333687.

---
 bin/repoman                      |    7 +++++++
 man/make.conf.5                  |    4 +++-
 man/portage.5                    |    3 +++
 pym/portage/repository/config.py |   10 ++++++++--
 4 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/bin/repoman b/bin/repoman
index 6e91254..bee6661 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -582,6 +582,13 @@ 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.sign_commit:
+	if vcs == 'git':
+		# NOTE: It's possible to use --gpg-sign=key_id to specify the key in
+		# the commit arguments. If key_id is unspecified, then it must be
+		# configured by `git config user.signingkey key_id`.
+		vcs_local_opts.append("--gpg-sign")
+
 # In order to disable manifest signatures, repos may set
 # "sign-manifests = false" in metadata/layout.conf. This
 # can be used to prevent merge conflicts like those that

diff --git a/man/make.conf.5 b/man/make.conf.5
index e5a9ae1..e8777c8 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -722,7 +722,9 @@ Defaults to $HOME/.gnupg.
 .TP
 .B PORTAGE_GPG_KEY
 The \fBgpg\fR(1) key used by \fBrepoman\fR(1) to sign manifests
-when \fBsign\fR is in \fBFEATURES\fR.
+when \fBsign\fR is in \fBFEATURES\fR. In order to sign commits with
+\fBgit\fR(1), you will need Git >=1.7.9 and your commit key will have
+to be configured by \fI`git config user.signingkey key_id`\fR.
 .TP
 .B PORTAGE_GPG_SIGNING_COMMAND
 The command used by \fBrepoman\fR(1) to sign manifests when \fBsign\fR is

diff --git a/man/portage.5 b/man/portage.5
index e2ed754..dd94a79 100644
--- a/man/portage.5
+++ b/man/portage.5
@@ -785,6 +785,9 @@ precedence over settings in \fBlayout.conf\fR, except tools such as
 masters = gentoo java-overlay
 # indicate that this repo can be used as a substitute for foo-overlay
 aliases = foo-overlay
+# sign commits in this repo, which requires Git >=1.7.9, and
+# key configured by `git config user.signingkey key_id`
+sign\-commits = true
 # do not sign manifests in this repo
 sign\-manifests = false
 # thin\-manifests only contain DIST entries

diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index ebee234..84d9741 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -49,7 +49,7 @@ class RepoConfig(object):
 		'cache_formats', 'create_manifest', 'disable_manifest', 'eapi',
 		'eclass_db', 'eclass_locations', 'eclass_overrides', 'format', 'location',
 		'main_repo', 'manifest_hashes', 'masters', 'missing_repo_name',
-		'name', 'priority', 'sign_manifest', 'sync', 'thin_manifest',
+		'name', 'priority', 'sign_commit', 'sign_manifest', 'sync', 'thin_manifest',
 		'update_changelog', 'user_location', 'portage1_profiles',
 		'portage1_profiles_compat')
 
@@ -117,6 +117,9 @@ class RepoConfig(object):
 		self.eapi = eapi
 		self.name = name
 		self.missing_repo_name = missing
+		# sign_commit is disabled by default, since it requires Git >=1.7.9,
+		# and key_id configured by `git config user.signingkey key_id`
+		self.sign_commit = False
 		self.sign_manifest = True
 		self.thin_manifest = False
 		self.allow_missing_manifest = False
@@ -148,7 +151,7 @@ class RepoConfig(object):
 
 			for value in ('allow-missing-manifest', 'cache-formats',
 				'create-manifest', 'disable-manifest', 'manifest-hashes',
-				'sign-manifest', 'thin-manifest', 'update-changelog'):
+				'sign-commit', 'sign-manifest', 'thin-manifest', 'update-changelog'):
 				setattr(self, value.lower().replace("-", "_"), layout_data[value])
 
 			self.portage1_profiles = any(x.startswith("portage-1") \
@@ -688,6 +691,9 @@ def parse_layout_conf(repo_location, repo_name=None):
 	data['masters'] = masters
 	data['aliases'] = tuple(layout_data.get('aliases', '').split())
 
+	data['sign-commit'] = layout_data.get('sign-commits', 'false').lower() \
+		== 'true'
+
 	data['sign-manifest'] = layout_data.get('sign-manifests', 'true').lower() \
 		== 'true'
 



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/portage:master commit in: man/, bin/, pym/portage/repository/
@ 2012-02-17 23:57 Zac Medico
  0 siblings, 0 replies; 5+ messages in thread
From: Zac Medico @ 2012-02-17 23:57 UTC (permalink / raw
  To: gentoo-commits

commit:     023d0654fcb63174c0d0072c8e8fe80c71be2cea
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 17 23:56:56 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Feb 17 23:56:56 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=023d0654

repoman: make virtual.oldstyle an error

Also, add "allow-provide-virtuals = true" setting for
metadata/layout.conf which reduces it to a warning.

---
 bin/repoman                      |    4 +++-
 man/repoman.1                    |    3 ++-
 pym/portage/repository/config.py |    9 +++++++--
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/bin/repoman b/bin/repoman
index f3946ea..bcb48e4 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 f53a19e..ee4879c 100644
--- a/man/repoman.1
+++ b/man/repoman.1
@@ -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 84d9741..defdb47 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'
 



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/portage:master commit in: man/, bin/, pym/portage/repository/
@ 2012-02-18  0:01 Zac Medico
  0 siblings, 0 replies; 5+ messages in thread
From: Zac Medico @ 2012-02-18  0:01 UTC (permalink / raw
  To: gentoo-commits

commit:     ce20cdf1e868e8628b541abec9b99f3527ca22a1
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 17 23:56:56 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Feb 18 00:00:32 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ce20cdf1

repoman: make virtual.oldstyle an error

Also, add "allow-provide-virtuals = true" setting for
metadata/layout.conf which reduces it to a warning.

---
 bin/repoman                      |    4 +++-
 man/repoman.1                    |    5 +++--
 pym/portage/repository/config.py |    9 +++++++--
 3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/bin/repoman b/bin/repoman
index f3946ea..bcb48e4 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 f53a19e..ddabbbb 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 84d9741..defdb47 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'
 



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] proj/portage:master commit in: man/, bin/, pym/portage/repository/
@ 2013-05-24  4:47 Zac Medico
  0 siblings, 0 replies; 5+ messages in thread
From: Zac Medico @ 2013-05-24  4:47 UTC (permalink / raw
  To: gentoo-commits

commit:     7f164c6fd1c47c254b1e1df101edb680492c0c12
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri May 24 04:43:11 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri May 24 04:43:11 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=7f164c6f

repoman: check for deprecated EAPIs, bug #470670

This adds support for repo.eapi.banned (fatal) and repo.eapi.deprecated
(warning) checks which are controlled by eapis-banned and
eapis-deprecated settings in a repository's metadata/layout.conf.

---
 bin/repoman                      |   13 +++++++++++++
 man/portage.5                    |    8 +++++++-
 man/repoman.1                    |   10 +++++++++-
 pym/portage/repository/config.py |   15 ++++++++++++++-
 4 files changed, 43 insertions(+), 3 deletions(-)

diff --git a/bin/repoman b/bin/repoman
index 20832ec..c4a5a22 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -380,6 +380,8 @@ qahelp = {
 	"metadata.bad": "Bad metadata.xml files",
 	"metadata.warning": "Warnings in metadata.xml files",
 	"portage.internal": "The ebuild uses an internal Portage function or variable",
+	"repo.eapi.banned": "The ebuild uses an EAPI which is banned by the repository's metadata/layout.conf settings",
+	"repo.eapi.deprecated": "The ebuild uses an EAPI which is deprecated by the repository's metadata/layout.conf settings",
 	"virtual.oldstyle": "The ebuild PROVIDEs an old-style virtual (see GLEP 37)",
 	"virtual.suspect": "Ebuild contains a package that usually should be pulled via virtual/, not directly.",
 	"usage.obsolete": "The ebuild makes use of an obsolete construct",
@@ -424,6 +426,7 @@ qawarnings = set((
 "wxwidgets.eclassnotused",
 "metadata.warning",
 "portage.internal",
+"repo.eapi.deprecated",
 "usage.obsolete",
 "upstream.workaround",
 "LIVEVCS.stable",
@@ -1815,6 +1818,16 @@ for x in effective_scanlist:
 		inherited = pkg.inherited
 		live_ebuild = live_eclasses.intersection(inherited)
 
+		if repo_config.eapi_is_banned(eapi):
+			stats["repo.eapi.banned"] += 1
+			fails["repo.eapi.banned"].append(
+				"%s: %s" % (relative_path, eapi))
+
+		elif repo_config.eapi_is_deprecated(eapi):
+			stats["repo.eapi.deprecated"] += 1
+			fails["repo.eapi.deprecated"].append(
+				"%s: %s" % (relative_path, eapi))
+
 		for k, v in myaux.items():
 			if not isinstance(v, basestring):
 				continue

diff --git a/man/portage.5 b/man/portage.5
index 46a64f1..e462266 100644
--- a/man/portage.5
+++ b/man/portage.5
@@ -1,4 +1,4 @@
-.TH "PORTAGE" "5" "Nov 2012" "Portage VERSION" "Portage"
+.TH "PORTAGE" "5" "May 2013" "Portage VERSION" "Portage"
 .SH NAME
 portage \- the heart of Gentoo
 .SH "DESCRIPTION"
@@ -875,6 +875,12 @@ masters = gentoo java-overlay
 # indicate that this repo can be used as a substitute for foo-overlay
 aliases = foo-overlay
 
+# indicate that ebuilds with the specified EAPIs are banned
+eapis\-banned = 0 1
+
+# indicate that ebuilds with the specified EAPIs are deprecated
+eapis\-deprecated = 2 3
+
 # sign commits in this repo, which requires Git >=1.7.9, and
 # key configured by `git config user.signingkey key_id`
 sign\-commits = true

diff --git a/man/repoman.1 b/man/repoman.1
index 912ba65..bf498d4 100644
--- a/man/repoman.1
+++ b/man/repoman.1
@@ -1,4 +1,4 @@
-.TH "REPOMAN" "1" "Oct 2012" "Portage VERSION" "Portage"
+.TH "REPOMAN" "1" "May 2013" "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
@@ -326,6 +326,14 @@ Missing metadata.xml files
 .B metadata.warning
 Warnings in metadata.xml files
 .TP
+.B repo.eapi.banned
+The ebuild uses an EAPI which is banned by the repository's
+metadata/layout.conf settings.
+.TP
+.B repo.eapi.deprecated
+The ebuild uses an EAPI which is deprecated by the repository's
+metadata/layout.conf settings.
+.TP
 .B portage.internal
 The ebuild uses an internal Portage function or variable
 .TP

diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index 969fce4..da8c365 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -80,7 +80,8 @@ class RepoConfig(object):
 		'main_repo', 'manifest_hashes', 'masters', 'missing_repo_name',
 		'name', 'portage1_profiles', 'portage1_profiles_compat', 'priority',
 		'profile_formats', 'sign_commit', 'sign_manifest', 'sync',
-		'thin_manifest', 'update_changelog', 'user_location')
+		'thin_manifest', 'update_changelog', 'user_location',
+		'_eapis_banned', '_eapis_deprecated')
 
 	def __init__(self, name, repo_opts):
 		"""Build a RepoConfig with options in repo_opts
@@ -198,6 +199,15 @@ class RepoConfig(object):
 			self.portage1_profiles_compat = not eapi_allows_directories_on_profile_level_and_repository_level(eapi) and \
 				layout_data['profile-formats'] == ('portage-1-compat',)
 
+			self._eapis_banned = frozenset(layout_data['eapis-banned'])
+			self._eapis_deprecated = frozenset(layout_data['eapis-deprecated'])
+
+	def eapi_is_banned(self, eapi):
+		return eapi in self._eapis_banned
+
+	def eapi_is_deprecated(self, eapi):
+		return eapi in self._eapis_deprecated
+
 	def iter_pregenerated_caches(self, auxdbkeys, readonly=True, force=False):
 		"""
 		Reads layout.conf cache-formats from left to right and yields cache
@@ -745,6 +755,9 @@ def parse_layout_conf(repo_location, repo_name=None):
 	data['allow-provide-virtual'] = \
 		layout_data.get('allow-provide-virtuals', 'false').lower() == 'true'
 
+	data['eapis-banned'] = tuple(layout_data.get('eapis-banned', '').split())
+	data['eapis-deprecated'] = tuple(layout_data.get('eapis-deprecated', '').split())
+
 	data['sign-commit'] = layout_data.get('sign-commits', 'false').lower() \
 		== 'true'
 


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-05-24  4:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-04 14:39 [gentoo-commits] proj/portage:master commit in: man/, bin/, pym/portage/repository/ Zac Medico
  -- strict thread matches above, loose matches on Subject: below --
2013-05-24  4:47 Zac Medico
2012-02-18  0:01 Zac Medico
2012-02-17 23:57 Zac Medico
2012-02-04 14:26 Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox