- removed the limit_to_verbosity nonsense
authorJan Kupec <jkupec@suse.cz>
Tue, 11 Sep 2007 16:10:44 +0000 (16:10 +0000)
committerJan Kupec <jkupec@suse.cz>
Tue, 11 Sep 2007 16:10:44 +0000 (16:10 +0000)
- backup for media callback hack (#309043)

src/zypper-misc.cc
src/zypper.h

index 62a83d1..1999b75 100644 (file)
@@ -1404,12 +1404,16 @@ int solve_and_commit () {
       if (!confirm_licenses()) return ZYPPER_EXIT_OK;
 
       cerr_v << _("committing") << endl;
-      
+
       try {
-        // FIXME do resync if in shell mode, how
-        // do I know if in shell mode?
+        //! \todo fix the media reporting correctly
+        gData.show_media_progress_hack = true;
+
+        // FIXME do resync if in shell mode, how do I know if in shell mode?
         ZYppCommitResult result = God->commit( ZYppCommitPolicy().syncPoolAfterCommit(false) );
 
+        gData.show_media_progress_hack = false; 
+
         if (!result._errors.empty())
           retv = ZYPPER_EXIT_ERR_ZYPP;
 
index cf5c8f0..2c49558 100644 (file)
@@ -93,7 +93,7 @@ struct Error
 struct RuntimeData
 {
   RuntimeData()
-    : patches_count(0), security_patches_count(0), limit_to_verbosity(0)
+    : patches_count(0), security_patches_count(0), show_media_progress_hack(false)
   {}
 
   std::list<Error> errors;
@@ -106,26 +106,9 @@ struct RuntimeData
   zypp::ResStore target_resolvables;
   zypp::RepoInfo current_repo;
 
-  /**
-   * Limit output to and above specified verbosity level.
-   * 
-   * Use this variable to control whether to print the output or not,
-   * wherever the desired verbosity level is variable. Then set the limit
-   * before the code where the output is generated and reset it afterwards:
-   * 
-   * <code>
-   * 
-   * // set verbosity limit
-   * gData.limit_to_verbosity = VERBOSITY_MEDIUM;
-   * 
-   * ... code generating the output but respecting the verbosity limit goes here ...
-   * 
-   * // restore verbosity limit
-   * gData.limit_to_verbosity = VERBOSITY_NORMAL;
-   * 
-   * </code> 
-   */
-  int limit_to_verbosity;
+  // hack to enable media progress reporting in the commit phase in normal
+  // output level
+  bool show_media_progress_hack;
 };
 
 extern RuntimeData gData;