Diffstat (limited to 'noncore/unsupported/oipkg/pmipkg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp index 2559a51..be9d6da 100644 --- a/noncore/unsupported/oipkg/pmipkg.cpp +++ b/noncore/unsupported/oipkg/pmipkg.cpp | |||
@@ -30,7 +30,6 @@ PmIpkg::PmIpkg( PackageManagerSettings* s, QWidget* p, const char * name, WFlag | |||
30 | : QObject ( p ) | 30 | : QObject ( p ) |
31 | { | 31 | { |
32 | settings = s; | 32 | settings = s; |
33 | runwindowopen = false; | ||
34 | runwindow = new RunWindow( p, name, true, f ); | 33 | runwindow = new RunWindow( p, name, true, f ); |
35 | } | 34 | } |
36 | 35 | ||
@@ -73,7 +72,7 @@ int PmIpkg::runIpkg(const QString& args, const QString& dest ) | |||
73 | int r = 0; | 72 | int r = 0; |
74 | #ifdef PROC | 73 | #ifdef PROC |
75 | QString o = "start"; | 74 | QString o = "start"; |
76 | Process *ipkg = new Process( "ls");//cmd ); | 75 | Process *ipkg = new Process( cmd ); |
77 | out( "running:<br>\n"+ipkg->arguments().join(" ")+"<br>\n" ); | 76 | out( "running:<br>\n"+ipkg->arguments().join(" ")+"<br>\n" ); |
78 | QString description; | 77 | QString description; |
79 | ipkg->exec("",o); | 78 | ipkg->exec("",o); |
@@ -160,9 +159,9 @@ void PmIpkg::processFileList( QStringList *fileList, QString d ) | |||
160 | 159 | ||
161 | void PmIpkg::processLinkDir( QString file, QString dest ) | 160 | void PmIpkg::processLinkDir( QString file, QString dest ) |
162 | { | 161 | { |
163 | pvDebug( 7,"PmIpkg::processLinkDir "+file+" to "+ dest); | 162 | pvDebug( 4,"PmIpkg::processLinkDir "+file+" to "+ dest); |
164 | if (linkOpp==createLink) pvDebug( 2,"opp: createLink"); | 163 | if (linkOpp==createLink) pvDebug( 4,"opp: createLink"); |
165 | if (linkOpp==removeLink) pvDebug( 2,"opp:removeLink"); | 164 | if (linkOpp==removeLink) pvDebug( 4,"opp: removeLink"); |
166 | if ( dest == "???" || dest == "" ) return; | 165 | if ( dest == "???" || dest == "" ) return; |
167 | QString destFile = file; | 166 | QString destFile = file; |
168 | file = dest+"/"+file; | 167 | file = dest+"/"+file; |
@@ -170,6 +169,7 @@ void PmIpkg::processLinkDir( QString file, QString dest ) | |||
170 | QFileInfo fileInfo( file ); | 169 | QFileInfo fileInfo( file ); |
171 | if ( fileInfo.isDir() ) | 170 | if ( fileInfo.isDir() ) |
172 | { | 171 | { |
172 | pvDebug(4, "process dir "+file); | ||
173 | QDir destDir( destFile ); | 173 | QDir destDir( destFile ); |
174 | if (linkOpp==createLink) destDir.mkdir( destFile, true ); | 174 | if (linkOpp==createLink) destDir.mkdir( destFile, true ); |
175 | QDir d( file ); | 175 | QDir d( file ); |
@@ -179,7 +179,6 @@ void PmIpkg::processLinkDir( QString file, QString dest ) | |||
179 | QFileInfo *fi; | 179 | QFileInfo *fi; |
180 | while ( (fi=it.current()) ) | 180 | while ( (fi=it.current()) ) |
181 | { | 181 | { |
182 | pvDebug(4, "process dir "+fi->absFilePath()); | ||
183 | processLinkDir( fi->absFilePath(), dest ); | 182 | processLinkDir( fi->absFilePath(), dest ); |
184 | ++it; | 183 | ++it; |
185 | } | 184 | } |
@@ -226,14 +225,15 @@ void PmIpkg::loadList( PackageList pl ) | |||
226 | 225 | ||
227 | void PmIpkg::commit( PackageList pl ) | 226 | void PmIpkg::commit( PackageList pl ) |
228 | { | 227 | { |
229 | sizecount = 0; | 228 | int sizecount = 0; |
230 | QString rem="<b>"+tr("To remove:")+"</b><br>\n"; | 229 | // QString rem="<b>"+tr("To remove:")+"</b><br>\n"; |
231 | QString inst="<b>"+tr("To install:")+"</b><br>\n"; | 230 | // QString inst="<b>"+tr("To install:")+"</b><br>\n"; |
232 | loadList(pl); | 231 | loadList(pl); |
233 | for (uint i=0; i < to_remove.count(); i++) | 232 | for (uint i=0; i < to_remove.count(); i++) |
234 | sizecount += 1; | 233 | sizecount += 1; |
235 | for (uint i=0; i < to_install.count(); i++) | 234 | for (uint i=0; i < to_install.count(); i++) |
236 | sizecount += to_install.at(i)->size().toInt(); | 235 | sizecount += to_install.at(i)->size().toInt(); |
236 | runwindow->progress->setTotalSteps(sizecount); | ||
237 | startDialog(); | 237 | startDialog(); |
238 | } | 238 | } |
239 | 239 | ||
@@ -321,7 +321,7 @@ void PmIpkg::remove() | |||
321 | processFileList( fileList, it->dest() ); | 321 | processFileList( fileList, it->dest() ); |
322 | } | 322 | } |
323 | it->processed(); | 323 | it->processed(); |
324 | 324 | // to_install.take( it ); | |
325 | out("<br><hr>"); | 325 | out("<br><hr>"); |
326 | }else{ | 326 | }else{ |
327 | out("<b>"+tr("Error while removing")+"</b><hr>"+it->name()); | 327 | out("<b>"+tr("Error while removing")+"</b><hr>"+it->name()); |
@@ -350,6 +350,7 @@ void PmIpkg::install() | |||
350 | makeLinks( it ); | 350 | makeLinks( it ); |
351 | } | 351 | } |
352 | it->processed(); | 352 | it->processed(); |
353 | // to_install.take( it->name() ); | ||
353 | out("<br><hr>"); | 354 | out("<br><hr>"); |
354 | }else{ | 355 | }else{ |
355 | out("<b>"+tr("Error while installing")+"</b><hr>"+it->name()); | 356 | out("<b>"+tr("Error while installing")+"</b><hr>"+it->name()); |