Author: lslezak Date: Mon Jan 11 18:06:05 2010 New Revision: 60320 URL: http://svn.opensuse.org/viewcvs/yast?rev=60320&view=rev Log: - sw_single.ycp: check target initialization result, abort on error (bnc#556477) - 2.19.3 Modified: trunk/packager/VERSION trunk/packager/package/yast2-packager.changes trunk/packager/src/clients/sw_single.ycp Modified: trunk/packager/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/VERSION?rev=60320&r1=60319&r2=60320&view=diff ============================================================================== --- trunk/packager/VERSION (original) +++ trunk/packager/VERSION Mon Jan 11 18:06:05 2010 @@ -1 +1 @@ -2.19.2 +2.19.3 Modified: trunk/packager/package/yast2-packager.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/package/yast2-packager.changes?rev=60320&r1=60319&r2=60320&view=diff ============================================================================== --- trunk/packager/package/yast2-packager.changes (original) +++ trunk/packager/package/yast2-packager.changes Mon Jan 11 18:06:05 2010 @@ -7,6 +7,9 @@ - sw_single.ycp: display installation progress and show the summary dialog after installation when installing a package from command line (bnc#455768) +- sw_single.ycp: check target initialization result, abort on error + (bnc#556477) +- 2.19.3 ------------------------------------------------------------------- Mon Jan 11 13:57:26 CET 2010 - locilka@suse.cz Modified: trunk/packager/src/clients/sw_single.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/clients/sw_single.ycp?rev=60320&r1=60319&r2=60320&view=diff ============================================================================== --- trunk/packager/src/clients/sw_single.ycp (original) +++ trunk/packager/src/clients/sw_single.ycp Mon Jan 11 18:06:05 2010 @@ -135,7 +135,12 @@ define symbol CheckWhichPackages (list<string> arg_list) { - PackageSystem::EnsureTargetInit(); + if (!Pkg::TargetInit("/", false)) + { + // error message + Report::Error("Cannot read the list of installed packages."); + return `failed; + } y2milestone ("CheckWhichPackages (%1)", arg_list); // if sw_single is called with a list of packages or a package name @@ -185,7 +190,8 @@ if (out["exit"]:-1 != 0) { - Report::Error(sformat(_("Error: Cannot copy package %1 to temporary repository %2."), package, tmprepo)); + // error message (%1 is a package file name) + Report::Error(sformat(_("Error: Cannot copy package %1 to temporary repository."), package)); return `failed; } } @@ -203,6 +209,7 @@ if (repo_id == nil) { + // error message Report::Error(sformat(_("Error: Cannot add a temporary directory, packages cannot be installed."))); return `failed; } @@ -221,7 +228,8 @@ if (out["exit"]:-1 != 0) { - Report::Error(sformat(_("Error: Cannot query package %1."), package)); + // error message + Report::Error(sformat(_("Error: Cannot query package file %1."), package)); return `failed; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org