summaryrefslogtreecommitdiff
authorandyq <andyq>2002-10-22 19:30:26 (UTC)
committer andyq <andyq>2002-10-22 19:30:26 (UTC)
commit44a60b35b903b68f2f60f5ba29b84db1563dd9f3 (patch) (unidiff)
tree64f2367de78806bbbb1ebf32bafc9dc9e56bb158
parentedcbb8b9bae3db2fae18ec6cd9efd202af4f913c (diff)
downloadopie-44a60b35b903b68f2f60f5ba29b84db1563dd9f3.zip
opie-44a60b35b903b68f2f60f5ba29b84db1563dd9f3.tar.gz
opie-44a60b35b903b68f2f60f5ba29b84db1563dd9f3.tar.bz2
Removed some debug output
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/ipkg.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/noncore/settings/aqpkg/ipkg.cpp b/noncore/settings/aqpkg/ipkg.cpp
index eacef76..368548b 100644
--- a/noncore/settings/aqpkg/ipkg.cpp
+++ b/noncore/settings/aqpkg/ipkg.cpp
@@ -175,57 +175,55 @@ int Ipkg :: executeIpkgCommand( QString &cmd, const QString option )
175 fp = popen( (const char *) cmd, "r"); 175 fp = popen( (const char *) cmd, "r");
176 if ( fp == NULL ) 176 if ( fp == NULL )
177 { 177 {
178 cout << "Couldn't execute " << cmd << "! err = " << fp << endl; 178 cout << "Couldn't execute " << cmd << "! err = " << fp << endl;
179 QString text; 179 QString text;
180 text.sprintf( "Couldn't execute %s! See stdout for error code", (const char *)cmd ); 180 text.sprintf( "Couldn't execute %s! See stdout for error code", (const char *)cmd );
181 emit outputText( text ); 181 emit outputText( text );
182 } 182 }
183 else 183 else
184 { 184 {
185 while ( fgets( line, sizeof line, fp) != NULL ) 185 while ( fgets( line, sizeof line, fp) != NULL )
186 { 186 {
187 lineStr = line; 187 lineStr = line;
188 lineStr=lineStr.left( lineStr.length()-1 ); 188 lineStr=lineStr.left( lineStr.length()-1 );
189 189
190 if ( lineStr != lineStrOld ) 190 if ( lineStr != lineStrOld )
191 { 191 {
192 //See if we're finished 192 //See if we're finished
193 if ( option == "install" || option == "reinstall" ) 193 if ( option == "install" || option == "reinstall" )
194 { 194 {
195 // Need to keep track of any dependant packages that get installed 195 // Need to keep track of any dependant packages that get installed
196 // so that we can create links to them as necessary 196 // so that we can create links to them as necessary
197 if ( lineStr.startsWith( "Installing " ) ) 197 if ( lineStr.startsWith( "Installing " ) )
198 { 198 {
199 cout << "LineStr = " << lineStr << endl;
200 int start = lineStr.find( " " ) + 1; 199 int start = lineStr.find( " " ) + 1;
201 int end = lineStr.find( " ", start ); 200 int end = lineStr.find( " ", start );
202 QString *package = new QString( lineStr.mid( start, end-start ) ); 201 QString *package = new QString( lineStr.mid( start, end-start ) );
203 dependantPackages->append( package ); 202 dependantPackages->append( package );
204 cout << "installing dependant package <" << *package << ">" << endl;
205 } 203 }
206 } 204 }
207 205
208 if ( option == "update" ) 206 if ( option == "update" )
209 { 207 {
210 if (lineStr.contains("Updated list")) 208 if (lineStr.contains("Updated list"))
211 ret = true; 209 ret = true;
212 } 210 }
213 else if ( option == "download" ) 211 else if ( option == "download" )
214 { 212 {
215 if (lineStr.contains("Downloaded")) 213 if (lineStr.contains("Downloaded"))
216 ret = true; 214 ret = true;
217 } 215 }
218 else 216 else
219 { 217 {
220 if (lineStr.contains("Done")) 218 if (lineStr.contains("Done"))
221 ret = true; 219 ret = true;
222 } 220 }
223 221
224 emit outputText( lineStr ); 222 emit outputText( lineStr );
225 } 223 }
226 lineStrOld = lineStr; 224 lineStrOld = lineStr;
227 qApp->processEvents(); 225 qApp->processEvents();
228 } 226 }
229 pclose(fp); 227 pclose(fp);
230 } 228 }
231 229