public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoopm:master commit in: gentoopm/paludispm/
Date: Thu, 21 Jul 2011 08:47:21 +0000 (UTC)	[thread overview]
Message-ID: <7794ed5de6c3684fc8f68c9f4fc91b7920456c32.mgorny@gentoo> (raw)

commit:     7794ed5de6c3684fc8f68c9f4fc91b7920456c32
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 21 07:46:37 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jul 21 07:46:37 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoopm.git;a=commit;h=7794ed5d

Paludis: split out PaludisBaseRepo.

---
 gentoopm/paludispm/repo.py |   27 +++++++++++++++++++--------
 1 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/gentoopm/paludispm/repo.py b/gentoopm/paludispm/repo.py
index e1be9cc..c4c5a12 100644
--- a/gentoopm/paludispm/repo.py
+++ b/gentoopm/paludispm/repo.py
@@ -3,6 +3,8 @@
 # (c) 2011 Michał Górny <mgorny@gentoo.org>
 # Released under the terms of the 2-clause BSD license.
 
+from abc import abstractproperty
+
 import paludis
 
 from gentoopm.basepm.repo import PMRepository, PMRepositoryDict, \
@@ -23,17 +25,17 @@ class PaludisRepoDict(PMRepositoryDict):
 class PaludisEnumID(object):
 	pass
 
-class PaludisRepository(PMRepository, PaludisPackageSet):
+class PaludisBaseRepo(PMRepository, PaludisPackageSet):
 	def __init__(self, env):
 		PaludisPackageSet.__init__(self, env, True)
 
-	@property
+	@abstractproperty
 	def _gen(self):
-		return paludis.Generator.InRepository(self._repo.name)
+		pass
 
-	@property
+	@abstractproperty
 	def _filt(self):
-		return paludis.Filter.All()
+		pass
 
 	def __iter__(self):
 		enum = PaludisEnumID()
@@ -60,7 +62,16 @@ class PaludisRepository(PMRepository, PaludisPackageSet):
 		else:
 			return pset
 
-class PaludisAtomFilteredRepo(PaludisRepository):
+class PaludisRepository(PaludisBaseRepo):
+	@property
+	def _gen(self):
+		return paludis.Generator.InRepository(self._repo.name)
+
+	@property
+	def _filt(self):
+		return paludis.Filter.All()
+
+class PaludisAtomFilteredRepo(PaludisBaseRepo):
 	@property
 	def _gen(self):
 		return self._mygen
@@ -70,12 +81,12 @@ class PaludisAtomFilteredRepo(PaludisRepository):
 		return self._myfilt
 
 	def __init__(self, repo, atom):
-		PaludisRepository.__init__(self, repo._env)
+		PaludisBaseRepo.__init__(self, repo._env)
 		self._myfilt = repo._filt
 		self._mygen = repo._gen & paludis.Generator.Matches(atom._atom,
 				paludis.MatchPackageOptions())
 
-class PaludisStackRepo(PaludisRepository):
+class PaludisStackRepo(PaludisBaseRepo):
 	@property
 	def _gen(self):
 		return paludis.Generator.All()



             reply	other threads:[~2011-07-21  8:48 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-21  8:47 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-10-10 13:35 [gentoo-commits] proj/gentoopm:master commit in: gentoopm/paludispm/ Michał Górny
2012-01-03 18:18 Michał Górny
2011-12-09 15:09 Michał Górny
2011-07-29  6:38 Michał Górny
2011-07-28 19:54 Michał Górny
2011-07-28 19:54 Michał Górny
2011-07-28 16:24 Michał Górny
2011-07-25 17:06 Michał Górny
2011-07-23 20:14 Michał Górny
2011-07-23 20:14 Michał Górny
2011-07-23 20:14 Michał Górny
2011-07-23  9:27 Michał Górny
2011-07-22  6:18 Michał Górny
2011-07-21  8:47 Michał Górny
2011-07-21  8:47 Michał Górny
2011-07-21  8:47 Michał Górny
2011-07-21  8:47 Michał Górny
2011-07-21  8:47 Michał Górny
2011-07-16 22:55 Michał Górny
2011-07-16 22:55 Michał Górny
2011-07-16  9:40 Michał Górny
2011-07-16  9:08 Michał Górny
2011-07-16  8:34 Michał Górny
2011-07-15 13:32 Michał Górny
2011-07-15 12:34 Michał Górny
2011-07-15  9:52 Michał Górny
2011-07-15  9:52 Michał Górny
2011-07-15  9:52 Michał Górny
2011-07-14 22:51 Michał Górny
2011-07-14 17:10 Michał Górny
2011-07-14 17:10 Michał Górny
2011-07-14 14:05 Michał Górny
2011-07-14 14:05 Michał Górny
2011-07-10 22:17 Michał Górny
2011-07-10 22:17 Michał Górny
2011-07-09  7:20 Michał Górny
2011-07-08 21:05 Michał Górny
2011-07-08 21:05 Michał Górny
2011-07-08 16:37 Michał Górny
2011-07-08 16:37 Michał Górny
2011-07-08  7:18 Michał Górny
2011-07-06 20:54 Michał Górny

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=7794ed5de6c3684fc8f68c9f4fc91b7920456c32.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-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