>I also believe that m.commit() is a synchronous call... so I believe that it does wait for the m.commit() to finish. I could be wrong though.
Well, by experience I know I see in the details window that it continue while showing the message.
So I firmly inclined to believe it is not so synchronous.
I have found in source package libapt-front:
void Manager::commit()
{
if (!m_pm)
throw exception::InternalError( "Tried to commit without PM" );
// mornfall: is it me or this looks like a race?
while (1) { _system->UnLock(); // unlock for dpkg to take over pkgPackageManager::OrderResult Res = m_pm->DoInstall(-1);
if (Res == pkgPackageManager::Completed) { _system->Lock(); // regain lock
delete m_pm;
m_pm = 0; cache::Global::get( m_cache ).reopen(); // reopen cache
return;
} else if (Res == pkgPackageManager::Failed) {
throw exception::Error( "Error installing packages" );
} exception::checkGlobal( "Error installing packages" ); getArchives();
}
}
I suppose PM is Package Manager.
I guess now I am searching DoInstall method to try to prove it is asynchronous.
My guess is still that DoInstall launch dpkg to install all the downloaded packages, and may return with pkgPackageManager::Failed
and continue installing packages in the background.
>I also believe that m.commit() is a synchronous call... so I believe that it does wait for the m.commit() to finish. I could be wrong though.
Well, by experience I know I see in the details window that it continue while showing the message.
So I firmly inclined to believe it is not so synchronous.
I have found in source package libapt-front: :InternalError( "Tried to commit without PM" );
void Manager::commit()
{
if (!m_pm)
throw exception:
// mornfall: is it me or this looks like a race?
_system- >UnLock( ); // unlock for dpkg to take over
pkgPackageMana ger::OrderResul t Res = m_pm->DoInstall (-1); er::Completed) {
_system- >Lock() ; // regain lock
cache: :Global: :get( m_cache ).reopen(); // reopen cache er::Failed) {
exception: :checkGlobal( "Error installing packages" );
getArchives( );
while (1) {
if (Res == pkgPackageManag
delete m_pm;
m_pm = 0;
return;
} else if (Res == pkgPackageManag
throw exception::Error( "Error installing packages" );
}
}
}
I suppose PM is Package Manager. er::Failed
I guess now I am searching DoInstall method to try to prove it is asynchronous.
My guess is still that DoInstall launch dpkg to install all the downloaded packages, and may return with pkgPackageManag
and continue installing packages in the background.