summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg
authortille <tille>2002-06-21 12:44:34 (UTC)
committer tille <tille>2002-06-21 12:44:34 (UTC)
commite6834009bf23492e009258e3881ce183cf9e27a0 (patch) (unidiff)
treeba5fb74b2ee5e70b5157cd5eb935f8760c5b208d /noncore/unsupported/oipkg
parent3be39e6c8af27a43d4b09bf08b4c739c342b5de3 (diff)
downloadopie-e6834009bf23492e009258e3881ce183cf9e27a0.zip
opie-e6834009bf23492e009258e3881ce183cf9e27a0.tar.gz
opie-e6834009bf23492e009258e3881ce183cf9e27a0.tar.bz2
fixes
Diffstat (limited to 'noncore/unsupported/oipkg') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/mainwindow.cpp55
-rw-r--r--noncore/unsupported/oipkg/pmipkg.cpp37
2 files changed, 72 insertions, 20 deletions
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp
index 233eae6..7df1d6b 100644
--- a/noncore/unsupported/oipkg/mainwindow.cpp
+++ b/noncore/unsupported/oipkg/mainwindow.cpp
@@ -45,3 +45,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) :
45 listViewPackages->addList( tr("ipkgfind"), &packageListSearch ); 45 listViewPackages->addList( tr("ipkgfind"), &packageListSearch );
46 listViewPackages->addList( tr("documents"), &packageListDocLnk ); 46//listViewPackages->addList( tr("documents"), &packageListDocLnk );
47 ipkg = new PmIpkg( settings, this ); 47 ipkg = new PmIpkg( settings, this );
@@ -53,3 +53,4 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) :
53 pvDebug(9,"packageListDocLnk.update"); 53 pvDebug(9,"packageListDocLnk.update");
54 packageListDocLnk.update(); 54 pvDebug(0,"no UPDATE of DocLnk");
55// packageListDocLnk.update();
55 pvDebug(9,"makeMenu"); 56 pvDebug(9,"makeMenu");
@@ -84,3 +85,3 @@ void MainWindow::makeMenu()
84 QPopupMenu *cfgMenu = new QPopupMenu( menuBar ); 85 QPopupMenu *cfgMenu = new QPopupMenu( menuBar );
85 // QPopupMenu *sectMenu = new QPopupMenu( menuBar ); 86 QPopupMenu *helpMenu = new QPopupMenu( menuBar );
86 87
@@ -91,3 +92,3 @@ void MainWindow::makeMenu()
91 menuBar->insertItem( tr( "Settings" ), cfgMenu ); 92 menuBar->insertItem( tr( "Settings" ), cfgMenu );
92 // menuBar->insertItem( tr( "Sections" ), sectMenu ); 93 menuBar->insertItem( tr( "Help" ), helpMenu );
93 94
@@ -107,3 +108,3 @@ void MainWindow::makeMenu()
107 108
108 srvMenu->insertSeparator (); 109 srvMenu->insertSeparator();
109 110
@@ -231,2 +232,39 @@ void MainWindow::makeMenu()
231 232
233// helpMenu
234 helpMenu->insertSeparator();
235 a = new QAction( tr( "Package Actions" ), QString::null, 0, this, 0 );
236 a->addTo( helpMenu );
237 helpMenu->insertSeparator();
238 a = new QAction( tr( "Install" ),
239 Resource::loadPixmap( "oipkg/install" ), QString::null, 0, this, 0 );
240 a->addTo( helpMenu );
241 a = new QAction( tr( "Remove" ),
242 Resource::loadPixmap( "oipkg/uninstall" ), QString::null, 0, this, 0 );
243 a->addTo( helpMenu );
244 helpMenu->insertSeparator();
245 a = new QAction( tr( "Package Status" ), QString::null, 0, this, 0 );
246 a->addTo( helpMenu );
247 helpMenu->insertSeparator();
248 a = new QAction( tr( "New version, installed" ),
249 Resource::loadPixmap( "oipkg/installed" ), QString::null, 0, this, 0 );
250 a->addTo( helpMenu );
251 a = new QAction( tr( "New version, not installed" ),
252 Resource::loadPixmap( "oipkg/uninstalled" ), QString::null, 0, this, 0 );
253 a->addTo( helpMenu );
254 a = new QAction( tr( "Old version, installed" ),
255 Resource::loadPixmap( "oipkg/installedOld" ), QString::null, 0, this, 0 );
256 a->addTo( helpMenu );
257 a = new QAction( tr( "Old version, not installed" ),
258 Resource::loadPixmap( "oipkg/uninstalledOld" ), QString::null, 0, this, 0 );
259 a->addTo( helpMenu );
260 a = new QAction( tr( "Old version, new version installed" ),
261 Resource::loadPixmap( "oipkg/uninstalledOldinstalledNew" ), QString::null, 0, this, 0 );
262 a->addTo( helpMenu );
263 a = new QAction( tr( "New version, old version installed" ),
264 Resource::loadPixmap( "oipkg/uninstalledInstalledOld" ), QString::null, 0, this, 0 );
265 a->addTo( helpMenu );
266 //a = new QAction( tr( "" ),
267 // Resource::loadPixmap( "oipkg/" ), QString::null, 0, this, 0 );
268 // a->addTo( helpMenu );
269
232 // configure the menus 270 // configure the menus
@@ -256,3 +294,3 @@ void MainWindow::runIpkg()
256 ipkg->loadList( &packageListSearch ); 294 ipkg->loadList( &packageListSearch );
257 ipkg->loadList( &packageListDocLnk ); 295//ipkg->loadList( &packageListDocLnk );
258 ipkg->loadList( &packageListServers ); 296 ipkg->loadList( &packageListServers );
@@ -272,3 +310,4 @@ void MainWindow::updateList()
272 packageListSearch.clear(); 310 packageListSearch.clear();
273 packageListDocLnk.clear(); 311
312// packageListDocLnk.clear();
274 ipkg->update(); 313 ipkg->update();
@@ -276,3 +315,3 @@ void MainWindow::updateList()
276 packageListSearch.update(); 315 packageListSearch.update();
277 packageListDocLnk.update(); 316// packageListDocLnk.update();
278} 317}
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp
index 0817247..7d0e246 100644
--- a/noncore/unsupported/oipkg/pmipkg.cpp
+++ b/noncore/unsupported/oipkg/pmipkg.cpp
@@ -5,5 +5,3 @@
5 5
6//#infdef OPROCESS
7#include <opie/oprocess.h> 6#include <opie/oprocess.h>
8//#endif
9#include <qpe/resource.h> 7#include <qpe/resource.h>
@@ -31,2 +29,4 @@
31 29
30//#define OPROCESS
31
32PmIpkg::PmIpkg( PackageManagerSettings* s, QWidget* p, const char * name, WFlags f ) 32PmIpkg::PmIpkg( PackageManagerSettings* s, QWidget* p, const char * name, WFlags f )
@@ -128,9 +128,9 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
128 fp = popen( (const char *) cmd, "r"); 128 fp = popen( (const char *) cmd, "r");
129 if ( !fp ) { 129 if ( fp == NULL ) {
130 qDebug("Could not execute '" + cmd + "'! err=%d", fp); 130 qDebug("Could not execute '" + cmd + "'! err=%d", fp);
131 pclose(fp);
132 out("\nError while executing "+ cmd+"\n\n"); 131 out("\nError while executing "+ cmd+"\n\n");
133 return false; 132 ret = false;
134 } else { 133 } else {
135 while ( fgets( line, sizeof line, fp)) { 134 while ( fgets( line, sizeof line, fp) != NULL)
135 {
136 lineStr = line; 136 lineStr = line;
@@ -138,4 +138,3 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
138 //Configuring opie-oipkg...Done 138 //Configuring opie-oipkg...Done
139 if (lineStr.contains("Done")) 139 if (lineStr.contains("Done")) ret = true;
140 ret = true;
141 if (lineStr!=lineStrOld) 140 if (lineStr!=lineStrOld)
@@ -145,4 +144,4 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
145 } 144 }
146 pclose(fp);
147 } 145 }
146 pclose(fp);
148#endif 147#endif
@@ -236,4 +235,4 @@ void PmIpkg::processLinkDir( QString file, QString dest )
236 { 235 {
237 const char *instFile = strdup( (file).ascii() ); 236 const char *instFile = strdup( (file).latin1() );
238 const char *linkFile = strdup( (destFile).ascii()); 237 const char *linkFile = strdup( (destFile).latin1());
239 if( linkOpp==createLink ) 238 if( linkOpp==createLink )
@@ -244,3 +243,3 @@ void PmIpkg::processLinkDir( QString file, QString dest )
244 } else { 243 } else {
245 const char *linkFile = strdup( (destFile).ascii()); 244 const char *linkFile = strdup( (destFile).latin1());
246 if( linkOpp==removeLink ) 245 if( linkOpp==removeLink )
@@ -355,2 +354,16 @@ void PmIpkg::install()
355 qDebug("install loop %i of %i installing %s",i,to_install.count(),to_install.at(i)->installName().latin1()); //pvDebug 354 qDebug("install loop %i of %i installing %s",i,to_install.count(),to_install.at(i)->installName().latin1()); //pvDebug
355 if (to_install.at(i)->link())
356 {
357 // hack to have package.list
358 // in "dest"/usr/lib/ipkg/info/
359 QString rds = settings->getDestinationUrlByName("root");
360 QString lds = settings->getDestinationUrlByName(to_install.at(i)->dest());
361 QString listFile = "usr/lib/ipkg/lists/"+to_install.at(i)->name()+".list";
362 rds += listFile;
363 lds += listFile;
364 const char *rd = rds.latin1();
365 const char *ld = lds.latin1();
366 pvDebug(4, "linking: "+rds+" -> "+lds );
367 symlink( rd, ld );
368 }
356 if ( runIpkg("install " + to_install.at(i)->installName(), to_install.at(i)->dest() )) 369 if ( runIpkg("install " + to_install.at(i)->installName(), to_install.at(i)->dest() ))