use the tag-based patch-interactive interface of libzypp
authorDominik Heidler <dheidler@suse.de>
Mon, 30 May 2011 15:36:42 +0000 (17:36 +0200)
committerDominik Heidler <dheidler@suse.de>
Mon, 30 May 2011 15:36:42 +0000 (17:36 +0200)
src/SolverRequester.cc
src/info.cc
src/update.cc
zypper.spec.cmake

index 8f219ee..15907b8 100644 (file)
@@ -399,8 +399,11 @@ bool SolverRequester::installPatch(
 
     if (ignore_pkgmgmt || patch->restartSuggested())
     {
+      Patch::InteractiveFlags ignoreFlags = Patch::NoFlags;
+      ignoreFlags |= (Zypper::instance()->globalOpts().reboot_req_non_interactive) ? Patch::Reboot : Patch::NoFlags;
+
       // bnc #221476
-      if (_opts.skip_interactive && patch->interactive(Zypper::instance()->globalOpts().reboot_req_non_interactive))
+      if (_opts.skip_interactive && patch->interactiveWhenIgnoring(ignoreFlags))
       {
         addFeedback(Feedback::PATCH_INTERACTIVE_SKIPPED, patchspec, selected);
         return false;
index dbed35b..f3e1f02 100644 (file)
@@ -267,7 +267,10 @@ void printPatchInfo(Zypper & zypper, const ui::Selectable & s )
     cout << _("Restart Required: ");
   cout << (patch->restartSuggested() ? _("Yes") : _("No")) << endl;
 
-  cout << _("Interactive: ") << (patch->interactive(zypper.globalOpts().reboot_req_non_interactive) ? _("Yes") : _("No")) << endl;
+  Patch::InteractiveFlags ignoreFlags = Patch::NoFlags;
+  ignoreFlags |= (zypper.globalOpts().reboot_req_non_interactive) ? Patch::Reboot : Patch::NoFlags;
+
+  cout << _("Interactive: ") << (patch->interactiveWhenIgnoring(ignoreFlags) ? _("Yes") : _("No")) << endl;
 
   printSummaryDesc(pool_item.resolvable());
 
index 2c87feb..041c05d 100755 (executable)
@@ -138,7 +138,11 @@ static bool xml_list_patches (Zypper & zypper)
         cout << "category=\"" <<  patch->category() << "\" ";
         cout << "pkgmanager=\"" << (patch->restartSuggested() ? "true" : "false") << "\" ";
         cout << "restart=\"" << (patch->rebootSuggested() ? "true" : "false") << "\" ";
-        cout << "interactive=\"" << (patch->interactive(zypper.globalOpts().reboot_req_non_interactive) ? "true" : "false") << "\" ";
+
+        Patch::InteractiveFlags ignoreFlags = Patch::NoFlags;
+        ignoreFlags |= (zypper.globalOpts().reboot_req_non_interactive) ? Patch::Reboot : Patch::NoFlags;
+
+        cout << "interactive=\"" << (patch->interactiveWhenIgnoring(ignoreFlags) ? "true" : "false") << "\" ";
         cout << "kind=\"patch\"";
         cout << ">" << endl;
         cout << "  <summary>" << xml_encode(patch->summary()) << "  </summary>" << endl;
index 5563943..e81b235 100644 (file)
@@ -11,7 +11,7 @@
 # norootforbuild
 
 Name:           @PACKAGE@
-BuildRequires:  libzypp-devel >= 9.2.0
+BuildRequires:  libzypp-devel >= 9.3.0
 BuildRequires:  boost-devel >= 1.33.1
 BuildRequires:  gettext-devel >= 0.15
 BuildRequires:  readline-devel >= 5.1