summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/ipkg.cpp
authordrw <drw>2003-04-26 22:42:19 (UTC)
committer drw <drw>2003-04-26 22:42:19 (UTC)
commit98a9291263e167b8882ac916330e7215ebd884b4 (patch) (side-by-side diff)
tree882a909e9381ab4cc97e77377fd61361d7f21eab /noncore/settings/aqpkg/ipkg.cpp
parent64c48b637c1bd1bef679bff500f3e0ce5365358d (diff)
downloadopie-98a9291263e167b8882ac916330e7215ebd884b4.zip
opie-98a9291263e167b8882ac916330e7215ebd884b4.tar.gz
opie-98a9291263e167b8882ac916330e7215ebd884b4.tar.bz2
1. Fix for bug #872 - reduce CPU useage while ipkg is doing its thing 2. Re-enable setDocument function for identifying local ipks
Diffstat (limited to 'noncore/settings/aqpkg/ipkg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/ipkg.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/noncore/settings/aqpkg/ipkg.cpp b/noncore/settings/aqpkg/ipkg.cpp
index e906653..34999ad 100644
--- a/noncore/settings/aqpkg/ipkg.cpp
+++ b/noncore/settings/aqpkg/ipkg.cpp
@@ -52,16 +52,15 @@ Ipkg :: ~Ipkg()
// packageName is the package name - (for a network package this will be the same as
// package parameter)
// dest is the destination alias (from ipk.conf)
// destDir is the dir that the destination alias points to (used to link to root)
// flags is the ipkg options flags
// dir is the directory to run ipkg in (defaults to "")
-bool Ipkg :: runIpkg( )
+void Ipkg :: runIpkg()
{
error = false;
- bool ret = false;
QStringList commands;
QDir::setCurrent( "/tmp" );
if ( runtimeDir != "" )
{
@@ -134,17 +133,18 @@ bool Ipkg :: runIpkg( )
}
// Execute command
dependantPackages = new QList<QString>;
dependantPackages->setAutoDelete( true );
- ret = executeIpkgCommand( commands, option );
+ executeIpkgCommand( commands, option );
- if ( aborted )
- return false;
+}
+void Ipkg :: createSymLinks()
+{
if ( option == "install" || option == "reinstall" || option == "upgrade" )
{
// If we are not removing packages and make links option is selected
// create the links
createLinks = true;
if ( flags & MAKE_LINKS )
@@ -168,13 +168,12 @@ bool Ipkg :: runIpkg( )
}
delete dependantPackages;
emit outputText( "Finished" );
emit outputText( "" );
- return ret;
}
void Ipkg :: removeStatusEntry()
{
QString statusFile = destDir;
if ( statusFile.right( 1 ) != "/" )
@@ -292,16 +291,12 @@ int Ipkg :: executeIpkgCommand( QStringList &cmd, const QString /*option*/ )
// Start the process going
finished = false;
if(!proc->start(OProcess::NotifyOnExit, OProcess::All))
{
emit outputText( QString( "Couldn't start ipkg process" ) );
}
-
- // Now wait for it to finish
- while ( !finished )
- qApp->processEvents();
}
void Ipkg::commandStdout(OProcess*, char *buffer, int buflen)
{
QString lineStr = buffer;
if ( lineStr[buflen-1] == '\n' )
@@ -351,12 +346,14 @@ void Ipkg::processFinished()
if ( !error && option == "remove" )
removeStatusEntry();
delete proc;
proc = 0;
finished = true;
+
+ emit ipkgFinished();
}
void Ipkg :: abort()
{
if ( proc )