Don't treat patches with licensed packages as interactive is --auto-agree-with-licens...
authorMichael Andres <ma@suse.de>
Mon, 30 Apr 2012 09:36:17 +0000 (11:36 +0200)
committerMichael Andres <ma@suse.de>
Mon, 30 Apr 2012 09:36:17 +0000 (11:36 +0200)
src/SolverRequester.cc
src/info.cc
src/update.cc

index 1ff8c1d..8d6f3a0 100644 (file)
@@ -402,6 +402,8 @@ bool SolverRequester::installPatch(
       Patch::InteractiveFlags ignoreFlags = Patch::NoFlags;
       if (Zypper::instance()->globalOpts().reboot_req_non_interactive)
         ignoreFlags |= Patch::Reboot;
+      if ( Zypper::instance()->cOpts().count("auto-agree-with-licenses") || Zypper::instance()->cOpts().count("agree-to-third-party-licenses") )
+       ignoreFlags |= Patch::License;
 
       // bnc #221476
       if (_opts.skip_interactive && patch->interactiveWhenIgnoring(ignoreFlags))
index a95f5e7..976b463 100644 (file)
@@ -282,6 +282,8 @@ void printPatchInfo(Zypper & zypper, const ui::Selectable & s )
   Patch::InteractiveFlags ignoreFlags = Patch::NoFlags;
   if (zypper.globalOpts().reboot_req_non_interactive)
     ignoreFlags |= Patch::Reboot;
+  if ( zypper.cOpts().count("auto-agree-with-licenses") || zypper.cOpts().count("agree-to-third-party-licenses") )
+    ignoreFlags |= Patch::License;
 
   cout << _("Interactive: ") << (patch->interactiveWhenIgnoring(ignoreFlags) ? _("Yes") : _("No")) << endl;
 
index 6a58f94..977926d 100755 (executable)
@@ -142,6 +142,8 @@ static bool xml_list_patches (Zypper & zypper)
         Patch::InteractiveFlags ignoreFlags = Patch::NoFlags;
         if (zypper.globalOpts().reboot_req_non_interactive)
           ignoreFlags |= Patch::Reboot;
+       if ( zypper.cOpts().count("auto-agree-with-licenses") || zypper.cOpts().count("agree-to-third-party-licenses") )
+         ignoreFlags |= Patch::License;
 
         cout << "interactive=\"" << (patch->interactiveWhenIgnoring(ignoreFlags) ? "true" : "false") << "\" ";
         cout << "kind=\"patch\"";