Author: jsuchome Date: Thu Apr 29 13:25:09 2010 New Revision: 61909 URL: http://svn.opensuse.org/viewcvs/yast?rev=61909&view=rev Log: - check availability of selected packages and report problem (bnc#599952) - 2.17.34 Modified: branches/SuSE-Code-11-SP1-Branch/product-creator/VERSION branches/SuSE-Code-11-SP1-Branch/product-creator/package/yast2-product-creator.changes branches/SuSE-Code-11-SP1-Branch/product-creator/src/kiwi_dialogs.ycp Modified: branches/SuSE-Code-11-SP1-Branch/product-creator/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/produc... ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/product-creator/VERSION (original) +++ branches/SuSE-Code-11-SP1-Branch/product-creator/VERSION Thu Apr 29 13:25:09 2010 @@ -1 +1 @@ -2.17.33 +2.17.34 Modified: branches/SuSE-Code-11-SP1-Branch/product-creator/package/yast2-product-creator.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/produc... ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/product-creator/package/yast2-product-creator.changes (original) +++ branches/SuSE-Code-11-SP1-Branch/product-creator/package/yast2-product-creator.changes Thu Apr 29 13:25:09 2010 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu Apr 29 12:51:36 CEST 2010 - jsuchome@suse.cz + +- check availability of selected packages and report problem + (bnc#599952) +- 2.17.34 + +------------------------------------------------------------------- Wed Apr 28 16:05:42 CEST 2010 - jsuchome@suse.cz - better check for URLs of local repositories, so local repository Modified: branches/SuSE-Code-11-SP1-Branch/product-creator/src/kiwi_dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/produc... ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/product-creator/src/kiwi_dialogs.ycp (original) +++ branches/SuSE-Code-11-SP1-Branch/product-creator/src/kiwi_dialogs.ycp Thu Apr 29 13:25:09 2010 @@ -40,6 +40,12 @@ string content_key = Kiwi::content_key; + map section_type_label = $[ + "image" : _("Packages for Image"), + "bootstrap" : _("Bootstrap"), + "xen" : _("Xen Specific Packages") + ]; + // read available the images under /usr/share/kiwi/image/ directory list<term> GetAvailableImages (string subdir) { @@ -1861,6 +1867,38 @@ ]; } +/** + * Check if selected packages are available (some of them may not after + * deleting some repository) + */ +define boolean CheckForAvailablePackages () { + + UI::BusyCursor (); + foreach (map pmap, KiwiConfig["packages"]:[], { + string type = pmap["type"]:""; + if (type != "delete") + { + list<string> n_a = []; + foreach (map p, pmap["package"]:[], { + if (p["name"]:"" != "" && !Package::Available (p["name"]:"")) + n_a = add (n_a, p["name"]:""); + }); + if (size (n_a) > 0) + { + string type_label = section_type_label[type]:type; + // popup headline + Popup::LongText (_("Missing packages"), + // popup text + `RichText (sformat (_("<p>These packages from section '%1' are not available with selected repositories:</p> +<p>%2.</p> +<p>Check the list of packages and package repositories.</p>"), type_label, mergestring (sort (n_a), "<br>"))), 70, 25); + } + } + }); + UI::NormalCursor (); + return true; +} + /** * Main dialog for Kiwi image configuration */ @@ -1868,6 +1906,8 @@ InitImageConfiguration (); +CheckForAvailablePackages (); + map<string, map> widget_descr = get_widget_description (); widget_descr["tab"] = CWMTab::CreateWidget($[ "tab_order" : [ -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org