summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/pmipkg.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp
index 0fa4c61..7b3fa1e 100644
--- a/noncore/unsupported/oipkg/pmipkg.cpp
+++ b/noncore/unsupported/oipkg/pmipkg.cpp
@@ -54,97 +54,97 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
if (installDialog && installDialog->_force_depends)
{
if (installDialog->_force_depends->isChecked())
cmd += " -force-depends ";
if (installDialog->_force_reinstall->isChecked())
cmd += " -force-reinstall ";
if (installDialog->_force_remove->isChecked())
cmd += " -force-removal-of-essential-packages ";
}
out( "Starting to "+ args+"\n");
cmd += args;
out( "running:\n"+cmd+"\n" );
pvDebug(2,"running:"+cmd);
qApp->processEvents();
FILE *fp;
char line[130];
QString lineStr, lineStrOld;
sleep(1);
cmd +=" 2>&1";
fp = popen( (const char *) cmd, "r");
if ( !fp ) {
qDebug("Could not execute '" + cmd + "'! err=%d", fp);
pclose(fp);
out("\nError while executing "+ cmd+"\n\n");
return false;
} else {
while ( fgets( line, sizeof line, fp)) {
lineStr = line;
lineStr=lineStr.left(lineStr.length()-1);
//Configuring opie-oipkg...Done
if (lineStr.contains("Done"))
ret = true;
if (lineStr!=lineStrOld)
out(lineStr);
lineStrOld = lineStr;
qApp->processEvents();
}
pclose(fp);
}
//out( "Finished!");
pvDebug(2,QString(ret?"success\n":"failure\n"));
return ret;
}
void PmIpkg::makeLinks(Package *pack)
{
pvDebug( 2, "PmIpkg::makeLinks "+ pack->name());
- linkPackage( pack->name(), pack->dest() );
+ linkPackage( pack->installName(), pack->dest() );
}
QStringList* PmIpkg::getList( QString packFileName, QString d )
{
QString dest = settings->getDestinationUrlByName( d );
dest = dest==""?d:dest;
if (dest == "/" ) return 0;
{
Config cfg( "oipkg", Config::User );
cfg.setGroup( "Common" );
QString statusDir = cfg.readEntry( "statusDir", "" );
}
packFileName = dest+"/"+statusDir+"/info/"+packFileName+".list";
QFile f( packFileName );
if ( ! f.open(IO_ReadOnly) )
{
pvDebug(1," Panik! Could not open");
out( "Panik!\n Could not open:\n"+packFileName );
return (QStringList*)0;
}
QStringList *fileList = new QStringList();
QTextStream t( &f );
while ( !t.eof() )
{
*fileList += t.readLine();
}
return fileList;
}
void PmIpkg::linkPackage( QString packFileName, QString dest )
{
QStringList *fileList = getList( packFileName, dest );
processFileList( fileList, dest );
delete fileList;
}
void PmIpkg::processFileList( QStringList *fileList, QString d )
{
if (!fileList) return;
for (uint i=0; i < fileList->count(); i++)
{
QString dest = settings->getDestinationUrlByName( d );
dest = dest==""?d:dest;
processLinkDir( (*fileList)[i], dest );
}
}