{ /////////////////////////////////////////////////////////////////
const Pathname applydeltarpm_prog( "/usr/bin/applydeltarpm" );
- const str::regex applydeltarpm_tick ( "([0-9]+) percent finished" );
/******************************************************************
**
const Progress & report_r = Progress() )
{
ExternalProgram prog( argv_r, ExternalProgram::Stderr_To_Stdout );
- str::smatch what;
for ( std::string line = prog.receiveLine(); ! line.empty(); line = prog.receiveLine() )
{
- if ( report_r && str::regex_search( line, what, applydeltarpm_tick ) )
- {
- report_r( str::strtonum<unsigned>( what[1] ) );
- }
+ if ( report_r )
+ report_r( str::strtonum<unsigned>( line ));
else
DBG << "Applydeltarpm : " << line;
- }
+ }
return( prog.close() == 0 );
}