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;
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;
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;