[Bug 48627] Re: Poor resolution of "database locked" problem
Paul Dufresne
dufresnep at fastmail.fm
Mon Jul 2 20:17:44 UTC 2007
>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.
--
Poor resolution of "database locked" problem
https://bugs.launchpad.net/bugs/48627
You received this bug notification because you are a member of Kubuntu
Team, which is a direct subscriber.
More information about the kubuntu-bugs
mailing list