summaryrefslogtreecommitdiff
authortille <tille>2002-07-25 12:29:45 (UTC)
committer tille <tille>2002-07-25 12:29:45 (UTC)
commit8895e9bd55244f32f12ff619e020a23afac44808 (patch) (side-by-side diff)
treec2d1be286eeb7146af5a6caf69fec3e4f56b5438
parent6773dde79921b0a85040b2f74e89428c5f355fc0 (diff)
downloadopie-8895e9bd55244f32f12ff619e020a23afac44808.zip
opie-8895e9bd55244f32f12ff619e020a23afac44808.tar.gz
opie-8895e9bd55244f32f12ff619e020a23afac44808.tar.bz2
eliminated output mess
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/pmipkg.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp
index 7682d49..84de67b 100644
--- a/noncore/unsupported/oipkg/pmipkg.cpp
+++ b/noncore/unsupported/oipkg/pmipkg.cpp
@@ -295,147 +295,148 @@ void PmIpkg::remove()
if ( to_remove.at(i)->link() ) fileList = getList( to_remove.at(i)->name(), to_remove.at(i)->dest() );
if ( runIpkg("remove " + to_remove.at(i)->installName(), to_remove.at(i)->dest() ))
{
runwindow->progress->setProgress( 1 );
linkOpp = removeLink;
to_remove.at(i)->processed();
pvDebug(3,"link "+QString::number(i));
if ( to_remove.at(i)->link() )
processFileList( fileList, to_remove.at(i)->dest() );
//pvDebug(3,"take "+QString::number(i)+" of "+QString::number(to_remove.count()));
//if ( to_remove.at(i) ) to_remove.take( i );
out("\n");
}else{
out(tr("Error while removing ")+to_remove.at(i)->name()+"\n");
if ( to_remove.at(i)->link() )
processFileList( fileList, to_remove.at(i)->dest() );
}
if ( to_remove.at(i)->link() )
processFileList( fileList, to_remove.at(i)->dest() );
if ( to_remove.at(i)->link() )delete fileList;
}
to_remove.clear();
out("\n");
}
void PmIpkg::install()
{
if ( to_install.count() == 0 ) return;
out(tr("Installing")+"\n"+tr("please wait")+"\n");
for (uint i=0; i < to_install.count(); i++)
{
qDebug("install loop %i of %i installing %s",i,to_install.count(),to_install.at(i)->installName().latin1()); //pvDebug
if (to_install.at(i)->link())
{
// hack to have package.list
// in "dest"/usr/lib/ipkg/info/
QString rds = settings->getDestinationUrlByName("root");
QString lds = settings->getDestinationUrlByName(to_install.at(i)->dest());
QString listFile = "usr/lib/ipkg/lists/"+to_install.at(i)->name()+".list";
rds += listFile;
lds += listFile;
const char *rd = rds.latin1();
const char *ld = lds.latin1();
pvDebug(4, "linking: "+rds+" -> "+lds );
symlink( rd, ld );
}
if ( runIpkg("install " + to_install.at(i)->installName(), to_install.at(i)->dest() ))
{
runwindow->progress->setProgress( to_install.at(i)->size().toInt() + runwindow->progress->progress());
to_install.at(i)->processed();
linkOpp = createLink;
if ( to_install.at(i)->link() )
makeLinks( to_install.at(i) );
// to_install.take( i );
out("\n");
}else{
out(tr("Error while installing")+to_install.at(i)->name()+"\n");
linkOpp = createLink;
if ( to_install.at(i)->link() )
makeLinks( to_install.at(i) );
}
}
out("\n");
to_install.clear();
}
void PmIpkg::createLinks( const QString &dest )
{
pvDebug(2,"PmIpkg::createLinks "+dest);
linkOpp=createLink;
QString url = settings->getDestinationUrlByName( dest );
url = url==""?dest:url;
processLinkDir( "/opt", url );
processLinkDir( "/usr", url );
}
void PmIpkg::removeLinks( const QString &dest )
{
pvDebug(2,"PmIpkg::removeLinks "+dest);
linkOpp=removeLink;
QString url = settings->getDestinationUrlByName( dest );
url = url==""?dest:url;
processLinkDir( "/opt", url );
processLinkDir( "/usr", url );
}
void PmIpkg::update()
{
show();
runIpkg( "update" );
}
void PmIpkg::out( QString o )
{
- runwindow->outPut->append(o);
+// runwindow->outPut->append(o);
+ runwindow->outPut->setText(runwindow->outPut->text()+o);
runwindow->outPut->setCursorPosition(runwindow->outPut->numLines() + 1,0,FALSE);
}
void PmIpkg::show()
{
if (!runwindow->isVisible())
{
runwindow->showMaximized();
runwindow->show();
}
runwindow->outPut->setText("");
}
void PmIpkg::installFile(const QString &fileName, const QString &dest)
{
to_install.clear();
to_remove.clear();
pvDebug( 2,"PmIpkg::installFile "+ fileName);
Package *p = new Package(fileName,settings);
if ( dest!="") p->setDest( dest );
to_install.append( p );
commit();
delete p;
}
void PmIpkg::removeFile(const QString &fileName, const QString &dest)
{
to_install.clear();
to_remove.clear();
pvDebug( 2,"PmIpkg::removeFile "+ fileName);
Package *p = new Package(fileName,settings);
if ( dest!="") p->setDest( dest );
to_remove.append( p );
commit();
delete p;
}
void PmIpkg::clearLists()
{
to_remove.clear();
to_install.clear();
}