author | tille <tille> | 2002-05-02 19:11:55 (UTC) |
---|---|---|
committer | tille <tille> | 2002-05-02 19:11:55 (UTC) |
commit | ce6758eccada41f5c3fef13e6b4808c525213bee (patch) (side-by-side diff) | |
tree | 236d015e4c037254d7862620e41bd75ab701a696 /noncore/unsupported/oipkg/pmipkg.cpp | |
parent | b4f04de71fea42fa32a048f42d27e4f5be6804f9 (diff) | |
download | opie-ce6758eccada41f5c3fef13e6b4808c525213bee.zip opie-ce6758eccada41f5c3fef13e6b4808c525213bee.tar.gz opie-ce6758eccada41f5c3fef13e6b4808c525213bee.tar.bz2 |
added doclnk support
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 @@ -27,13 +27,12 @@ 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() { } @@ -70,13 +69,13 @@ int PmIpkg::runIpkg(const QString& args, const QString& dest ) out( "<hr><br>Starting to "+ args+"<br>\n"); 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 ); #endif #ifdef SYSTEM @@ -157,32 +156,32 @@ 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 ); const QFileInfoList *list = d.entryInfoList(); QFileInfoListIterator it( *list ); QFileInfo *fi; while ( (fi=it.current()) ) { - pvDebug(4, "process dir "+fi->absFilePath()); processLinkDir( fi->absFilePath(), dest ); ++it; } // if (linkOpp==removeLink) // { // pvDebug(2,"remove destDir "+ destFile ); @@ -223,20 +222,21 @@ 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() { installDialog = new QDialog(0,0,true); @@ -318,13 +318,13 @@ void PmIpkg::remove() { out( "<br>removing links<br>" ); 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()); } if ( it->link() )delete fileList; } @@ -347,12 +347,13 @@ void PmIpkg::install() { out( "<br>creating links<br>" ); 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()); } } out("<br>"); |