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/pkgcorepm/
Date: Sun, 14 Oct 2012 21:35:26 +0000 (UTC)	[thread overview]
Message-ID: <1350250426.f58c5799b4bd26cb6485f8ceb796f07a79cac0ee.mgorny@gentoo> (raw)

commit:     f58c5799b4bd26cb6485f8ceb796f07a79cac0ee
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 14 21:33:46 2012 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Oct 14 21:33:46 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoopm.git;a=commit;h=f58c5799

Fix compatibility with pkgcore-0.8.4 API.

---
 gentoopm/pkgcorepm/__init__.py |    8 ++++++--
 gentoopm/pkgcorepm/repo.py     |   10 +++++++---
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/gentoopm/pkgcorepm/__init__.py b/gentoopm/pkgcorepm/__init__.py
index aa117a0..27d980d 100644
--- a/gentoopm/pkgcorepm/__init__.py
+++ b/gentoopm/pkgcorepm/__init__.py
@@ -33,8 +33,12 @@ class PkgCorePM(PackageManager):
 
 	@property
 	def installed(self):
-		return PkgCoreInstalledRepo(self._domain.named_repos['vdb'],
-				self._domain)
+		try:
+			repos = self._domain.repos_raw
+		except AttributeError:
+			repos = self._domain.named_repos
+
+		return PkgCoreInstalledRepo(repos['vdb'], self._domain)
 
 	@property
 	def Atom(self):

diff --git a/gentoopm/pkgcorepm/repo.py b/gentoopm/pkgcorepm/repo.py
index dc43148..44bd745 100644
--- a/gentoopm/pkgcorepm/repo.py
+++ b/gentoopm/pkgcorepm/repo.py
@@ -20,12 +20,16 @@ class PkgCoreRepoDict(PMRepositoryDict):
 	def __iter__(self):
 		try:
 			trees = self._domain.named_repos['repo-stack'].trees
-		except KeyError: # pkgcore-0.7.5+
+		except (KeyError, AttributeError): # pkgcore-0.7.5+
 			def _match_ebuild_repos(x):
 				return isinstance(x, UnconfiguredTree)
 
-			trees = filter(_match_ebuild_repos,
-					self._domain.named_repos.values())
+			try:
+				all_repos = self._domain.repos_raw
+			except AttributeError:
+				all_repos = self._domain.named_repos
+
+			trees = filter(_match_ebuild_repos, all_repos.values())
 			rev = -1
 		else:
 			rev = 1


             reply	other threads:[~2012-10-14 21:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-14 21:35 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-11-14 22:12 [gentoo-commits] proj/gentoopm:master commit in: gentoopm/pkgcorepm/ Michał Górny
2011-11-14 21:44 Michał Górny
2011-11-14 21:44 Michał Górny
2011-08-13 18:49 Michał Górny
2011-07-27 20:45 Michał Górny
2011-07-26 16:36 Michał Górny
2011-07-26  7:24 Michał Górny
2011-07-25 19:06 Michał Górny
2011-07-25 19:06 Michał Górny
2011-07-21  8:47 Michał Górny
2011-07-21  8:47 Michał Górny
2011-07-15 13:32 Michał Górny
2011-07-15 12:34 Michał Górny
2011-07-14 13:31 Michał Górny
2011-07-13 17:16 Michał Górny
2011-07-13 17:05 Michał Górny
2011-07-12  9:14 Michał Górny
2011-07-10 22:17 Michał Górny
2011-07-09  7:15 Michał Górny
2011-07-09  7:15 Michał Górny
2011-07-09  7:15 Michał Górny
2011-07-08  7:18 Michał Górny
2011-07-07  9:51 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=1350250426.f58c5799b4bd26cb6485f8ceb796f07a79cac0ee.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