Gentoo Archives: gentoo-commits

From: Vikraman Choudhury <vikraman.choudhury@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gentoostats:master commit in: client/bin/, client/
Date: Sat, 30 Apr 2011 04:24:25
Message-Id: 510345d1c7882c321f72b6d9e57966581cdafd3f.vikraman@gentoo
1 commit: 510345d1c7882c321f72b6d9e57966581cdafd3f
2 Author: Vikraman Choudhury <vikraman.choudhury <AT> gmail <DOT> com>
3 AuthorDate: Sat Apr 30 04:23:44 2011 +0000
4 Commit: Vikraman Choudhury <vikraman.choudhury <AT> gmail <DOT> com>
5 CommitDate: Sat Apr 30 04:23:44 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoostats.git;a=commit;h=510345d1
7
8 added use flags
9
10 ---
11 client/bin/client | 9 +++++++--
12 client/useflags.py | 7 +++++++
13 2 files changed, 14 insertions(+), 2 deletions(-)
14
15 diff --git a/client/bin/client b/client/bin/client
16 index bdc16c7..0720466 100755
17 --- a/client/bin/client
18 +++ b/client/bin/client
19 @@ -1,11 +1,16 @@
20 #!/usr/bin/env python
21
22 from packages import Packages
23 +from useflags import UseFlags
24
25 def main ():
26 p = Packages ()
27 - for cp in p.getInstalledCPs ():
28 - print cp
29 + u = UseFlags ()
30 + for cpv in p.getInstalledCPVs ():
31 + print cpv,
32 + for x in u.getUseFlags (cpv):
33 + print x,
34 + print
35
36 if __name__ == "__main__":
37 main ()
38
39 diff --git a/client/useflags.py b/client/useflags.py
40 new file mode 100644
41 index 0000000..40f453c
42 --- /dev/null
43 +++ b/client/useflags.py
44 @@ -0,0 +1,7 @@
45 +
46 +from gentoolkit.flag import *
47 +
48 +class UseFlags:
49 +
50 + def getUseFlags (self, cpv):
51 + return get_flags (cpv, True)[1]