Imported Upstream version 1.12.15 04/109404/1 upstream/1.12.15
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 10 Jan 2017 05:44:38 +0000 (14:44 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 10 Jan 2017 05:44:39 +0000 (14:44 +0900)
Change-Id: I778ea80b89a86fa25c39910f62ba8d9725c8f07d
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
VERSION.cmake
doc/zypper.8
doc/zypper.8.txt
package/zypper.changes
src/Zypper.cc
src/update.cc

index 5734f5c..7f78c44 100644 (file)
@@ -34,7 +34,7 @@
 #
 SET(VERSION_MAJOR "1")
 SET(VERSION_MINOR "12")
-SET(VERSION_PATCH "14")
+SET(VERSION_PATCH "15")
 
-# LAST RELEASED: 1.12.14
+# LAST RELEASED: 1.12.15
 #=======
index fed8c6f..6d0aadb 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: zypper
 .\"    Author: [see the "AUTHORS" section]
 .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\"      Date: 09/08/2015
+.\"      Date: 09/09/2015
 .\"    Manual: ZYPPER
 .\"    Source: SUSE Linux
 .\"  Language: English
 .\"
-.TH "ZYPPER" "8" "09/08/2015" "SUSE Linux" "ZYPPER"
+.TH "ZYPPER" "8" "09/09/2015" "SUSE Linux" "ZYPPER"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -939,6 +939,11 @@ section for details on exit status of
 \fB101\fR
 returned by this command\&.
 .PP
+\fB\-\-updatestack\-only\fR
+.RS 4
+Check only for patches which affect the package management itself\&.
+.RE
+.PP
 \fB\-r\fR, \fB\-\-repo\fR \fIalias\fR|\fIname\fR|\fI#\fR|\fIURI\fR
 .RS 4
 Check for patches only in the repository specified by the alias, name, number, or URI\&. This option can be used multiple times\&.
index e92c97d..69f68ce 100644 (file)
@@ -523,6 +523,9 @@ Update Management Commands
        See also the *EXIT CODES* section for details on exit status of *0*, *100*, and *101* returned by this command.
 +
 --
+       *--updatestack-only*::
+               Check only for patches which affect the package management itself.
+
        *-r*, *--repo* 'alias'|'name'|'#'|'URI'::
                Check for patches only in the repository specified by the alias, name, number, or URI. This option can be used multiple times.
 --
index 5eda12a..7532118 100644 (file)
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Wed Sep  9 16:04:54 CEST 2015 - ma@suse.de
+
+- patch-check --updatestack-only: Check only for patches which
+  affect the package management itself (FATE#319407)
+- version 1.12.15
+
+-------------------------------------------------------------------
 Tue Sep  8 19:01:25 CEST 2015 - ma@suse.de
 
 - patch --updatestack-only: Install only patches which affect the
index bb31b83..db02e5b 100644 (file)
@@ -160,6 +160,12 @@ namespace
     CommandHelpFormater & optionSection( boost::string_ref text_r )
     { _mww.gotoNextPar(); _mww.writePar( text_r, 2 ); _mww.gotoNextPar(); return *this; }
 
+    CommandHelpFormater & optionSectionCommandOptions()
+    { return optionSection(_("Command options:") ); }
+
+    CommandHelpFormater & optionSectionExpertOptions()
+    { return optionSection(_("Expert options:") ); }
+
     /** Option definition
      * \code
      * "123456789012345678901234567890123456789
@@ -170,6 +176,10 @@ namespace
     CommandHelpFormater & option( boost::string_ref option_r, boost::string_ref text_r )
     { _mww.writeDefinition( option_r , text_r, (option_r.starts_with( "--" )?4:0), 28 ); return *this; }
 
+    /** \todo eliminate legacy indentation */
+    CommandHelpFormater & option26( boost::string_ref option_r, boost::string_ref text_r )
+    { _mww.writeDefinition( option_r , text_r, (option_r.starts_with( "--" )?4:0), 26 ); return *this; }
+
   private:
     std::ostringstream   _str;
     mbs::MbsWriteWrapped _mww;
@@ -2261,11 +2271,13 @@ void Zypper::processCommandOptions()
       {"repo", required_argument, 0, 'r'},
       // rug compatibility option, we have --repo
       {"catalog", required_argument, 0, 'c'},
+      {"updatestack-only",         no_argument,       0,  0 },
       {"help", no_argument, 0, 'h'},
       {0, 0, 0, 0}
     };
     specific_options = patch_check_options;
-    _command_help = _(
+    _command_help = ( CommandHelpFormater()
+      << _(
       "patch-check (pchk) [options]\n"
       "\n"
       "Check for available patches.\n"
@@ -2273,7 +2285,9 @@ void Zypper::processCommandOptions()
       "  Command options:\n"
       "\n"
       "-r, --repo <alias|#|URI>  Check for patches only in the specified repository.\n"
-    );
+      ) )
+      .option26("--updatestack-only",  _("Check only for patches which affect the package management itself.") )
+      ;
     break;
   }
 
index 7128343..0455414 100755 (executable)
@@ -151,15 +151,20 @@ void patch_check ()
   RuntimeData & gData = Zypper::instance()->runtimeData();
   DBG << "patch check" << endl;
   gData.patches_count = gData.security_patches_count = 0;
+  bool updatestackOnly = Zypper::instance()->cOpts().count("updatestack-only");
 
   for_( it, God->pool().byKindBegin(ResKind::patch), God->pool().byKindEnd(ResKind::patch) )
   {
     const PoolItem & pi( *it );
-    if ( pi.isRelevant() && !pi.isSatisfied())
+    if ( pi.isBroken() )
     {
-      gData.patches_count++;
-      if (pi->asKind<Patch>()->categoryEnum() == Patch::CAT_SECURITY)
-        gData.security_patches_count++;
+      Patch::constPtr patch( pi->asKind<Patch>() );
+      if ( !updatestackOnly || patch->restartSuggested() )
+      {
+       ++gData.patches_count;
+       if ( patch->categoryEnum() == Patch::CAT_SECURITY )
+         ++gData.security_patches_count;
+      }
     }
   }
 
@@ -203,7 +208,7 @@ static bool xml_list_patches (Zypper & zypper)
   {
     const PoolItem & pi( *it );
 
-    if ( pi.isRelevant() && !pi.isSatisfied() && pi->asKind<Patch>()->restartSuggested() )
+    if ( pi.isBroken() && pi->asKind<Patch>()->restartSuggested() )
     {
       pkg_mgr_available = true;
       break;