[zypp-devel] zypper patch to ignore unknown packages in non-interactive mode
Currently when zypper is in non-interactive mode, it will exit if it encounters packages that it cannot find a provider of a given package (i.e. zypper -n update packagea package-b-notfound when only packagea exists in all configured repositories). I added --ignore-unknown to the list of install and upgrade options so that it would proceed anyway. /marc diff -ur zypper-1.4.5.orig/src/Zypper.cc zypper-1.4.5/src/Zypper.cc --- zypper-1.4.5.orig/src/Zypper.cc 2010-06-11 05:41:56.000000000 -0500 +++ zypper-1.4.5/src/Zypper.cc 2011-04-07 17:43:20.011496250 -0500 @@ -940,6 +940,7 @@ {"no-force-resolution", no_argument, 0, 'R'}, {"force-resolution", no_argument, 0, 0 }, {"dry-run", no_argument, 0, 'D'}, + {"ignore-unknown", no_argument, 0, 0 }, // rug uses -N shorthand {"dry-run", no_argument, 0, 'N'}, {"no-recommends", no_argument, 0, 0 }, @@ -1594,6 +1595,7 @@ {"no-recommends", no_argument, 0, 0 }, {"recommends", no_argument, 0, 0 }, {"dry-run", no_argument, 0, 'D'}, + {"ignore-unknown", no_argument, 0, 0 }, // rug uses -N shorthand {"dry-run", no_argument, 0, 'N'}, {"download", required_argument, 0, 0 }, @@ -3479,7 +3481,7 @@ sr.hasFeedback(SolverRequester::Feedback::NOT_FOUND_CAP)) { setExitCode(ZYPPER_EXIT_INF_CAP_NOT_FOUND); - if (globalOpts().non_interactive) + if (globalOpts().non_interactive && !copts.count("ignore-unknown")) ZYPP_THROW(ExitRequestException()); } @@ -4101,7 +4103,7 @@ sr.hasFeedback(SolverRequester::Feedback::NOT_FOUND_CAP)) { setExitCode(ZYPPER_EXIT_INF_CAP_NOT_FOUND); - if (globalOpts().non_interactive) + if (globalOpts().non_interactive && !copts.count("ignore-unknown")) ZYPP_THROW(ExitRequestException()); } } -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (1)
-
Marc Olson