summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg/pmipkg.cpp
Unidiff
Diffstat (limited to 'noncore/unsupported/oipkg/pmipkg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/pmipkg.cpp31
1 files changed, 17 insertions, 14 deletions
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp
index f2852c3..6ef6d19 100644
--- a/noncore/unsupported/oipkg/pmipkg.cpp
+++ b/noncore/unsupported/oipkg/pmipkg.cpp
@@ -51,7 +51,7 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
51 51
52 cmd += " -force-defaults "; 52 cmd += " -force-defaults ";
53 53
54 if (installDialog->_force_depends) 54 if (installDialog && installDialog->_force_depends)
55 { 55 {
56 if (installDialog->_force_depends->isChecked()) 56 if (installDialog->_force_depends->isChecked())
57 cmd += " -force-depends "; 57 cmd += " -force-depends ";
@@ -87,6 +87,7 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
87 if (lineStr!=lineStrOld) 87 if (lineStr!=lineStrOld)
88 out(lineStr); 88 out(lineStr);
89 lineStrOld = lineStr; 89 lineStrOld = lineStr;
90 qApp->processEvents();
90 } 91 }
91 pclose(fp); 92 pclose(fp);
92 } 93 }
@@ -156,6 +157,8 @@ void PmIpkg::processLinkDir( QString file, QString dest )
156 QString destFile = file; 157 QString destFile = file;
157 file = dest+"/"+file; 158 file = dest+"/"+file;
158 if (file == dest) return; 159 if (file == dest) return;
160// if (linkOpp==createLink) out( "\ncreating links\n" );
161 // if (linkOpp==removeLink) out( "\nremoving links\n" );
159 QFileInfo fileInfo( file ); 162 QFileInfo fileInfo( file );
160 if ( fileInfo.isDir() ) 163 if ( fileInfo.isDir() )
161 { 164 {
@@ -265,18 +268,18 @@ void PmIpkg::remove()
265 runwindow->progress->setProgress( 1 ); 268 runwindow->progress->setProgress( 1 );
266 linkOpp = removeLink; 269 linkOpp = removeLink;
267 to_remove.at(i)->processed(); 270 to_remove.at(i)->processed();
271 if ( to_remove.at(i)->link() )
272 processFileList( fileList, to_remove.at(i)->dest() );
268 to_remove.take( i ); 273 to_remove.take( i );
269 274
270 out("\n\n"); 275 out("\n");
271 }else{ 276 }else{
272 out(tr("Error while removing")+to_remove.at(i)->name()+"\n"); 277 out(tr("Error while removing")+to_remove.at(i)->name()+"\n");
278 if ( to_remove.at(i)->link() )
279 processFileList( fileList, to_remove.at(i)->dest() );
273 } 280 }
274 if ( to_remove.at(i)->link() ) 281 if ( to_remove.at(i)->link() )
275 {
276 out( "\nremoving links\n" );
277 out( "for package "+to_remove.at(i)->name()+" in "+to_remove.at(i)->dest()+"\n" );
278 processFileList( fileList, to_remove.at(i)->dest() ); 282 processFileList( fileList, to_remove.at(i)->dest() );
279 }
280 if ( to_remove.at(i)->link() )delete fileList; 283 if ( to_remove.at(i)->link() )delete fileList;
281 } 284 }
282 to_remove.clear(); 285 to_remove.clear();
@@ -290,21 +293,21 @@ void PmIpkg::install()
290 out(tr("Installing")+"\n"+tr("please wait")+"\n"); 293 out(tr("Installing")+"\n"+tr("please wait")+"\n");
291 for (uint i=0; i < to_install.count(); i++) 294 for (uint i=0; i < to_install.count(); i++)
292 { 295 {
296 qDebug("install loop %i of %i installing %s",i,to_install.count(),to_install.at(i)->installName().latin1()); //pvDebug
293 if ( runIpkg("install " + to_install.at(i)->installName(), to_install.at(i)->dest() )) 297 if ( runIpkg("install " + to_install.at(i)->installName(), to_install.at(i)->dest() ))
294 { 298 {
295 runwindow->progress->setProgress( to_install.at(i)->size().toInt() + runwindow->progress->progress()); 299 runwindow->progress->setProgress( to_install.at(i)->size().toInt() + runwindow->progress->progress());
296 to_install.at(i)->processed(); 300 to_install.at(i)->processed();
301 linkOpp = createLink;
302 if ( to_install.at(i)->link() )
303 makeLinks( to_install.at(i) );
297 to_install.take( i ); 304 to_install.take( i );
298 out("\n\n"); 305 out("\n");
299 }else{ 306 }else{
300 out(tr("Error while installing")+to_install.at(i)->name()+"\n"); 307 out(tr("Error while installing")+to_install.at(i)->name()+"\n");
301 } 308 linkOpp = createLink;
302 linkOpp = createLink; 309 if ( to_install.at(i)->link() )
303 if ( to_install.at(i)->link() ) 310 makeLinks( to_install.at(i) );
304 {
305 out( "\ncreating links\n" );
306 out( "for package "+to_install.at(i)->name()+" in "+to_install.at(i)->dest()+"\n" );
307 makeLinks( to_install.at(i) );
308 } 311 }
309 } 312 }
310 out("\n"); 313 out("\n");