From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoopm:master commit in: gentoopm/paludispm/
Date: Mon, 25 Jul 2011 17:06:24 +0000 (UTC) [thread overview]
Message-ID: <dfd84bfb63bbf8283fd0eb63bbbb73e30393f076.mgorny@gentoo> (raw)
commit: dfd84bfb63bbf8283fd0eb63bbbb73e30393f076
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 25 16:58:35 2011 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Jul 25 17:06:58 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoopm.git;a=commit;h=dfd84bfb
Paludis: support getting package contents.
---
gentoopm/paludispm/contents.py | 15 +++++++++++++++
gentoopm/paludispm/pkg.py | 5 ++++-
2 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/gentoopm/paludispm/contents.py b/gentoopm/paludispm/contents.py
new file mode 100644
index 0000000..f9ec46e
--- /dev/null
+++ b/gentoopm/paludispm/contents.py
@@ -0,0 +1,15 @@
+#!/usr/bin/python
+# vim:fileencoding=utf-8
+# (c) 2011 Michał Górny <mgorny@gentoo.org>
+# Released under the terms of the 2-clause BSD license.
+
+from gentoopm.basepm.contents import PMPackageContents, \
+ PMContentObj
+
+class PaludisPackageContents(PMPackageContents):
+ def __init__(self, cont):
+ self._cont = cont
+
+ def __iter__(self):
+ for f in self._cont:
+ yield PMContentObj(f.location_key().parse_value())
diff --git a/gentoopm/paludispm/pkg.py b/gentoopm/paludispm/pkg.py
index 1c3fb6e..97d64cd 100644
--- a/gentoopm/paludispm/pkg.py
+++ b/gentoopm/paludispm/pkg.py
@@ -11,6 +11,7 @@ from gentoopm.basepm.pkg import PMPackage, PMPackageDescription, \
PMPackageState
from gentoopm.paludispm.atom import PaludisAtom, \
PaludisPackageKey, PaludisPackageVersion
+from gentoopm.paludispm.contents import PaludisPackageContents
from gentoopm.util import SpaceSepTuple
class PaludisBoundPackageKey(PaludisPackageKey, PMBoundPackageKey):
@@ -113,7 +114,9 @@ class PaludisInstallableID(PaludisID, PMInstallablePackage):
pass
class PaludisInstalledID(PaludisID, PMInstalledPackage):
- pass
+ @property
+ def contents(self):
+ return PaludisPackageContents(self._pkg.contents_key().parse_value())
class PaludisMetadata(PMPackageMetadata):
def __init__(self, pkg):
next reply other threads:[~2011-07-25 17:06 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-25 17:06 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-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-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=dfd84bfb63bbf8283fd0eb63bbbb73e30393f076.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