From: Mark Huang Date: Mon, 17 Jul 2006 21:29:21 +0000 (+0000) Subject: - support installing standard package groups X-Git-Tag: planetlab-4_0-rc1~142 X-Git-Url: http://git.onelab.eu/?p=myplc.git;a=commitdiff_plain;h=26c36a2f8ba152ce101a24c95449bc2afb932b6c - support installing standard package groups --- diff --git a/plc-config b/plc-config index 840ee46..645b1d0 100755 --- a/plc-config +++ b/plc-config @@ -6,7 +6,7 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id$ +# $Id: plc-config,v 1.1.1.1 2006/03/27 17:36:46 mlhuang Exp $ # import sys @@ -71,6 +71,7 @@ def main(): "xml", "variables", "packages", + "groups", "comps", "category=", "variable=", "value=", "group=", "package=", "type=", @@ -96,6 +97,8 @@ def main(): output = plc.output_variables elif opt == "--packages": output = plc.output_packages + elif opt == "--groups": + output = plc.output_groups elif opt == "--comps": output = plc.output_comps elif opt == "--category": diff --git a/plc_config.py b/plc_config.py index d1ab2b4..913ccfd 100644 --- a/plc_config.py +++ b/plc_config.py @@ -7,7 +7,7 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: plc_config.py,v 1.2 2006/04/04 22:09:25 mlhuang Exp $ +# $Id: plc_config.py,v 1.3 2006/04/18 15:32:48 thierry Exp $ # import xml.dom.minidom @@ -741,6 +741,19 @@ DO NOT EDIT. This file was automatically generated at return buf.getvalue() + def output_groups(self, encoding = "utf-8"): + """ + Return list of all package group names. + """ + + buf = codecs.lookup(encoding)[3](StringIO()) + + for (group, packages) in self._packages.values(): + buf.write(group['name'] + os.linesep) + + return buf.getvalue() + + def output_comps(self, encoding = "utf-8"): """ Return section of configuration.