From 12447e37851959c6420776eb262b4dcf93c97f26 Mon Sep 17 00:00:00 2001 From: Stanislav Visnovsky Date: Mon, 13 Feb 2006 10:29:59 +0000 Subject: [PATCH] report start/finish source data parsing --- zypp/source/SourceImpl.cc | 2 ++ zypp/source/susetags/SuseTagsImpl.cc | 11 +++++++++-- zypp/source/yum/YUMSourceImpl.cc | 7 +++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/zypp/source/SourceImpl.cc b/zypp/source/SourceImpl.cc index c796944..6e0c9fa 100644 --- a/zypp/source/SourceImpl.cc +++ b/zypp/source/SourceImpl.cc @@ -127,6 +127,8 @@ namespace zypp excp.msg() ); + DBG << "ProvideFile exception caught, callback answer: " << user << endl; + if( user == media::MediaChangeReport::ABORT ) { ZYPP_RETHROW ( excp ); diff --git a/zypp/source/susetags/SuseTagsImpl.cc b/zypp/source/susetags/SuseTagsImpl.cc index c7c3fd8..e96d97e 100644 --- a/zypp/source/susetags/SuseTagsImpl.cc +++ b/zypp/source/susetags/SuseTagsImpl.cc @@ -23,6 +23,7 @@ #include "zypp/source/susetags/PatternTagFileParser.h" #include "zypp/SourceFactory.h" +#include "zypp/ZYppCallbacks.h" using std::endl; @@ -105,6 +106,10 @@ namespace zypp void SuseTagsImpl::createResolvables(Source_Ref source_r) { + callback::SendReport report; + + report->startData( url() ); + #warning We use suse instead of for now Pathname p = provideFile(_path + "suse/setup/descr/packages"); DBG << "Going to parse " << p << endl; @@ -134,7 +139,7 @@ namespace zypp // parse selections try { p = provideFile(_path + "suse/setup/descr/selections"); - } catch (...) + } catch (Exception & excpt_r) { MIL << "'selections' file not found" << endl; @@ -174,7 +179,7 @@ namespace zypp try { p = provideFile(_path + "suse/setup/descr/patterns"); - } catch (...) + } catch (Exception & excpt_r) { MIL << "'patterns' file not found" << endl; file_found = false; @@ -207,6 +212,8 @@ namespace zypp DBG << "Parsing of " << file << " done" << endl; } } + + report->finishData( url(), CreateSourceReport::NO_ERROR, "" ); } /////////////////////////////////////////////////////////////////// // diff --git a/zypp/source/yum/YUMSourceImpl.cc b/zypp/source/yum/YUMSourceImpl.cc index 3535d83..2287ae3 100644 --- a/zypp/source/yum/YUMSourceImpl.cc +++ b/zypp/source/yum/YUMSourceImpl.cc @@ -25,6 +25,7 @@ #include "zypp/parser/yum/YUMParser.h" #include "zypp/SourceFactory.h" +#include "zypp/ZYppCallbacks.h" #include @@ -124,6 +125,10 @@ INT << "Storing data to cache" << endl; std::list repo_product; std::list repo_patches; + callback::SendReport report; + + report->startData( url() ); + try { // first read list of all files in the reposotory Pathname filename = _cache_dir.empty() @@ -427,6 +432,8 @@ INT << "Storing data to cache" << endl; { ERR << "Cannot read patch metadata" << endl; } + + report->finishData( url(), CreateSourceReport::NO_ERROR, "" ); } Package::Ptr YUMSourceImpl::createPackage( -- 2.7.4