Author: locilka
Date: Mon Jun 6 18:24:22 2011
New Revision: 64231
URL: http://svn.opensuse.org/viewcvs/yast?rev=64231&view=rev
Log:
FATE #312263: Support for several add_on_products[.xml] files at once
- This FATE request is actually for adding support for
/add_on_products.xml file that can be possibly found in inst-sys
(adapted by, e.g., DUD)
- Not only /add_on_products.xml but also the older format
/add_on_products is supported
Modified:
branches/SuSE-Code-11-SP2-Branch/packager/src/modules/AddOnProduct.ycp
branches/SuSE-Code-11-SP2-Branch/packager/src/modules/Packages.ycp
Modified: branches/SuSE-Code-11-SP2-Branch/packager/src/modules/AddOnProduct.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/packager/src/modules/AddOnProduct.ycp?rev=64231&r1=64230&r2=64231&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/packager/src/modules/AddOnProduct.ycp (original)
+++ branches/SuSE-Code-11-SP2-Branch/packager/src/modules/AddOnProduct.ycp Mon Jun 6 18:24:22 2011
@@ -1029,23 +1029,6 @@
return true;
}
-string preselected_add_ons = "plain";
-
-/**
- * Sets an add_on_products file type ("plain" or "xml")
- * @see FATE #303675
- *
- * @param string type "plain" or "xml"
- */
-global void SetPreselectedAddOnProductsType (string type) {
- if (type == "xml" || type == "plain") {
- preselected_add_ons = type;
- y2milestone ("add_on_products type set: %1", preselected_add_ons);
- } else {
- y2error ("Unknown type: %1", type);
- }
-}
-
/**
* Reads temporary add_on_products file, parses supported products,
* merges base URL if products use relative URL and returns list of
@@ -1257,9 +1240,41 @@
}
/**
- * Auto-integrate add-on products in specified file (usually add_on_products file)
+ * Installs selected products from repository. If list of prods_to_install
+ * is empty, all products found are installed.
*
- * @param filelist string a file containing a list of add-on products to integrate
+ * @param
+ * @return boolean if successful
+ */
+boolean InstallProductsFromRepository (list <string> prods_to_install, integer src) {
+ // there are more products at the destination
+ // install the listed ones only
+ if (prods_to_install != nil && size (prods_to_install) > 0) {
+ foreach (string one_prod, prods_to_install, {
+ y2milestone ("Selecting product '%1' for installation", one_prod);
+ Pkg::ResolvableInstall (one_prod, `product);
+ });
+
+ // install all products from the destination
+ } else {
+ list