diff options
author | Vikraman Choudhury <vikraman.choudhury@gmail.com> | 2011-04-30 09:53:44 +0530 |
---|---|---|
committer | Vikraman Choudhury <vikraman.choudhury@gmail.com> | 2011-04-30 09:53:44 +0530 |
commit | 510345d1c7882c321f72b6d9e57966581cdafd3f (patch) | |
tree | ab522296874d7e42ba43a8410987f0e533cb6724 | |
parent | first version of client to read installed packages (diff) | |
download | gentoostats-510345d1c7882c321f72b6d9e57966581cdafd3f.tar.gz gentoostats-510345d1c7882c321f72b6d9e57966581cdafd3f.tar.bz2 gentoostats-510345d1c7882c321f72b6d9e57966581cdafd3f.zip |
added use flags
-rwxr-xr-x | client/bin/client | 9 | ||||
-rw-r--r-- | client/useflags.py | 7 |
2 files changed, 14 insertions, 2 deletions
diff --git a/client/bin/client b/client/bin/client index bdc16c7..0720466 100755 --- a/client/bin/client +++ b/client/bin/client @@ -1,11 +1,16 @@ #!/usr/bin/env python from packages import Packages +from useflags import UseFlags def main (): p = Packages () - for cp in p.getInstalledCPs (): - print cp + u = UseFlags () + for cpv in p.getInstalledCPVs (): + print cpv, + for x in u.getUseFlags (cpv): + print x, + print if __name__ == "__main__": main () diff --git a/client/useflags.py b/client/useflags.py new file mode 100644 index 0000000..40f453c --- /dev/null +++ b/client/useflags.py @@ -0,0 +1,7 @@ + +from gentoolkit.flag import * + +class UseFlags: + + def getUseFlags (self, cpv): + return get_flags (cpv, True)[1] |