From: DongHun Kwak Date: Tue, 10 Jan 2017 05:44:31 +0000 (+0900) Subject: Imported Upstream version 1.12.14 X-Git-Tag: upstream/1.12.14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Ftags%2Fupstream%2F1.12.14;p=platform%2Fupstream%2Fzypper.git Imported Upstream version 1.12.14 Change-Id: Id938bbe5fc9c67b01715c690e969cf676d3c6c68 Signed-off-by: DongHun Kwak --- diff --git a/VERSION.cmake b/VERSION.cmake index fd6de9b..5734f5c 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -34,7 +34,7 @@ # SET(VERSION_MAJOR "1") SET(VERSION_MINOR "12") -SET(VERSION_PATCH "13") +SET(VERSION_PATCH "14") -# LAST RELEASED: 1.12.13 +# LAST RELEASED: 1.12.14 #======= diff --git a/doc/zypper.8 b/doc/zypper.8 index a8979b3..fed8c6f 100644 --- a/doc/zypper.8 +++ b/doc/zypper.8 @@ -2,12 +2,12 @@ .\" Title: zypper .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/01/2015 +.\" Date: 09/08/2015 .\" Manual: ZYPPER .\" Source: SUSE Linux .\" Language: English .\" -.TH "ZYPPER" "8" "09/01/2015" "SUSE Linux" "ZYPPER" +.TH "ZYPPER" "8" "09/08/2015" "SUSE Linux" "ZYPPER" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -956,6 +956,11 @@ command again\&. This command is similar to \fBzypper update \-t patch\fR\&. .PP +\fB\-\-updatestack\-only\fR +.RS 4 +Install only patches which affect the package management itself and exit\&. +.RE +.PP \fB\-b\fR, \fB\-\-bugzilla\fR \fI#\fR[,\fI\&...\fR] .RS 4 Install patch fixing a Bugzilla issue specified by number\&. Use diff --git a/doc/zypper.8.txt b/doc/zypper.8.txt index 8f6e71a..e92c97d 100644 --- a/doc/zypper.8.txt +++ b/doc/zypper.8.txt @@ -536,6 +536,9 @@ Update Management Commands This command is similar to *zypper update -t patch*. + -- + *--updatestack-only*:: + Install only patches which affect the package management itself and exit. + *-b*, *--bugzilla* '#'[,'...']:: Install patch fixing a Bugzilla issue specified by number. Use *list-patches --bugzilla* command to get a list of available needed patches for specific issues. diff --git a/package/zypper.changes b/package/zypper.changes index 35c8d8c..5eda12a 100644 --- a/package/zypper.changes +++ b/package/zypper.changes @@ -1,4 +1,26 @@ ------------------------------------------------------------------- +Tue Sep 8 19:01:25 CEST 2015 - ma@suse.de + +- patch --updatestack-only: Install only patches which affect the + package management itself (FATE#319407) +- version 1.12.14 + +------------------------------------------------------------------- +Sun Sep 6 01:15:00 CEST 2015 - ma@suse.de + +- Update sle-zypper-po.tar.bz2 + +------------------------------------------------------------------- +Sun Sep 6 01:13:26 CEST 2015 - ma@suse.de + +- Update zypper-po.tar.bz2 + +------------------------------------------------------------------- +Thu Sep 3 01:14:04 CEST 2015 - ma@suse.de + +- Update zypper-po.tar.bz2 + +------------------------------------------------------------------- Tue Sep 1 18:26:11 CEST 2015 - ma@suse.de - man: mention new zypp.conf solver.dupAllow* config options diff --git a/po/sle-zypper-po.tar.bz2 b/po/sle-zypper-po.tar.bz2 index 8ea69a6..846f5e1 100644 Binary files a/po/sle-zypper-po.tar.bz2 and b/po/sle-zypper-po.tar.bz2 differ diff --git a/po/zypper-po.tar.bz2 b/po/zypper-po.tar.bz2 index 5b62fd5..cd4e2c9 100644 Binary files a/po/zypper-po.tar.bz2 and b/po/zypper-po.tar.bz2 differ diff --git a/src/SolverRequester.cc b/src/SolverRequester.cc index 718ca7b..58a0df5 100644 --- a/src/SolverRequester.cc +++ b/src/SolverRequester.cc @@ -351,6 +351,7 @@ void SolverRequester::updatePatches() DBG << "going to mark needed patches for installation" << endl; // search twice: if there are none with restartSuggested(), retry on all + // unless --updatestack-only. // (in the first run, ignore_pkgmgmt == 0, in the second it is 1) bool any_marked = false; bool dateLimit = ( _opts.cliMatchPatch._dateBefore != Date() ); @@ -382,8 +383,17 @@ void SolverRequester::updatePatches() any_marked = true; } - if (any_marked && !ignore_pkgmgmt) - MIL << "got some pkgmgmt patches, will install these first" << endl; + if ( ! ignore_pkgmgmt ) // just checked the update stack + { + if ( any_marked ) + MIL << "got some pkgmgmt patches, will install these first" << endl; + + if ( Zypper::instance()->cOpts().count("updatestack-only") ) + { + MIL << "updatestack-only: will stop here!" << endl; + break; + } + } } } diff --git a/src/Zypper.cc b/src/Zypper.cc index 92f423e..bb31b83 100644 --- a/src/Zypper.cc +++ b/src/Zypper.cc @@ -103,6 +103,10 @@ namespace { % old_r % new_r ); } + + inline std::string dashdash( std::string optname_r ) + { return std::move(optname_r.insert( 0, "--" )); } + } //namespace /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// @@ -2011,6 +2015,7 @@ void Zypper::processCommandOptions() { static struct option update_options[] = { {"repo", required_argument, 0, 'r'}, + {"updatestack-only", no_argument, 0, 0 }, {"skip-interactive", no_argument, 0, 0 }, {"with-interactive", no_argument, 0, 0 }, {"auto-agree-with-licenses", no_argument, 0, 'l'}, @@ -2037,7 +2042,8 @@ void Zypper::processCommandOptions() {0, 0, 0, 0} }; specific_options = update_options; - _command_help = str::form(_( + _command_help = ( CommandHelpFormater() + << str::form(_( "patch [options]\n" "\n" "Install all available needed patches.\n" @@ -2068,7 +2074,9 @@ void Zypper::processCommandOptions() " --download Set the download-install mode. Available modes:\n" " %s\n" "-d, --download-only Only download the packages, do not install.\n" - ), "only, in-advance, in-heaps, as-needed"); + ), "only, in-advance, in-heaps, as-needed") ) + .option("--updatestack-only", _("Install only patches which affect the package management itself.") ) + ; break; } @@ -4620,6 +4628,21 @@ void Zypper::doCommand() return; } + if ( copts.count("updatestack-only") ) + { + for ( const char * opt : { "bugzilla", "bz", "cve" } ) + { + if ( copts.count( opt ) ) + { + out().error(str::form(_("Cannot use %s together with %s."), + dashdash("updatestack-only").c_str(), + dashdash(opt).c_str() ) ); + setExitCode(ZYPPER_EXIT_ERR_INVALID_ARGS); + return; + } + } + } + bool skip_interactive = false; if (copts.count("skip-interactive")) { diff --git a/src/solve-commit.cc b/src/solve-commit.cc index 58c103f..d5004c5 100755 --- a/src/solve-commit.cc +++ b/src/solve-commit.cc @@ -889,7 +889,7 @@ void solve_and_commit (Zypper & zypper) } // check for running services (fate #300763) - if ( zypper.cOpts().find("download-only") == zypper.cOpts().end() + if ( ! ( zypper.cOpts().count("download-only") || zypper.cOpts().count("dry-run") ) && ( summary.packagesToRemove() || summary.packagesToUpgrade() || summary.packagesToDowngrade() ) ) diff --git a/zypper.spec.cmake b/zypper.spec.cmake index d7204da..b71172e 100644 --- a/zypper.spec.cmake +++ b/zypper.spec.cmake @@ -42,6 +42,7 @@ Provides: y2pmsh Obsoletes: y2pmsh Provides: zypper(oldpackage) +Provides: zypper(updatestack-only) %description Zypper is a command line tool for managing software. It can be used to add