Author: locilka
Date: Mon Oct 6 14:42:09 2008
New Revision: 51865
URL: http://svn.opensuse.org/viewcvs/yast?rev=51865&view=rev
Log:
- Module PackagesProposal extended to handle also patterns
(bnc #431580, bnc #431503)
- 2.17.38
Modified:
trunk/yast2/VERSION
trunk/yast2/library/packages/src/PackagesProposal.ycp
trunk/yast2/package/yast2.changes
Modified: trunk/yast2/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/VERSION?rev=51865&r1=51864&r2=51865&view=diff
==============================================================================
--- trunk/yast2/VERSION (original)
+++ trunk/yast2/VERSION Mon Oct 6 14:42:09 2008
@@ -1 +1 @@
-2.17.37
+2.17.38
Modified: trunk/yast2/library/packages/src/PackagesProposal.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/packages/src/PackagesProposal.ycp?rev=51865&r1=51864&r2=51865&view=diff
==============================================================================
--- trunk/yast2/library/packages/src/PackagesProposal.ycp (original)
+++ trunk/yast2/library/packages/src/PackagesProposal.ycp Mon Oct 6 14:42:09 2008
@@ -54,9 +54,33 @@
map > resolvables_to_install = $[];
/**
+ * Resets all resolvables to install. Use carefully.
+ */
+ global void ResetAll () {
+ if (resolvables_to_install != $[]) {
+ y2warning ("Reseting all PackagesProposal items");
+ } else {
+ y2milestone ("Reseting all PackagesProposal items");
+ }
+
+ resolvables_to_install = $[];
+ }
+
+ /**
* List of currently supported types of resolvables
*/
- list <symbol> supported_resolvables = [`package];
+ list <symbol> supported_resolvables = [`package, `pattern];
+
+ /**
+ * Returns list of resolvables currently supported by this module.
+ *
+ * @example GetSupportedResolvables() -> [`package, `pattern, ... ]
+ *
+ * @return list <symbol> of resolvables
+ */
+ global list <symbol> GetSupportedResolvables () {
+ return supported_resolvables;
+ }
boolean IsSupportedResolvableType (symbol type) {
if (type == nil) {
@@ -189,6 +213,7 @@
*
* @example
* GetAllResolvables (`package) -> ["list", "of", "packages"]
+ * GetAllResolvables (`pattern) -> ["list", "of", "patterns"]
* // not a supported resolvable type
* GetAllResolvables (`unknown) -> nil
*
@@ -212,6 +237,41 @@
}
/**
+ * Returns all selected resolvables for all supported types
+ *
+ * @return map map of resolvables
+ * @struct $[
+ * `resolvable_type : [ "list", "of", "resolvables" ],
+ * `another_type : [ "list", "of", "resolvables" ],
+ * ]
+ *
+ * @example
+ * // No resolvables selected
+ * GetAllResolvablesForAllTypes() -> $[]
+ * // Only patterns selected
+ * GetAllResolvablesForAllTypes() -> $[`pattern : ["some", "patterns"]]
+ * // Also packages selected
+ * GetAllResolvablesForAllTypes() -> $[
+ * `pattern : ["some", "patterns"],
+ * `package : ["some", "packages"],
+ * ]
+ */
+ global map GetAllResolvablesForAllTypes () {
+ map ret = $[];
+ list <string> resolvables = [];
+
+ foreach (symbol one_type, GetSupportedResolvables(), {
+ resolvables = GetAllResolvables (one_type);
+
+ if (resolvables != nil && resolvables != []) {
+ ret[one_type] = resolvables;
+ }
+ });
+
+ return ret;
+ }
+
+ /**
* Return whether a unique ID is already in use.
*
* @param string unique_ID to check
Modified: trunk/yast2/package/yast2.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=51865&r1=51864&r2=51865&view=diff
==============================================================================
--- trunk/yast2/package/yast2.changes (original)
+++ trunk/yast2/package/yast2.changes Mon Oct 6 14:42:09 2008
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Mon Oct 6 14:38:59 CEST 2008 - locilka@suse.cz
+
+- Module PackagesProposal extended to handle also patterns
+ (bnc #431580, bnc #431503)
+- 2.17.38
+
+-------------------------------------------------------------------
Mon Oct 6 13:23:09 CEST 2008 - visnov@suse.cz
- Added icon to hardware detection confirmation (bnc #431276)
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org