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 @@ -29,9 +29,8 @@ PmIpkg::PmIpkg( PackageManagerSettings* s, QWidget* p, const char * name, WFlags f ) : QObject ( p ) { settings = s; - runwindowopen = false; runwindow = new RunWindow( p, name, true, f ); } PmIpkg::~PmIpkg() @@ -72,9 +71,9 @@ int PmIpkg::runIpkg(const QString& args, const QString& dest ) cmd += args; int r = 0; #ifdef PROC QString o = "start"; - Process *ipkg = new Process( "ls");//cmd ); + Process *ipkg = new Process( cmd ); out( "running:<br>\n"+ipkg->arguments().join(" ")+"<br>\n" ); QString description; ipkg->exec("",o); // out( o ); @@ -159,18 +158,19 @@ void PmIpkg::processFileList( QStringList *fileList, QString d ) void PmIpkg::processLinkDir( QString file, QString dest ) { - pvDebug( 7,"PmIpkg::processLinkDir "+file+" to "+ dest); - if (linkOpp==createLink) pvDebug( 2,"opp: createLink"); - if (linkOpp==removeLink) pvDebug( 2,"opp:removeLink"); + pvDebug( 4,"PmIpkg::processLinkDir "+file+" to "+ dest); + if (linkOpp==createLink) pvDebug( 4,"opp: createLink"); + if (linkOpp==removeLink) pvDebug( 4,"opp: removeLink"); if ( dest == "???" || dest == "" ) return; QString destFile = file; file = dest+"/"+file; if (file == dest) return; QFileInfo fileInfo( file ); if ( fileInfo.isDir() ) { + pvDebug(4, "process dir "+file); QDir destDir( destFile ); if (linkOpp==createLink) destDir.mkdir( destFile, true ); QDir d( file ); d.setFilter( QDir::Files | QDir::Hidden | QDir::NoSymLinks ); @@ -178,9 +178,8 @@ void PmIpkg::processLinkDir( QString file, QString dest ) QFileInfoListIterator it( *list ); QFileInfo *fi; while ( (fi=it.current()) ) { - pvDebug(4, "process dir "+fi->absFilePath()); processLinkDir( fi->absFilePath(), dest ); ++it; } // if (linkOpp==removeLink) @@ -225,16 +224,17 @@ void PmIpkg::loadList( PackageList pl ) } void PmIpkg::commit( PackageList pl ) { - sizecount = 0; - QString rem="<b>"+tr("To remove:")+"</b><br>\n"; - QString inst="<b>"+tr("To install:")+"</b><br>\n"; + int sizecount = 0; +// QString rem="<b>"+tr("To remove:")+"</b><br>\n"; +// QString inst="<b>"+tr("To install:")+"</b><br>\n"; loadList(pl); for (uint i=0; i < to_remove.count(); i++) sizecount += 1; for (uint i=0; i < to_install.count(); i++) sizecount += to_install.at(i)->size().toInt(); + runwindow->progress->setTotalSteps(sizecount); startDialog(); } void PmIpkg::startDialog() @@ -320,9 +320,9 @@ void PmIpkg::remove() out( "for package "+it->name()+" in "+it->dest()+"<br>" ); processFileList( fileList, it->dest() ); } it->processed(); - +// to_install.take( it ); out("<br><hr>"); }else{ out("<b>"+tr("Error while removing")+"</b><hr>"+it->name()); } @@ -349,8 +349,9 @@ void PmIpkg::install() out( "for package "+it->name()+" in "+it->dest()+"<br>" ); makeLinks( it ); } it->processed(); +// to_install.take( it->name() ); out("<br><hr>"); }else{ out("<b>"+tr("Error while installing")+"</b><hr>"+it->name()); } |