summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/TODO5
-rw-r--r--noncore/unsupported/oipkg/mainwindow.cpp3
-rw-r--r--noncore/unsupported/oipkg/packagelist.cpp6
-rw-r--r--noncore/unsupported/oipkg/packagelistdoclnk.cpp3
-rw-r--r--noncore/unsupported/oipkg/packagelistremote.cpp1
-rw-r--r--noncore/unsupported/oipkg/pmipkg.cpp31
6 files changed, 28 insertions, 21 deletions
diff --git a/noncore/unsupported/oipkg/TODO b/noncore/unsupported/oipkg/TODO
index 6de54ec..b92cbb0 100644
--- a/noncore/unsupported/oipkg/TODO
+++ b/noncore/unsupported/oipkg/TODO
@@ -1,5 +1,3 @@
* Settings Class
-* tr() ;)
-* Dialog to display ipkg output live
* parse "to install" and "to remove" from status
* install local file dialog
@@ -12,4 +10,3 @@
* different types of filters and searches
i.e. name, desc, files etc
-* mark packages from doclnk and ipkgfind installed if installed
-* show if different version is installed \ No newline at end of file
+* display new list after update \ No newline at end of file
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp
index 2fa91e3..19a1420 100644
--- a/noncore/unsupported/oipkg/mainwindow.cpp
+++ b/noncore/unsupported/oipkg/mainwindow.cpp
@@ -93,5 +93,6 @@ void MainWindow::makeMenu()
// menuBar->insertItem( tr( "Sections" ), sectMenu );
- QLabel *spacer = new QLabel( "", toolBar );
+ QLabel *spacer;
+// spacer = new QLabel( "", toolBar );
// spacer->setBackgroundColor( toolBar->backgroundColor() );
// toolBar->setStretchableWidget( spacer );
diff --git a/noncore/unsupported/oipkg/packagelist.cpp b/noncore/unsupported/oipkg/packagelist.cpp
index 2fc4c41..fdd1163 100644
--- a/noncore/unsupported/oipkg/packagelist.cpp
+++ b/noncore/unsupported/oipkg/packagelist.cpp
@@ -9,4 +9,5 @@
static QDict<Package> *packageListAll;
+static int packageListAllRefCount = 0;
PackageList::PackageList()
@@ -15,4 +16,5 @@ PackageList::PackageList()
empty=true;
if (!packageListAll) packageListAll = new QDict<Package>();
+ packageListAllRefCount++;
sections << "All";
subSections.insert("All", new QStringList() );
@@ -32,4 +34,5 @@ PackageList::PackageList( PackageManagerSettings* s)
PackageList::~PackageList()
{
+ if (--packageListAllRefCount < 1 ) delete packageListAll;
}
@@ -52,5 +55,5 @@ void PackageList::insertPackage( Package* pack )
if (!packver)
{
- packver = new QDict<Package>;
+ packver = new QDict<Package>();
packver->insert( pack->name(), p );
p->setOtherVersions( packver );
@@ -183,4 +186,5 @@ void PackageList::readFileEntries( QString filename, QString dest )
};
}
+ delete statusStream;
return;
}
diff --git a/noncore/unsupported/oipkg/packagelistdoclnk.cpp b/noncore/unsupported/oipkg/packagelistdoclnk.cpp
index 1d10adf..f31f742 100644
--- a/noncore/unsupported/oipkg/packagelistdoclnk.cpp
+++ b/noncore/unsupported/oipkg/packagelistdoclnk.cpp
@@ -30,4 +30,5 @@ PackageListDocLnk::~PackageListDocLnk()
cfg.setGroup( "Common" );
cfg.writeEntry( "docLnkDir", docLnkDir );
+ delete doclnkset;
}
@@ -40,5 +41,5 @@ void PackageListDocLnk::update()
for (DocLnk *pack =packlist.first(); pack != 0; pack=packlist.next() )
{
- insertPackage( new Package(pack->file(), settings) );
+ insertPackage( new Package(pack->file(), settings ) );
}
}
diff --git a/noncore/unsupported/oipkg/packagelistremote.cpp b/noncore/unsupported/oipkg/packagelistremote.cpp
index ee54fca..e37f256 100644
--- a/noncore/unsupported/oipkg/packagelistremote.cpp
+++ b/noncore/unsupported/oipkg/packagelistremote.cpp
@@ -30,4 +30,5 @@ void PackageListRemote::update()
{
pvDebug(2,"PackageListRemote::update");
+ if (searchString.isEmpty()) return;
int r=0;
QString cmd = "wget";
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
@@ -52,5 +52,5 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
cmd += " -force-defaults ";
- if (installDialog->_force_depends)
+ if (installDialog && installDialog->_force_depends)
{
if (installDialog->_force_depends->isChecked())
@@ -88,4 +88,5 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
out(lineStr);
lineStrOld = lineStr;
+ qApp->processEvents();
}
pclose(fp);
@@ -157,4 +158,6 @@ void PmIpkg::processLinkDir( QString file, QString dest )
file = dest+"/"+file;
if (file == dest) return;
+// if (linkOpp==createLink) out( "\ncreating links\n" );
+// if (linkOpp==removeLink) out( "\nremoving links\n" );
QFileInfo fileInfo( file );
if ( fileInfo.isDir() )
@@ -266,16 +269,16 @@ void PmIpkg::remove()
linkOpp = removeLink;
to_remove.at(i)->processed();
+ if ( to_remove.at(i)->link() )
+ processFileList( fileList, to_remove.at(i)->dest() );
to_remove.take( i );
- out("\n\n");
+ 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() )
- {
- out( "\nremoving links\n" );
- out( "for package "+to_remove.at(i)->name()+" in "+to_remove.at(i)->dest()+"\n" );
processFileList( fileList, to_remove.at(i)->dest() );
- }
if ( to_remove.at(i)->link() )delete fileList;
}
@@ -291,19 +294,19 @@ void PmIpkg::install()
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 ( 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\n");
+ out("\n");
}else{
out(tr("Error while installing")+to_install.at(i)->name()+"\n");
- }
- linkOpp = createLink;
- if ( to_install.at(i)->link() )
- {
- out( "\ncreating links\n" );
- out( "for package "+to_install.at(i)->name()+" in "+to_install.at(i)->dest()+"\n" );
- makeLinks( to_install.at(i) );
+ linkOpp = createLink;
+ if ( to_install.at(i)->link() )
+ makeLinks( to_install.at(i) );
}
}