public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/repository/
@ 2011-05-24  8:11 Michał Górny
  0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2011-05-24  8:11 UTC (permalink / raw
  To: gentoo-commits

commit:     f100ce55e543038552fd776cf360ea44d3759dac
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue May 24 08:05:23 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue May 24 08:05:23 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=f100ce55

Support grabbing the repository name.

---
 PMSTestSuite/repository/__init__.py |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/PMSTestSuite/repository/__init__.py b/PMSTestSuite/repository/__init__.py
index b09e8be..5ace740 100644
--- a/PMSTestSuite/repository/__init__.py
+++ b/PMSTestSuite/repository/__init__.py
@@ -9,7 +9,25 @@ class EbuildRepository(object):
 	A universal class to handle an ebuild repository in a PM-agnostic manner.
 
 	>>> r = EbuildRepository('/usr/portage') # XXX: do not depend on path
+	>>> r.repo_name # doctest: +ELLIPSIS
+	'...'
 	"""
 
 	def __init__(self, path):
+		"""
+		Instantiate a new EbuildRepository for repository held in <path>. Read
+		the repository name.
+
+		Possible exceptions:
+		- IOError for repo_name file operations,
+		- ValueError if repo_name doesn't contain a valid name.
+		"""
 		self.path = path
+
+		rnpath = os.path.join(path, 'profiles', 'repo_name')
+		f = open(rnpath, 'r')
+		self.repo_name = f.readline().strip()
+		f.close()
+
+		if not self.repo_name:
+			raise ValueError('Repository %s has invalid name.' % path)



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

* [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/repository/
@ 2011-05-24 14:28 Michał Górny
  0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2011-05-24 14:28 UTC (permalink / raw
  To: gentoo-commits

commit:     b019699e803878b0cc0de07f272367a6d56aa76e
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue May 24 14:25:00 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue May 24 14:25:00 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=b019699e

Actually support writing files in the repo.

---
 PMSTestSuite/repository/__init__.py |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/PMSTestSuite/repository/__init__.py b/PMSTestSuite/repository/__init__.py
index 5ace740..3cb101a 100644
--- a/PMSTestSuite/repository/__init__.py
+++ b/PMSTestSuite/repository/__init__.py
@@ -31,3 +31,13 @@ class EbuildRepository(object):
 
 		if not self.repo_name:
 			raise ValueError('Repository %s has invalid name.' % path)
+
+	def write_files(self, files):
+		""" Write files from files dict to the repository. """
+		for fn, c in files.items():
+			fp = os.path.join(self.path, fn)
+			if not os.path.exists(os.path.dirname(fp)):
+				os.makedirs(os.path.dirname(fp))
+			f = open(fp, 'w')
+			f.write(bytes(c))
+			f.close()



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

* [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/repository/
@ 2011-06-01 12:30 Michał Górny
  0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2011-06-01 12:30 UTC (permalink / raw
  To: gentoo-commits

commit:     e23fced887c5579202326f1e9c8e6dc39ba63c1d
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  1 11:52:16 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jun  1 11:52:16 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=e23fced8

Support reading the category list.

---
 PMSTestSuite/repository/__init__.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/PMSTestSuite/repository/__init__.py b/PMSTestSuite/repository/__init__.py
index cb5d0ac..63af3dc 100644
--- a/PMSTestSuite/repository/__init__.py
+++ b/PMSTestSuite/repository/__init__.py
@@ -29,6 +29,14 @@ class EbuildRepository(object):
 		self.repo_name = f.readline().strip()
 		f.close()
 
+		catspath = os.path.join(path, 'profiles', 'categories')
+		try:
+			f = open(catspath, 'r');
+			self.categories = [l.strip() for l in f.readlines()]
+			f.close()
+		except IOError:
+			self.categories = []
+
 		if not self.repo_name:
 			raise ValueError('Repository %s has invalid name.' % path)
 



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

* [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/repository/
@ 2011-06-01 12:30 Michał Górny
  0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2011-06-01 12:30 UTC (permalink / raw
  To: gentoo-commits

commit:     3fc667d086c6fad218a86ffc0e9cc6e5f856ece2
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  1 11:53:22 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jun  1 11:53:22 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=3fc667d0

Require added ebuilds to match supported categories.

---
 PMSTestSuite/repository/__init__.py |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/PMSTestSuite/repository/__init__.py b/PMSTestSuite/repository/__init__.py
index 63af3dc..4496361 100644
--- a/PMSTestSuite/repository/__init__.py
+++ b/PMSTestSuite/repository/__init__.py
@@ -43,6 +43,14 @@ class EbuildRepository(object):
 	def write_files(self, files):
 		""" Write files from files dict to the repository. """
 		for fn, c in files.items():
+			head = fn
+			while head:
+				head, tail = os.path.split(head)
+			if tail in ('eclass', 'profiles'):
+				pass
+			elif tail not in self.categories:
+				self.add_category(tail)
+
 			fp = os.path.join(self.path, fn)
 			if not os.path.exists(os.path.dirname(fp)):
 				os.makedirs(os.path.dirname(fp))
@@ -54,6 +62,10 @@ class EbuildRepository(object):
 		""" Remanifest files from <files> dict using <pm>. """
 		dirs = frozenset([os.path.join(self.path, os.path.dirname(f)) for f in files])
 		pm.remanifest(dirs)
+
+	def add_category(self, catname):
+		""" Add category <catname> to profiles/categories. """
+		raise ValueError("The repository doesn't support %s category." % catname)
 		
 class NewEbuildRepository(EbuildRepository):
 	"""



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

* [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/repository/
@ 2011-06-01 12:30 Michał Górny
  0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2011-06-01 12:30 UTC (permalink / raw
  To: gentoo-commits

commit:     c965a035d1d037e8fd780e3e4fb40b2dd39db2fe
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  1 11:54:54 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jun  1 11:54:54 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=c965a035

Call EbuildRepository.__init__() in NewEbuildRepository.

---
 PMSTestSuite/repository/__init__.py |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/PMSTestSuite/repository/__init__.py b/PMSTestSuite/repository/__init__.py
index 4496361..476f84f 100644
--- a/PMSTestSuite/repository/__init__.py
+++ b/PMSTestSuite/repository/__init__.py
@@ -77,9 +77,6 @@ class NewEbuildRepository(EbuildRepository):
 		"""
 		Create a new ebuild repository in <path>. Name it <repo_name>.
 		"""
-		self.path = path
-		self.repo_name = repo_name
-
 		rnpath = os.path.join(path, 'profiles', 'repo_name')
 		dirpath = os.path.dirname(rnpath)
 
@@ -88,3 +85,5 @@ class NewEbuildRepository(EbuildRepository):
 		f = open(rnpath, 'w')
 		f.write(repo_name)
 		f.close()
+
+		EbuildRepository.__init__(self, path)



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

* [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/repository/
@ 2011-06-01 12:30 Michał Górny
  0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2011-06-01 12:30 UTC (permalink / raw
  To: gentoo-commits

commit:     b3f88f042fedb4e5be9c8eabe78bd55fc42e3ac2
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  1 12:07:08 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jun  1 12:07:08 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=b3f88f04

Support updating the category list.

---
 PMSTestSuite/repository/__init__.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/PMSTestSuite/repository/__init__.py b/PMSTestSuite/repository/__init__.py
index 476f84f..70f3727 100644
--- a/PMSTestSuite/repository/__init__.py
+++ b/PMSTestSuite/repository/__init__.py
@@ -87,3 +87,11 @@ class NewEbuildRepository(EbuildRepository):
 		f.close()
 
 		EbuildRepository.__init__(self, path)
+		
+	def add_category(self, catname):
+		self.categories.append(catname)
+		newcats = '\n'.join(self.categories)
+		files = {
+			os.path.join('profiles', 'categories'): newcats
+		}
+		self.write_files(files)



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

* [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/repository/
@ 2011-06-01 12:30 Michał Górny
  0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2011-06-01 12:30 UTC (permalink / raw
  To: gentoo-commits

commit:     0a914c67bfd5caca8c3ac32ed468440c42991141
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  1 12:25:59 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jun  1 12:25:59 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=0a914c67

Commonize category grabbing code.

---
 PMSTestSuite/repository/__init__.py |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/PMSTestSuite/repository/__init__.py b/PMSTestSuite/repository/__init__.py
index 60a975d..6545035 100644
--- a/PMSTestSuite/repository/__init__.py
+++ b/PMSTestSuite/repository/__init__.py
@@ -40,16 +40,20 @@ class EbuildRepository(object):
 		if not self.repo_name:
 			raise ValueError('Repository %s has invalid name.' % path)
 
+	def get_category_from_path(self, fn):
+		head = fn
+		while head:
+			head, tail = os.path.split(head)
+		if tail in ('eclass', 'profiles'):
+			return None
+		return tail
+
 	def write_files(self, files):
 		""" Write files from files dict to the repository. """
 		for fn in files:
-			head = fn
-			while head:
-				head, tail = os.path.split(head)
-			if tail in ('eclass', 'profiles'):
-				pass
-			elif tail not in self.categories:
-				self.add_category(tail, files)
+			cat = self.get_category_from_path(fn)
+			if cat and cat not in self.categories:
+				self.add_category(cat, files)
 
 		for fn, c in files.items():
 			fp = os.path.join(self.path, fn)



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

* [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/repository/
@ 2011-06-01 12:30 Michał Górny
  0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2011-06-01 12:30 UTC (permalink / raw
  To: gentoo-commits

commit:     9b8e3b50dd05b6a799a919c40e992dd1f987e9c4
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  1 12:15:18 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jun  1 12:15:18 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=9b8e3b50

Update files dict in add_category() instead of spawning a new write.

---
 PMSTestSuite/repository/__init__.py |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/PMSTestSuite/repository/__init__.py b/PMSTestSuite/repository/__init__.py
index 70f3727..9af204a 100644
--- a/PMSTestSuite/repository/__init__.py
+++ b/PMSTestSuite/repository/__init__.py
@@ -49,7 +49,7 @@ class EbuildRepository(object):
 			if tail in ('eclass', 'profiles'):
 				pass
 			elif tail not in self.categories:
-				self.add_category(tail)
+				self.add_category(tail, files)
 
 			fp = os.path.join(self.path, fn)
 			if not os.path.exists(os.path.dirname(fp)):
@@ -63,8 +63,11 @@ class EbuildRepository(object):
 		dirs = frozenset([os.path.join(self.path, os.path.dirname(f)) for f in files])
 		pm.remanifest(dirs)
 
-	def add_category(self, catname):
-		""" Add category <catname> to profiles/categories. """
+	def add_category(self, catname, files):
+		"""
+		Add category <catname> to profiles/categories. Update
+		the profiles/categories file in <files> dict.
+		"""
 		raise ValueError("The repository doesn't support %s category." % catname)
 		
 class NewEbuildRepository(EbuildRepository):
@@ -87,11 +90,10 @@ class NewEbuildRepository(EbuildRepository):
 		f.close()
 
 		EbuildRepository.__init__(self, path)
-		
-	def add_category(self, catname):
+
+	def add_category(self, catname, files):
+		# XXX: profiles/categories can contain new categories already
+		# and they may not be in self.categories
 		self.categories.append(catname)
 		newcats = '\n'.join(self.categories)
-		files = {
-			os.path.join('profiles', 'categories'): newcats
-		}
-		self.write_files(files)
+		files[os.path.join('profiles', 'categories')] = newcats



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

* [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/repository/
@ 2011-06-01 12:30 Michał Górny
  0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2011-06-01 12:30 UTC (permalink / raw
  To: gentoo-commits

commit:     901f36a34e1bee927a0e3fbb5e34993f044a7a60
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  1 12:16:15 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jun  1 12:16:15 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=901f36a3

Perform category checks and updates before starting to write.

---
 PMSTestSuite/repository/__init__.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/PMSTestSuite/repository/__init__.py b/PMSTestSuite/repository/__init__.py
index 9af204a..60a975d 100644
--- a/PMSTestSuite/repository/__init__.py
+++ b/PMSTestSuite/repository/__init__.py
@@ -42,7 +42,7 @@ class EbuildRepository(object):
 
 	def write_files(self, files):
 		""" Write files from files dict to the repository. """
-		for fn, c in files.items():
+		for fn in files:
 			head = fn
 			while head:
 				head, tail = os.path.split(head)
@@ -51,6 +51,7 @@ class EbuildRepository(object):
 			elif tail not in self.categories:
 				self.add_category(tail, files)
 
+		for fn, c in files.items():
 			fp = os.path.join(self.path, fn)
 			if not os.path.exists(os.path.dirname(fp)):
 				os.makedirs(os.path.dirname(fp))



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

* [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/repository/
@ 2011-06-01 12:30 Michał Górny
  0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2011-06-01 12:30 UTC (permalink / raw
  To: gentoo-commits

commit:     af143461b0193808e97e4549128b4f7a0771b83b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  1 12:28:25 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jun  1 12:28:25 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=af143461

Don't try to re-Manifest eclass/profiles.

---
 PMSTestSuite/repository/__init__.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/PMSTestSuite/repository/__init__.py b/PMSTestSuite/repository/__init__.py
index 6545035..9e6060f 100644
--- a/PMSTestSuite/repository/__init__.py
+++ b/PMSTestSuite/repository/__init__.py
@@ -65,7 +65,11 @@ class EbuildRepository(object):
 
 	def remanifest(self, files, pm):
 		""" Remanifest files from <files> dict using <pm>. """
-		dirs = frozenset([os.path.join(self.path, os.path.dirname(f)) for f in files])
+		dirs = set()
+		for fn in files:
+			cat = self.get_category_from_path(fn)
+			if cat:
+				dirs.add(os.path.join(self.path, os.path.dirname(fn)))
 		pm.remanifest(dirs)
 
 	def add_category(self, catname, files):



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

* [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/repository/
@ 2011-06-03  5:54 Michał Górny
  0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2011-06-03  5:54 UTC (permalink / raw
  To: gentoo-commits

commit:     91a035ea1b2cbe309ebcebbd76ba3ed4fc1fc954
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  3 05:53:06 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jun  3 05:53:06 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=91a035ea

Fix RuntimeError when adding new categories.

---
 PMSTestSuite/repository/__init__.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/PMSTestSuite/repository/__init__.py b/PMSTestSuite/repository/__init__.py
index 9e6060f..8dba079 100644
--- a/PMSTestSuite/repository/__init__.py
+++ b/PMSTestSuite/repository/__init__.py
@@ -50,10 +50,14 @@ class EbuildRepository(object):
 
 	def write_files(self, files):
 		""" Write files from files dict to the repository. """
+		newcats = set()
 		for fn in files:
 			cat = self.get_category_from_path(fn)
 			if cat and cat not in self.categories:
-				self.add_category(cat, files)
+				newcats.add(cat)
+
+		for c in newcats:
+			self.add_category(cat, files)
 
 		for fn, c in files.items():
 			fp = os.path.join(self.path, fn)



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

* [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/repository/
@ 2011-06-03  5:54 Michał Górny
  0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2011-06-03  5:54 UTC (permalink / raw
  To: gentoo-commits

commit:     839be1617c598b04d477c3ec166162532e411b2d
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  3 05:54:41 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jun  3 05:54:41 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=839be161

Support adding multiple categories in one call.

---
 PMSTestSuite/repository/__init__.py |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/PMSTestSuite/repository/__init__.py b/PMSTestSuite/repository/__init__.py
index 8dba079..5e6d897 100644
--- a/PMSTestSuite/repository/__init__.py
+++ b/PMSTestSuite/repository/__init__.py
@@ -56,8 +56,7 @@ class EbuildRepository(object):
 			if cat and cat not in self.categories:
 				newcats.add(cat)
 
-		for c in newcats:
-			self.add_category(cat, files)
+		self.add_categories(newcats, files)
 
 		for fn, c in files.items():
 			fp = os.path.join(self.path, fn)
@@ -76,9 +75,9 @@ class EbuildRepository(object):
 				dirs.add(os.path.join(self.path, os.path.dirname(fn)))
 		pm.remanifest(dirs)
 
-	def add_category(self, catname, files):
+	def add_categories(self, cats, files):
 		"""
-		Add category <catname> to profiles/categories. Update
+		Add categories in <cats> to profiles/categories. Update
 		the profiles/categories file in <files> dict.
 		"""
 		raise ValueError("The repository doesn't support %s category." % catname)
@@ -104,9 +103,9 @@ class NewEbuildRepository(EbuildRepository):
 
 		EbuildRepository.__init__(self, path)
 
-	def add_category(self, catname, files):
+	def add_categories(self, cats, files):
 		# XXX: profiles/categories can contain new categories already
 		# and they may not be in self.categories
-		self.categories.append(catname)
+		self.categories.extend(cats)
 		newcats = '\n'.join(self.categories)
 		files[os.path.join('profiles', 'categories')] = newcats



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

* [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/repository/
@ 2011-06-07 15:20 Michał Górny
  0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2011-06-07 15:20 UTC (permalink / raw
  To: gentoo-commits

commit:     6f2d262fa3182fc97dff24d8f58fa7683a64a793
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  7 15:20:42 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jun  7 15:20:42 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=6f2d262f

Support adding categories to existing repositories.

---
 PMSTestSuite/repository/__init__.py |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/PMSTestSuite/repository/__init__.py b/PMSTestSuite/repository/__init__.py
index 5e6d897..9f855ef 100644
--- a/PMSTestSuite/repository/__init__.py
+++ b/PMSTestSuite/repository/__init__.py
@@ -80,8 +80,12 @@ class EbuildRepository(object):
 		Add categories in <cats> to profiles/categories. Update
 		the profiles/categories file in <files> dict.
 		"""
-		raise ValueError("The repository doesn't support %s category." % catname)
-		
+		# XXX: profiles/categories can contain new categories already
+		# and they may not be in self.categories
+		self.categories.extend(cats)
+		newcats = '\n'.join(self.categories)
+		files[os.path.join('profiles', 'categories')] = newcats
+
 class NewEbuildRepository(EbuildRepository):
 	"""
 	A subclass of EbuildRepository supporting creating a new repository
@@ -102,10 +106,3 @@ class NewEbuildRepository(EbuildRepository):
 		f.close()
 
 		EbuildRepository.__init__(self, path)
-
-	def add_categories(self, cats, files):
-		# XXX: profiles/categories can contain new categories already
-		# and they may not be in self.categories
-		self.categories.extend(cats)
-		newcats = '\n'.join(self.categories)
-		files[os.path.join('profiles', 'categories')] = newcats



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

* [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/repository/
@ 2011-06-14 12:35 Michał Górny
  0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2011-06-14 12:35 UTC (permalink / raw
  To: gentoo-commits

commit:     f6a89933cb232a58ac7e8db29f062f000ca7d054
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 14 12:17:08 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jun 14 12:17:08 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=f6a89933

Use PV as a SLOT.

---
 PMSTestSuite/repository/pms_eclass.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/PMSTestSuite/repository/pms_eclass.py b/PMSTestSuite/repository/pms_eclass.py
index 62eeb5c..b17714e 100644
--- a/PMSTestSuite/repository/pms_eclass.py
+++ b/PMSTestSuite/repository/pms_eclass.py
@@ -12,7 +12,7 @@ HOMEPAGE="http://www.gentoo.org/proj/en/qa/pms/pms-test-suite.xml"
 SRC_URI=""
 
 LICENSE="as-is"
-SLOT=${EAPI-0}
+SLOT=${PV}
 KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
 IUSE=""
 



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

* [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/repository/
@ 2011-06-23 21:14 Michał Górny
  0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2011-06-23 21:14 UTC (permalink / raw
  To: gentoo-commits

commit:     31d557396640154c2307299ddd2cd48387f7fdc3
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 23 19:12:49 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jun 23 19:12:49 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=31d55739

Update the non-category directory list.

---
 PMSTestSuite/repository/__init__.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/PMSTestSuite/repository/__init__.py b/PMSTestSuite/repository/__init__.py
index 9f855ef..52a60de 100644
--- a/PMSTestSuite/repository/__init__.py
+++ b/PMSTestSuite/repository/__init__.py
@@ -44,7 +44,7 @@ class EbuildRepository(object):
 		head = fn
 		while head:
 			head, tail = os.path.split(head)
-		if tail in ('eclass', 'profiles'):
+		if tail in ('eclass', 'licenses', 'metadata', 'profiles'):
 			return None
 		return tail
 



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

* [gentoo-commits] proj/pms-test-suite:master commit in: pmstestsuite/repository/
@ 2012-01-03 18:59 Michał Górny
  0 siblings, 0 replies; 16+ messages in thread
From: Michał Górny @ 2012-01-03 18:59 UTC (permalink / raw
  To: gentoo-commits

commit:     b406e37170ee6f9a809e6f5790aaf199ed0c3587
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  3 18:59:42 2012 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jan  3 18:59:42 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=b406e371

Drop dbus dependency from tests, it should be pmsts-wide.

---
 pmstestsuite/repository/pms_eclass.py |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/pmstestsuite/repository/pms_eclass.py b/pmstestsuite/repository/pms_eclass.py
index 97caa9a..87eb5c3 100644
--- a/pmstestsuite/repository/pms_eclass.py
+++ b/pmstestsuite/repository/pms_eclass.py
@@ -20,8 +20,6 @@ LICENSE="as-is"
 SLOT=${PV}
 IUSE=""
 
-DEPEND="sys-apps/dbus"
-
 RESTRICT="mirror"
 S=${WORKDIR}
 



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

end of thread, other threads:[~2012-01-03 19:00 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-07 15:20 [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/repository/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2012-01-03 18:59 [gentoo-commits] proj/pms-test-suite:master commit in: pmstestsuite/repository/ Michał Górny
2011-06-23 21:14 [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/repository/ Michał Górny
2011-06-14 12:35 Michał Górny
2011-06-03  5:54 Michał Górny
2011-06-03  5:54 Michał Górny
2011-06-01 12:30 Michał Górny
2011-06-01 12:30 Michał Górny
2011-06-01 12:30 Michał Górny
2011-06-01 12:30 Michał Górny
2011-06-01 12:30 Michał Górny
2011-06-01 12:30 Michał Górny
2011-06-01 12:30 Michał Górny
2011-06-01 12:30 Michał Górny
2011-05-24 14:28 Michał Górny
2011-05-24  8:11 Michał Górny

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