Author: lslezak
Date: Thu Jun 9 19:23:43 2011
New Revision: 64295
URL: http://svn.opensuse.org/viewcvs/yast?rev=64295&view=rev
Log:
etc_zypp_conf.scr - fixed examples, fixed file duplication
Modified:
branches/tmp/lslezak/SP2/packager/agents/etc_zypp_conf.scr
Modified: branches/tmp/lslezak/SP2/packager/agents/etc_zypp_conf.scr
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/SP2/packager/agents/etc_zypp_conf.scr?rev=64295&r1=64294&r2=64295&view=diff
==============================================================================
--- branches/tmp/lslezak/SP2/packager/agents/etc_zypp_conf.scr (original)
+++ branches/tmp/lslezak/SP2/packager/agents/etc_zypp_conf.scr Thu Jun 9 19:23:43 2011
@@ -1,100 +1,24 @@
/**
* File:
* etc_zypp_conf.scr
- * Summary:
- * SCR Agent for reading/writing /etc/zypp/zypp.conf file
- * using the ini-agent
- * Access:
- * read/write
- * Authors:
- * Ladislav Slezak
- * Example:
*
- * Read list of available files
- * SCR::Dir(.etc.zypp_conf)
- *
- * Read list of sections in a file
- * SCR::Dir(.etc.policykit.section."/etc/PolicyKit/privilege.d/hal-power-hibernate.privilege")
- * (["Privilege"])
- *
- * Read list of options in a section
- * SCR::Dir(.etc.policykit.value."/etc/PolicyKit/privilege.d/hal-power-hibernate.privilege"."Privilege")
- * (["RequiredPrivileges", "SufficientPrivileges", "Allow", "Deny", "CanObtain", "CanGrant", "ObtainRequireRoot"])
- *
- * Read an option
- * SCR::Read(.etc.policykit.value."/etc/PolicyKit/privilege.d/hal-power-hibernate.privilege"."Privilege"."RequiredPrivileges")
- * ("desktop-console")
- *
- *
- * Write an option
- * SCR::Write(.etc.policykit.value."/etc/PolicyKit/privilege.d/hal-power-hibernate.privilege"."Privilege"."RequiredPrivileges", "")
- * (true)
- *
- *
- * Flush the changes
- * SCR::Write(.etc.zypp_conf, nil)
- *
- *
- * Fore more information see the INI-agent documentation
- *
- * $Id$
- */
-
-.etc.zypp_conf
-
-`ag_ini(
- `IniAgent( "/etc/zypp/zypp.conf" , $[
- "options" : [ "no_nested_sections", "line_can_continue", "comments_last" ],
- "comments": [
- "^[ \t]*$", // empty line
- "^[ \t]*#.*$", // comment char
- ],
- "sections" : [
- $[
- "begin" : [ "^[ \t]*\\[[ \t]*(.*[^ \t])[ \t]*\\][ \t]*", "[%s]" ],
- ]
- ],
- "params" : [
- $[
- "match" : [ "^[ \t]*([^=]*[^ \t=])[ \t]*=[ \t]*(.*[^ \t]|)[ \t]*$" , "%s=%s"],
- ]
- ]
- ]
- )
-)
-
-/**
- * File:
- * etc_zypp_conf.scr
* Summary:
* SCR Agent for reading/writing /etc/zypp/zypp.conf file
* using the ini-agent
+ *
* Access:
* read/write
+ *
* Authors:
* Ladislav Slezak
- * Example:
- *
- * Read list of available files
- * SCR::Dir(.etc.zypp_conf)
- *
- * Read list of sections in a file
- * SCR::Dir(.etc.policykit.section."/etc/PolicyKit/privilege.d/hal-power-hibernate.privilege")
- * (["Privilege"])
- *
- * Read list of options in a section
- * SCR::Dir(.etc.policykit.value."/etc/PolicyKit/privilege.d/hal-power-hibernate.privilege"."Privilege")
- * (["RequiredPrivileges", "SufficientPrivileges", "Allow", "Deny", "CanObtain", "CanGrant", "ObtainRequireRoot"])
- *
- * Read an option
- * SCR::Read(.etc.policykit.value."/etc/PolicyKit/privilege.d/hal-power-hibernate.privilege"."Privilege"."RequiredPrivileges")
- * ("desktop-console")
*
+ * Example:
*
- * Write an option
- * SCR::Write(.etc.policykit.value."/etc/PolicyKit/privilege.d/hal-power-hibernate.privilege"."Privilege"."RequiredPrivileges", "")
- * (true)
+ * Get list of sections
+ * SCR::Dir(.etc.zypp_conf.section)
*
+ * Get a value
+ * SCR::Read(.etc.zypp_conf.value.main."commit.downloadMode")
*
* Flush the changes
* SCR::Write(.etc.zypp_conf, nil)
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org