summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/TODO13
-rw-r--r--noncore/unsupported/oipkg/installdialog.cpp4
-rw-r--r--noncore/unsupported/oipkg/main.cpp2
-rw-r--r--noncore/unsupported/oipkg/mainwindow.cpp3
-rw-r--r--noncore/unsupported/oipkg/oipkg.pro3
-rw-r--r--noncore/unsupported/oipkg/package.cpp23
-rw-r--r--noncore/unsupported/oipkg/package.h15
-rw-r--r--noncore/unsupported/oipkg/packagelist.cpp10
-rw-r--r--noncore/unsupported/oipkg/packagelist.h8
-rw-r--r--noncore/unsupported/oipkg/packagelistdoclnk.cpp8
-rw-r--r--noncore/unsupported/oipkg/packagelistdoclnk.h4
-rw-r--r--noncore/unsupported/oipkg/packagelistitem.cpp2
-rw-r--r--noncore/unsupported/oipkg/packagelistview.cpp6
-rw-r--r--noncore/unsupported/oipkg/pksettings.cpp1
-rw-r--r--noncore/unsupported/oipkg/pksettings.h2
-rw-r--r--noncore/unsupported/oipkg/pmipkg.cpp72
-rw-r--r--noncore/unsupported/oipkg/pmipkg.h10
-rw-r--r--noncore/unsupported/oipkg/settings.h2
18 files changed, 139 insertions, 49 deletions
diff --git a/noncore/unsupported/oipkg/TODO b/noncore/unsupported/oipkg/TODO
index e7b017c..6e0e6ca 100644
--- a/noncore/unsupported/oipkg/TODO
+++ b/noncore/unsupported/oipkg/TODO
@@ -1,5 +1,8 @@
1* check for networt before installing from network 1* check for network before installing from network
2* Settings Class 2* Settings Class / new setting dialog
3* parse "to install" and "to remove" from status 3* parse "to install" and "to remove" from status, and change status
4 i.e. improve status handling / modify status file
5 dest keyword in status? -> cworth
4* install local file dialog 6* install local file dialog
7* parse lists files after opening feed / doclnk
5* qcop 8* qcop
@@ -13 +16,5 @@
13* display new list after update 16* display new list after update
17* make sure oipkg installs to the correct dest when getting packet to install from list
18 dest keyword?
19* cancel button while installing
20* duplicate button for settings-servers
diff --git a/noncore/unsupported/oipkg/installdialog.cpp b/noncore/unsupported/oipkg/installdialog.cpp
index a2c9702..bb50103 100644
--- a/noncore/unsupported/oipkg/installdialog.cpp
+++ b/noncore/unsupported/oipkg/installdialog.cpp
@@ -73,4 +73,4 @@ InstallDialog::InstallDialog( PackageManagerSettings* s, QWidget* parent, const
73 InstallDialogLayout->addWidget( GroupBoxOptions, 1, 0 ); 73 InstallDialogLayout->addWidget( GroupBoxOptions, 1, 0 );
74 toRemoveItem = new QCheckListItem( ListViewPackages, QObject::tr("To remove") ); 74 toRemoveItem = new QCheckListItem( ListViewPackages, tr("To remove") );
75 toInstallItem = new QCheckListItem( ListViewPackages, QObject::tr("To install") ); 75 toInstallItem = new QCheckListItem( ListViewPackages, tr("To install") );
76 76
diff --git a/noncore/unsupported/oipkg/main.cpp b/noncore/unsupported/oipkg/main.cpp
index de25e27..f72540c 100644
--- a/noncore/unsupported/oipkg/main.cpp
+++ b/noncore/unsupported/oipkg/main.cpp
@@ -11,3 +11,3 @@ int main( int argc, char ** argv )
11 printf("This is oipkg\n"); 11 printf("This is oipkg\n");
12 printf("$ID$\n"); 12 printf("$Id$\n");
13 debugLevel = 2; 13 debugLevel = 2;
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp
index 27c9f4c..11ab406 100644
--- a/noncore/unsupported/oipkg/mainwindow.cpp
+++ b/noncore/unsupported/oipkg/mainwindow.cpp
@@ -35,2 +35,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) :
35 QMainWindow( parent, name, f ) 35 QMainWindow( parent, name, f )
36// packageListServers( QObject(parent), name ),
37// packageListSearch( parent, name ),
38// packageListDocLnk( parent, name )
36 { 39 {
diff --git a/noncore/unsupported/oipkg/oipkg.pro b/noncore/unsupported/oipkg/oipkg.pro
index 9e2f5f8..7f60ed8 100644
--- a/noncore/unsupported/oipkg/oipkg.pro
+++ b/noncore/unsupported/oipkg/oipkg.pro
@@ -31,3 +31,4 @@ INCLUDEPATH += $(OPIEDIR)/include
31 DEPENDPATH+= $(OPIEDIR)/ioclude 31 DEPENDPATH+= $(OPIEDIR)/ioclude
32LIBS += -lqpe 32LIBS += -lqpe
33LIBS += -lopie
33 INTERFACES= runwindow.ui \ 34 INTERFACES= runwindow.ui \
diff --git a/noncore/unsupported/oipkg/package.cpp b/noncore/unsupported/oipkg/package.cpp
index 4a09b40..97f7813 100644
--- a/noncore/unsupported/oipkg/package.cpp
+++ b/noncore/unsupported/oipkg/package.cpp
@@ -11,8 +11,16 @@
11 11
12//Package::~Package() 12Package::Package( QObject *parent=0, const char *name=0 )
13//{ 13 : QObject(parent,name)
14//} 14{
15
16}
17
18Package::~Package()
19{
20}
15 21
16Package::Package( PackageManagerSettings *s ) 22Package::Package( PackageManagerSettings *s, QObject *parent=0, const char *name=0 )
23 : QObject(parent,name)
17{ 24{
25 Package(parent,name);
18 init(s); 26 init(s);
@@ -39,3 +47,4 @@ void Package::init( PackageManagerSettings *s )
39 47
40Package::Package( QStringList pack, PackageManagerSettings *s ) 48Package::Package( QStringList pack, PackageManagerSettings *s , QObject *parent=0, const char *name=0 )
49 : QObject(parent,name)
41 { 50 {
@@ -45,3 +54,3 @@ Package::Package( QStringList pack, PackageManagerSettings *s )
45 54
46Package::Package( QString n, PackageManagerSettings *s ) 55Package::Package( QString n, PackageManagerSettings *s, QObject *parent=0, const char *name=0 )
47 { 56 {
@@ -59,3 +68,3 @@ Package::Package( QString n, PackageManagerSettings *s )
59 68
60Package::Package( Package *pi ) 69Package::Package( Package *pi, QObject *parent=0, const char *name=0 )
61{ 70{
diff --git a/noncore/unsupported/oipkg/package.h b/noncore/unsupported/oipkg/package.h
index 68090dc..f50b9b5 100644
--- a/noncore/unsupported/oipkg/package.h
+++ b/noncore/unsupported/oipkg/package.h
@@ -12,11 +12,12 @@
12 12
13class Package //: public QObject 13class Package : public QObject
14{ 14{
15 // Q_OBJECT 15 Q_OBJECT
16 public: 16 public:
17 Package(PackageManagerSettings *); 17 Package(QObject *parent=0, const char *name=0);
18 // ~Package(); 18 Package(PackageManagerSettings *s, QObject *parent=0, const char *name=0);
19 Package( QStringList, PackageManagerSettings * ); 19 ~Package();
20 Package( QString, PackageManagerSettings * ); 20 Package( QStringList, PackageManagerSettings *s, QObject *parent=0, const char *name=0 );
21 Package( Package* ); 21 Package( QString, PackageManagerSettings *s, QObject *parent=0, const char *name=0 );
22 Package( Package*s, QObject *parent=0, const char *name=0 );
22 23
diff --git a/noncore/unsupported/oipkg/packagelist.cpp b/noncore/unsupported/oipkg/packagelist.cpp
index 1b572e0..3cc0443 100644
--- a/noncore/unsupported/oipkg/packagelist.cpp
+++ b/noncore/unsupported/oipkg/packagelist.cpp
@@ -12,4 +12,4 @@ static int packageListAllRefCount = 0;
12 12
13PackageList::PackageList() 13PackageList::PackageList(QObject *parent=0, const char *name=0)
14 : packageIter( packageList ) 14 : QObject(parent,name), packageIter( packageList )
15{ 15{
@@ -26,7 +26,7 @@ PackageList::PackageList()
26 26
27PackageList::PackageList( PackageManagerSettings* s) 27PackageList::PackageList( PackageManagerSettings* s, QObject *parent, const char *name)
28 : packageIter( packageList ) 28 : QObject(parent,name), packageIter( packageList )
29{ 29{
30 settings = s; 30 settings = s;
31 PackageList(); 31 PackageList(parent, name);
32} 32}
diff --git a/noncore/unsupported/oipkg/packagelist.h b/noncore/unsupported/oipkg/packagelist.h
index d0f8897..78dcd92 100644
--- a/noncore/unsupported/oipkg/packagelist.h
+++ b/noncore/unsupported/oipkg/packagelist.h
@@ -8,5 +8,5 @@
8 8
9class PackageList //:QObject 9class PackageList :QObject
10{ 10{
11 // Q_OBJECT 11 Q_OBJECT
12public: 12public:
@@ -14,4 +14,4 @@ public:
14 14
15 PackageList(); 15 PackageList (QObject *parent=0, const char *name=0);
16 PackageList( PackageManagerSettings* ); 16 PackageList( PackageManagerSettings *s, QObject *parent=0, const char *name=0);
17 virtual ~PackageList(); 17 virtual ~PackageList();
diff --git a/noncore/unsupported/oipkg/packagelistdoclnk.cpp b/noncore/unsupported/oipkg/packagelistdoclnk.cpp
index f31f742..b42cfdd 100644
--- a/noncore/unsupported/oipkg/packagelistdoclnk.cpp
+++ b/noncore/unsupported/oipkg/packagelistdoclnk.cpp
@@ -10,10 +10,10 @@
10 10
11PackageListDocLnk::PackageListDocLnk(PackageManagerSettings* s) 11PackageListDocLnk::PackageListDocLnk(PackageManagerSettings* s, QObject *parent=0, const char *name=0)
12 : PackageList(s) 12 : PackageList(s)
13{ 13{
14 PackageListDocLnk(); 14 PackageListDocLnk(parent, name);
15} 15}
16 16
17PackageListDocLnk::PackageListDocLnk() 17PackageListDocLnk::PackageListDocLnk(QObject *parent=0, const char *name=0)
18 : PackageList() 18 : PackageList(parent, name)
19{ 19{
diff --git a/noncore/unsupported/oipkg/packagelistdoclnk.h b/noncore/unsupported/oipkg/packagelistdoclnk.h
index fe73658..a63fb59 100644
--- a/noncore/unsupported/oipkg/packagelistdoclnk.h
+++ b/noncore/unsupported/oipkg/packagelistdoclnk.h
@@ -11,4 +11,4 @@ class PackageListDocLnk : public PackageList
11public: 11public:
12 PackageListDocLnk(); 12 PackageListDocLnk(QObject *parent=0, const char *name=0);
13 PackageListDocLnk( PackageManagerSettings* s); 13 PackageListDocLnk( PackageManagerSettings *s, QObject *parent=0, const char *name=0);
14 virtual ~PackageListDocLnk(); 14 virtual ~PackageListDocLnk();
diff --git a/noncore/unsupported/oipkg/packagelistitem.cpp b/noncore/unsupported/oipkg/packagelistitem.cpp
index 55047d5..0c9c676 100644
--- a/noncore/unsupported/oipkg/packagelistitem.cpp
+++ b/noncore/unsupported/oipkg/packagelistitem.cpp
@@ -161,3 +161,3 @@ void PackageListItem::displayDetails()
161 nameItem->setText( 0, QObject::tr("Name: ")+package->name()); 161 nameItem->setText( 0, QObject::tr("Name: ")+package->name());
162 linkItem->setText( 0, QObject::tr("Link: ")+QString(package->link()?QObject::tr("Yes"):QObject::tr("No")) ); 162 linkItem->setText( 0, QObject::tr("Link: ")+package->link()?QObject::tr("Yes"):QObject::tr("No"));
163 destItem->setText( 0, QObject::tr("Destination: ")+package->dest() ); 163 destItem->setText( 0, QObject::tr("Destination: ")+package->dest() );
diff --git a/noncore/unsupported/oipkg/packagelistview.cpp b/noncore/unsupported/oipkg/packagelistview.cpp
index 70aa48a..2bb74e9 100644
--- a/noncore/unsupported/oipkg/packagelistview.cpp
+++ b/noncore/unsupported/oipkg/packagelistview.cpp
@@ -61,3 +61,3 @@ void PackageListView::showPopup()
61 { 61 {
62 popupMenu->insertItem( QObject::tr("Install to"), destsMenu ); 62 popupMenu->insertItem( tr("Install to"), destsMenu );
63 QStringList dests = settings->getDestinationNames(); 63 QStringList dests = settings->getDestinationNames();
@@ -77,3 +77,3 @@ void PackageListView::showPopup()
77 }else{ 77 }else{
78 popupAction = new QAction( QObject::tr("Remove"),QString::null, 0, this, 0 ); 78 popupAction = new QAction( tr("Remove"),QString::null, 0, this, 0 );
79 popupAction->addTo( popupMenu ); 79 popupAction->addTo( popupMenu );
@@ -81,3 +81,3 @@ void PackageListView::showPopup()
81 this , SLOT( toggleProcess() ) ); 81 this , SLOT( toggleProcess() ) );
82 popupAction = new QAction( QObject::tr("Reinstall"),QString::null, 0, this, 0 ); 82 popupAction = new QAction( tr("Reinstall"),QString::null, 0, this, 0 );
83 popupAction->addTo( popupMenu ); 83 popupAction->addTo( popupMenu );
diff --git a/noncore/unsupported/oipkg/pksettings.cpp b/noncore/unsupported/oipkg/pksettings.cpp
index 09975b0..59d5a3e 100644
--- a/noncore/unsupported/oipkg/pksettings.cpp
+++ b/noncore/unsupported/oipkg/pksettings.cpp
@@ -243,2 +243,3 @@ void PackageManagerSettings::readInstallationSettings()
243 cfg.setGroup( "Settings" ); 243 cfg.setGroup( "Settings" );
244
244 installationSettingsCount = cfg.readNumEntry( "count", -1 ); 245 installationSettingsCount = cfg.readNumEntry( "count", -1 );
diff --git a/noncore/unsupported/oipkg/pksettings.h b/noncore/unsupported/oipkg/pksettings.h
index dcc1e3a..8f9fe62 100644
--- a/noncore/unsupported/oipkg/pksettings.h
+++ b/noncore/unsupported/oipkg/pksettings.h
@@ -11,3 +11,3 @@ class PackageManagerSettings : public PackageManagerSettingsBase
11{ 11{
12 // Q_OBJECT 12 Q_OBJECT
13public: 13public:
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp
index 7b3fa1e..2a534d2 100644
--- a/noncore/unsupported/oipkg/pmipkg.cpp
+++ b/noncore/unsupported/oipkg/pmipkg.cpp
@@ -5,3 +5,5 @@
5 5
6#include <qpe/process.h> 6//#infdef OPROCESS
7#include <opie/oprocess.h>
8//#endif
7#include <qpe/resource.h> 9#include <qpe/resource.h>
@@ -34,2 +36,11 @@ PmIpkg::PmIpkg( PackageManagerSettings* s, QWidget* p, const char * name, WFlag
34 runwindow = new RunWindow( p, name, true, f ); 36 runwindow = new RunWindow( p, name, true, f );
37#ifdef OPROCESS
38 ipkgProcess = new OProcess();
39 connect ( ipkgProcess, SIGNAL(receivedStdout(OProcess*,char*,int)),
40 this, SLOT(getIpkgOutput(OProcess*,char*,int)));
41
42 connect ( ipkgProcess, SIGNAL(receivedStderr(OProcess*,char*,int)),
43 this, SLOT(getIpkgOutput(OProcess*,char*,int)));
44 installDialog = 0;
45#endif
35} 46}
@@ -38,2 +49,5 @@ PmIpkg::~PmIpkg()
38{ 49{
50#ifdef OPROCESS
51 delete ipkgProcess;
52#endif
39} 53}
@@ -45,2 +59,7 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
45 QString cmd = "/usr/bin/ipkg "; 59 QString cmd = "/usr/bin/ipkg ";
60#ifdef OPROCESS
61 ipkgProcess->clearArguments();
62 *ipkgProcess << "/usr/bin/ipkg ";
63 QString cmd = "";
64#endif
46 pvDebug( 3,"PmIpkg::runIpkg got dest="+dest); 65 pvDebug( 3,"PmIpkg::runIpkg got dest="+dest);
@@ -67,2 +86,37 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
67 pvDebug(2,"running:"+cmd); 86 pvDebug(2,"running:"+cmd);
87#ifdef OPROCESS
88 *ipkgProcess << args;
89 out( "running:\n" + cmd);
90 *ipkgProcess << cmd;
91
92//debug
93 ipkgProcess->clearArguments();
94 *ipkgProcess << "/bin/ls ";
95//debug
96 QValueList<QCString> a = ipkgProcess->args();
97 QValueList<QCString>::Iterator it;
98 for( it = a.begin(); it != a.end(); ++it )
99 {
100 out( *it );
101 cmd += *it;
102 }
103
104 pvDebug(2,"running:"+cmd);
105 qApp->processEvents();
106// sleep(1);
107 ret = ipkgProcess->start(OProcess::NotifyOnExit,OProcess::AllOutput);
108 if ( !ret ) {
109 pvDebug(2,"Could not execute '" + cmd);
110 out("\nError while executing "+ cmd+"\n\n");
111 out("\nError while executing\n\n");
112 // return false;
113 }
114
115 while ( ipkgProcess->isRunning() )
116 {
117 out(".");
118 pvDebug(7,"wait for oprocess to terminate");
119 qApp->processEvents();
120 };
121#else
68 qApp->processEvents(); 122 qApp->processEvents();
@@ -93,2 +147,3 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
93 } 147 }
148#endif
94 //out( "Finished!"); 149 //out( "Finished!");
@@ -101,3 +156,3 @@ void PmIpkg::makeLinks(Package *pack)
101 pvDebug( 2, "PmIpkg::makeLinks "+ pack->name()); 156 pvDebug( 2, "PmIpkg::makeLinks "+ pack->name());
102 linkPackage( pack->installName(), pack->dest() ); 157 linkPackage( pack->name(), pack->dest() );
103} 158}
@@ -244,2 +299,3 @@ void PmIpkg::commit()
244 delete installDialog; 299 delete installDialog;
300 installDialog = 0;
245 out(tr("\nAll done.")); 301 out(tr("\nAll done."));
@@ -398 +454,13 @@ void PmIpkg::clearLists()
398} 454}
455
456
457void PmIpkg::getIpkgOutput(OProcess *proc, char *buffer, int buflen)
458{
459 QString lineStr, lineStrOld;
460 lineStr = buffer;
461 lineStr=lineStr.left(buflen);
462 //Configuring opie-oipkg...Done
463 if (lineStr!=lineStrOld)
464 out(lineStr);
465 lineStrOld = lineStr;
466} \ No newline at end of file
diff --git a/noncore/unsupported/oipkg/pmipkg.h b/noncore/unsupported/oipkg/pmipkg.h
index d53a74d..2c92348 100644
--- a/noncore/unsupported/oipkg/pmipkg.h
+++ b/noncore/unsupported/oipkg/pmipkg.h
@@ -4,2 +4,3 @@
4 4
5#include <opie/oprocess.h>
5#include <qobject.h> 6#include <qobject.h>
@@ -42,3 +43,7 @@ public slots:
42 43
44//private slots:
45 void getIpkgOutput(OProcess *proc, char *buffer, int buflen);
46
43private: 47private:
48 OProcess *ipkgProcess;
44 PackageManagerSettings* settings; 49 PackageManagerSettings* settings;
@@ -48,7 +53,2 @@ private:
48 QList<Package> to_install; 53 QList<Package> to_install;
49 QString fileNameToInstall;
50 QCheckBox *_force_reinstall;
51 QCheckBox *_force_remove;
52 QCheckBox *_force_depends;
53// void startDialog();
54 void makeLinks(Package*); 54 void makeLinks(Package*);
diff --git a/noncore/unsupported/oipkg/settings.h b/noncore/unsupported/oipkg/settings.h
index f01cb69..9cb7a9b 100644
--- a/noncore/unsupported/oipkg/settings.h
+++ b/noncore/unsupported/oipkg/settings.h
@@ -10,3 +10,3 @@ class PackageManagerSettings : public PackageManagerSettingsBase
10{ 10{
11 // Q_OBJECT 11 Q_OBJECT
12public: 12public: