summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg/pmipkg.cpp
Unidiff
Diffstat (limited to 'noncore/unsupported/oipkg/pmipkg.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/pmipkg.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp
index 6ef6d19..0401a5b 100644
--- a/noncore/unsupported/oipkg/pmipkg.cpp
+++ b/noncore/unsupported/oipkg/pmipkg.cpp
@@ -247,50 +247,52 @@ void PmIpkg::commit()
247void PmIpkg::doIt() 247void PmIpkg::doIt()
248{ 248{
249 runwindow->progress->setProgress(0); 249 runwindow->progress->setProgress(0);
250 show(); 250 show();
251 remove(); 251 remove();
252 install(); 252 install();
253} 253}
254 254
255 255
256void PmIpkg::remove() 256void PmIpkg::remove()
257{ 257{
258 if ( to_remove.count() == 0 ) return; 258 if ( to_remove.count() == 0 ) return;
259 259
260 out(tr("Removing")+"\n"+tr("please wait")+"\n\n"); 260 out(tr("Removing")+"\n"+tr("please wait")+"\n\n");
261 261
262 QStringList *fileList; 262 QStringList *fileList;
263 for (uint i=0; i < to_remove.count(); i++) 263 for (uint i=0; i < to_remove.count(); i++)
264 { 264 {
265 if ( to_remove.at(i)->link() )fileList = getList( to_remove.at(i)->name(), to_remove.at(i)->dest() ); 265 if ( to_remove.at(i)->link() )fileList = getList( to_remove.at(i)->name(), to_remove.at(i)->dest() );
266 if ( runIpkg("remove " + to_remove.at(i)->installName(), to_remove.at(i)->dest() )) 266 if ( runIpkg("remove " + to_remove.at(i)->installName(), to_remove.at(i)->dest() ))
267 { 267 {
268 runwindow->progress->setProgress( 1 ); 268 runwindow->progress->setProgress( 1 );
269 linkOpp = removeLink; 269 linkOpp = removeLink;
270 to_remove.at(i)->processed(); 270 to_remove.at(i)->processed();
271 pvDebug(4,"link "+QString::number(i));
271 if ( to_remove.at(i)->link() ) 272 if ( to_remove.at(i)->link() )
272 processFileList( fileList, to_remove.at(i)->dest() ); 273 processFileList( fileList, to_remove.at(i)->dest() );
274 pvDebug(4,"take "+QString::number(i));
273 to_remove.take( i ); 275 to_remove.take( i );
274 276
275 out("\n"); 277 out("\n");
276 }else{ 278 }else{
277 out(tr("Error while removing")+to_remove.at(i)->name()+"\n"); 279 out(tr("Error while removing")+to_remove.at(i)->name()+"\n");
278 if ( to_remove.at(i)->link() ) 280 if ( to_remove.at(i)->link() )
279 processFileList( fileList, to_remove.at(i)->dest() ); 281 processFileList( fileList, to_remove.at(i)->dest() );
280 } 282 }
281 if ( to_remove.at(i)->link() ) 283 if ( to_remove.at(i)->link() )
282 processFileList( fileList, to_remove.at(i)->dest() ); 284 processFileList( fileList, to_remove.at(i)->dest() );
283 if ( to_remove.at(i)->link() )delete fileList; 285 if ( to_remove.at(i)->link() )delete fileList;
284 } 286 }
285 to_remove.clear(); 287 to_remove.clear();
286 out("\n"); 288 out("\n");
287} 289}
288 290
289 291
290void PmIpkg::install() 292void PmIpkg::install()
291{ 293{
292 if ( to_install.count() == 0 ) return; 294 if ( to_install.count() == 0 ) return;
293 out(tr("Installing")+"\n"+tr("please wait")+"\n"); 295 out(tr("Installing")+"\n"+tr("please wait")+"\n");
294 for (uint i=0; i < to_install.count(); i++) 296 for (uint i=0; i < to_install.count(); i++)
295 { 297 {
296 qDebug("install loop %i of %i installing %s",i,to_install.count(),to_install.at(i)->installName().latin1()); //pvDebug 298 qDebug("install loop %i of %i installing %s",i,to_install.count(),to_install.at(i)->installName().latin1()); //pvDebug