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) (unidiff)
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
@@ -55,10 +55,9 @@ Ipkg :: ~Ipkg()
55// destDir is the dir that the destination alias points to (used to link to root) 55// destDir is the dir that the destination alias points to (used to link to root)
56// flags is the ipkg options flags 56// flags is the ipkg options flags
57// dir is the directory to run ipkg in (defaults to "") 57// dir is the directory to run ipkg in (defaults to "")
58bool Ipkg :: runIpkg( ) 58void Ipkg :: runIpkg()
59{ 59{
60 error = false; 60 error = false;
61 bool ret = false;
62 QStringList commands; 61 QStringList commands;
63 62
64 QDir::setCurrent( "/tmp" ); 63 QDir::setCurrent( "/tmp" );
@@ -137,11 +136,12 @@ bool Ipkg :: runIpkg( )
137 dependantPackages = new QList<QString>; 136 dependantPackages = new QList<QString>;
138 dependantPackages->setAutoDelete( true ); 137 dependantPackages->setAutoDelete( true );
139 138
140 ret = executeIpkgCommand( commands, option ); 139 executeIpkgCommand( commands, option );
141 140
142 if ( aborted ) 141}
143 return false;
144 142
143void Ipkg :: createSymLinks()
144{
145 if ( option == "install" || option == "reinstall" || option == "upgrade" ) 145 if ( option == "install" || option == "reinstall" || option == "upgrade" )
146 { 146 {
147 // If we are not removing packages and make links option is selected 147 // If we are not removing packages and make links option is selected
@@ -171,7 +171,6 @@ bool Ipkg :: runIpkg( )
171 171
172 emit outputText( "Finished" ); 172 emit outputText( "Finished" );
173 emit outputText( "" ); 173 emit outputText( "" );
174 return ret;
175} 174}
176 175
177void Ipkg :: removeStatusEntry() 176void Ipkg :: removeStatusEntry()
@@ -295,10 +294,6 @@ int Ipkg :: executeIpkgCommand( QStringList &cmd, const QString /*option*/ )
295 { 294 {
296 emit outputText( QString( "Couldn't start ipkg process" ) ); 295 emit outputText( QString( "Couldn't start ipkg process" ) );
297 } 296 }
298
299 // Now wait for it to finish
300 while ( !finished )
301 qApp->processEvents();
302} 297}
303 298
304void Ipkg::commandStdout(OProcess*, char *buffer, int buflen) 299void Ipkg::commandStdout(OProcess*, char *buffer, int buflen)
@@ -354,6 +349,8 @@ void Ipkg::processFinished()
354 delete proc; 349 delete proc;
355 proc = 0; 350 proc = 0;
356 finished = true; 351 finished = true;
352
353 emit ipkgFinished();
357} 354}
358 355
359 356