Author: locilka Date: Wed Aug 31 14:08:41 2011 New Revision: 65467 URL: http://svn.opensuse.org/viewcvs/yast?rev=65467&view=rev Log: - Cleaner solution for adjusting repository priority and fixing that now it also works in installation (bnc#714027) - 2.17.89 Modified: branches/SuSE-Code-11-SP2-Branch/packager/VERSION branches/SuSE-Code-11-SP2-Branch/packager/package/yast2-packager.changes branches/SuSE-Code-11-SP2-Branch/packager/src/modules/AddOnProduct.ycp Modified: branches/SuSE-Code-11-SP2-Branch/packager/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/packag... ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/packager/VERSION (original) +++ branches/SuSE-Code-11-SP2-Branch/packager/VERSION Wed Aug 31 14:08:41 2011 @@ -1 +1 @@ -2.17.88 +2.17.89 Modified: branches/SuSE-Code-11-SP2-Branch/packager/package/yast2-packager.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/packag... ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/packager/package/yast2-packager.changes (original) +++ branches/SuSE-Code-11-SP2-Branch/packager/package/yast2-packager.changes Wed Aug 31 14:08:41 2011 @@ -1,7 +1,9 @@ ------------------------------------------------------------------- -Wed Aug 31 12:18:19 CEST 2011 - locilka@suse.cz +Wed Aug 31 14:05:48 CEST 2011 - locilka@suse.cz -- Simplifying the previous commit (bnc#714027) +- Cleaner solution for adjusting repository priority and fixing + that now it also works in installation (bnc#714027) +- 2.17.89 ------------------------------------------------------------------- Mon Aug 29 16:15:53 CEST 2011 - locilka@suse.cz 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/packag... ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/packager/src/modules/AddOnProduct.ycp (original) +++ branches/SuSE-Code-11-SP2-Branch/packager/src/modules/AddOnProduct.ycp Wed Aug 31 14:08:41 2011 @@ -1285,19 +1285,6 @@ } /** - * Adjusts priority of a given repository id - * - * @param integer repository id - * @param integer priority - * @returns boolean if successful - */ -boolean RepositorySetPriority (integer repo_id, integer priority) { - map <string, any> edit_repo = $["SrcId" : repo_id, "priority" : priority]; - y2milestone ("Adjusting repo priority: %1", edit_repo); - return Pkg::SourceEditSet ([edit_repo]); -} - -/** * Auto-integrate add-on products in specified file (usually add_on_products or * add_on_products.xml file) * @@ -1394,8 +1381,12 @@ string pth = one_product["path"]:""; integer priority = one_product["priority"]:-1; - y2milestone ("Adding Repository: %1 %2", url, pth); - repo_id = Pkg::SourceCreate (url, pth); + map <string, any> new_repo = $[ "enabled" : true, "base_urls" : [url], "prod_dir" : pth ]; + // BNC #714027: Possibility to adjust repository priority (usually higher) + if (priority > -1) new_repo["priority"] = priority; + + y2milestone ("Adding Repository: %1", new_repo); + repo_id = Pkg::RepositoryAdd (new_repo); if (repo_id == nil || repo_id < 0) { y2error ("Unable to add product: %1", url); @@ -1404,8 +1395,10 @@ return false; } - // BNC #714027: Possibility to adjust repository priority (usually higher) - if (priority > -1) RepositorySetPriority (repo_id, priority); + // download metadata, build repo cache + Pkg::SourceRefreshNow (repo_id); + // load resolvables to zypp pool + Pkg::SourceLoad(); if (! AcceptedLicenseAndInfoFile (repo_id)) { y2warning ("License not accepted, delete the repository"); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org