-rw-r--r-- | noncore/unsupported/oipkg/main.cpp | 2 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.cpp | 74 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.h | 6 |
3 files changed, 7 insertions, 75 deletions
diff --git a/noncore/unsupported/oipkg/main.cpp b/noncore/unsupported/oipkg/main.cpp index c579df8..f989f30 100644 --- a/noncore/unsupported/oipkg/main.cpp +++ b/noncore/unsupported/oipkg/main.cpp | |||
@@ -1,26 +1,26 @@ | |||
1 | 1 | ||
2 | #include "mainwindow.h" | 2 | #include "mainwindow.h" |
3 | 3 | ||
4 | #include <qpe/qpeapplication.h> | 4 | #include <qpe/qpeapplication.h> |
5 | #include <qstring.h> | 5 | #include <qstring.h> |
6 | //#include <qmessagebox.h> | 6 | #include <unistd.h> |
7 | int debugLevel; | 7 | int debugLevel; |
8 | 8 | ||
9 | int main( int argc, char ** argv ) | 9 | int main( int argc, char ** argv ) |
10 | { | 10 | { |
11 | setpgid(0,0); | 11 | setpgid(0,0); |
12 | printf("This is oipkg\n"); | 12 | printf("This is oipkg\n"); |
13 | printf("$Id$\n"); | 13 | printf("$Id$\n"); |
14 | debugLevel = 2; | 14 | debugLevel = 2; |
15 | if (argc > 1) | 15 | if (argc > 1) |
16 | { | 16 | { |
17 | debugLevel = QString ( argv[1] ).toInt(); | 17 | debugLevel = QString ( argv[1] ).toInt(); |
18 | qDebug("setting debug level to %i",debugLevel); | 18 | qDebug("setting debug level to %i",debugLevel); |
19 | } | 19 | } |
20 | QPEApplication a( argc, argv ); | 20 | QPEApplication a( argc, argv ); |
21 | MainWindow mw; | 21 | MainWindow mw; |
22 | // if (argc > 2) | 22 | // if (argc > 2) |
23 | // QMessageBox::information( &mw, "oipkg","While ipkg is working\noipkg is hanging.\nPlease be patient!"); | 23 | // QMessageBox::information( &mw, "oipkg","While ipkg is working\noipkg is hanging.\nPlease be patient!"); |
24 | a.showMainDocumentWidget( &mw ); | 24 | a.showMainDocumentWidget( &mw ); |
25 | return a.exec(); | 25 | return a.exec(); |
26 | } | 26 | } |
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp index bffad15..a7deb8f 100644 --- a/noncore/unsupported/oipkg/pmipkg.cpp +++ b/noncore/unsupported/oipkg/pmipkg.cpp | |||
@@ -1,212 +1,158 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | * * | 2 | * * |
3 | * This program is free software; you can redistribute it and/or modify * | 3 | * This program is free software; you can redistribute it and/or modify * |
4 | * it under the terms of the GNU General Public License as published by * | 4 | * it under the terms of the GNU General Public License as published by * |
5 | * the Free Software Foundation; either version 2 of the License, or * | 5 | * the Free Software Foundation; either version 2 of the License, or * |
6 | * (at your option) any later version. * | 6 | * (at your option) any later version. * |
7 | * * | 7 | * * |
8 | ***************************************************************************/ | 8 | ***************************************************************************/ |
9 | // (c) 2002 Patrick S. Vogt <tille@handhelds.org> | 9 | // (c) 2002 Patrick S. Vogt <tille@handhelds.org> |
10 | #include "pmipkg.h" | 10 | #include "pmipkg.h" |
11 | #include "pksettings.h" | 11 | #include "pksettings.h" |
12 | #include "package.h" | 12 | #include "package.h" |
13 | #include "packagelistitem.h" | 13 | #include "packagelistitem.h" |
14 | 14 | ||
15 | #include <opie/oprocess.h> | 15 | //#include <opie/oprocess.h> |
16 | #include <qpe/resource.h> | 16 | #include <qpe/resource.h> |
17 | #include <qpe/config.h> | 17 | #include <qpe/config.h> |
18 | #include <qpe/stringutil.h> | 18 | #include <qpe/stringutil.h> |
19 | #include <qpe/qpeapplication.h> | 19 | #include <qpe/qpeapplication.h> |
20 | #include <qdir.h> | 20 | #include <qdir.h> |
21 | #include <qfile.h> | 21 | #include <qfile.h> |
22 | #include <qgroupbox.h> | 22 | #include <qgroupbox.h> |
23 | #include <qmultilineedit.h> | 23 | #include <qmultilineedit.h> |
24 | #include <qstring.h> | 24 | #include <qstring.h> |
25 | #include <qcheckbox.h> | 25 | #include <qcheckbox.h> |
26 | #include <qtextstream.h> | 26 | #include <qtextstream.h> |
27 | #include <qtextview.h> | 27 | #include <qtextview.h> |
28 | #include <qmessagebox.h> | 28 | #include <qmessagebox.h> |
29 | #include <qprogressbar.h> | 29 | #include <qprogressbar.h> |
30 | #include <qpushbutton.h> | 30 | #include <qpushbutton.h> |
31 | #include <qlayout.h> | 31 | #include <qlayout.h> |
32 | 32 | ||
33 | #include <stdlib.h> | 33 | #include <stdlib.h> |
34 | #include <unistd.h> | 34 | #include <unistd.h> |
35 | 35 | ||
36 | #include "mainwindow.h" | 36 | #include "mainwindow.h" |
37 | 37 | ||
38 | 38 | ||
39 | //#define OPROCESS | ||
40 | 39 | ||
41 | PmIpkg::PmIpkg( PackageManagerSettings* s, QWidget* p, const char * name, WFlags f ) | 40 | PmIpkg::PmIpkg( PackageManagerSettings* s, QWidget* p, const char * name, WFlags f ) |
42 | : QObject ( p ) | 41 | : QObject ( p ) |
43 | { | 42 | { |
44 | settings = s; | 43 | settings = s; |
45 | runwindow = new RunWindow( p, name, true, f ); | 44 | runwindow = new RunWindow( p, name, true, f ); |
46 | #ifdef OPROCESS | ||
47 | ipkgProcess = new OProcess(); | ||
48 | connect ( ipkgProcess, SIGNAL(receivedStdout(OProcess*,char*,int)), | ||
49 | this, SLOT(getIpkgOutput(OProcess*,char*,int))); | ||
50 | 45 | ||
51 | connect ( ipkgProcess, SIGNAL(receivedStderr(OProcess*,char*,int)), | 46 | Config cfg( "oipkg", Config::User ); |
52 | this, SLOT(getIpkgOutput(OProcess*,char*,int))); | 47 | cfg.setGroup( "ipkg" ); |
53 | installDialog = 0; | 48 | ipkg_cmd = cfg.readEntry( "cmd", "ipkg" ); |
54 | #endif | ||
55 | } | 49 | } |
56 | 50 | ||
57 | PmIpkg::~PmIpkg() | 51 | PmIpkg::~PmIpkg() |
58 | { | 52 | { |
59 | #ifdef OPROCESS | ||
60 | delete ipkgProcess; | ||
61 | #endif | ||
62 | } | 53 | } |
63 | 54 | ||
64 | bool PmIpkg::runIpkg(const QString& args, const QString& dest ) | 55 | bool PmIpkg::runIpkg(const QString& args, const QString& dest ) |
65 | { | 56 | { |
66 | bool ret=false; | 57 | bool ret=false; |
67 | QDir::setCurrent("/tmp"); | 58 | QDir::setCurrent("/tmp"); |
68 | QString cmd = "/usr/bin/ipkg "; | 59 | QString cmd = ipkg_cmd; |
69 | #ifdef OPROCESS | ||
70 | ipkgProcess->kill(); | ||
71 | ipkgProcess->clearArguments(); | ||
72 | *ipkgProcess << "/usr/bin/ipkg "; | ||
73 | cmd = ""; | ||
74 | #endif | ||
75 | pvDebug( 3,"PmIpkg::runIpkg got dest="+dest); | 60 | pvDebug( 3,"PmIpkg::runIpkg got dest="+dest); |
76 | if (!args.contains("update")) | 61 | if (!args.contains("update")) |
77 | { | 62 | { |
78 | if ( dest == "" ) | 63 | if ( dest == "" ) |
79 | cmd += " -dest "+settings->getDestinationName(); | 64 | cmd += " -dest "+settings->getDestinationName(); |
80 | else | 65 | else |
81 | cmd += " -dest "+ dest; | 66 | cmd += " -dest "+ dest; |
82 | 67 | ||
83 | cmd += " -force-defaults "; | 68 | cmd += " -force-defaults "; |
84 | 69 | ||
85 | if ( installDialog && installDialog->_force_depends ) | 70 | if ( installDialog && installDialog->_force_depends ) |
86 | { | 71 | { |
87 | if (installDialog->_force_depends->isChecked()) | 72 | if (installDialog->_force_depends->isChecked()) |
88 | cmd += " -force-depends "; | 73 | cmd += " -force-depends "; |
89 | if (installDialog->_force_reinstall->isChecked()) | 74 | if (installDialog->_force_reinstall->isChecked()) |
90 | cmd += " -force-reinstall "; | 75 | cmd += " -force-reinstall "; |
91 | if (installDialog->_force_remove->isChecked()) | 76 | if (installDialog->_force_remove->isChecked()) |
92 | cmd += " -force-removal-of-essential-packages "; | 77 | cmd += " -force-removal-of-essential-packages "; |
93 | } | 78 | } |
94 | } //!args.contains("update") | 79 | } //!args.contains("update") |
95 | 80 | ||
96 | out( "Starting to "+ args+"\n"); | 81 | out( "Starting to "+ args+"\n"); |
97 | qApp->processEvents(); | 82 | qApp->processEvents(); |
98 | cmd += args; | 83 | cmd += args; |
99 | out( "running:\n"+cmd+"\n" ); | 84 | out( "running:\n"+cmd+"\n" ); |
100 | pvDebug(2,"running:"+cmd); | 85 | pvDebug(2,"running:"+cmd); |
101 | #ifdef OPROCESS | ||
102 | *ipkgProcess << args; | ||
103 | out( "running:\n" + cmd); | ||
104 | *ipkgProcess << cmd; | ||
105 | |||
106 | //debug | ||
107 | delete ipkgProcess; | ||
108 | ipkgProcess = new OProcess(); | ||
109 | ipkgProcess->clearArguments(); | ||
110 | *ipkgProcess << "/bin/ls "; | ||
111 | //debug | ||
112 | QValueList<QCString> a = ipkgProcess->args(); | ||
113 | QValueList<QCString>::Iterator it; | ||
114 | for( it = a.begin(); it != a.end(); ++it ) | ||
115 | { | ||
116 | out( *it ); | ||
117 | cmd += *it; | ||
118 | } | ||
119 | |||
120 | pvDebug(2,"running:"+cmd); | ||
121 | qApp->processEvents(); | ||
122 | // sleep(1); | ||
123 | ret = ipkgProcess->start(OProcess::NotifyOnExit,OProcess::AllOutput); | ||
124 | if ( !ret ) { | ||
125 | pvDebug(2,"Could not execute '" + cmd); | ||
126 | out("\nError while executing "+ cmd+"\n\n"); | ||
127 | out("\nError while executing\n\n"); | ||
128 | // return false; | ||
129 | } | ||
130 | |||
131 | while ( ipkgProcess->isRunning() ) | ||
132 | { | ||
133 | out("."); | ||
134 | pvDebug(7,"wait for oprocess to terminate"); | ||
135 | qApp->processEvents(); | ||
136 | }; | ||
137 | #else | ||
138 | qApp->processEvents(); | 86 | qApp->processEvents(); |
139 | FILE *fp; | 87 | FILE *fp; |
140 | char line[130]; | 88 | char line[130]; |
141 | QString lineStr, lineStrOld; | 89 | QString lineStr, lineStrOld; |
142 | sleep(1); | 90 | sleep(1); |
143 | cmd +=" 2>&1"; | 91 | cmd +=" 2>&1"; |
144 | fp = popen( (const char *) cmd, "r"); | 92 | fp = popen( (const char *) cmd, "r"); |
145 | if ( fp == NULL ) { | 93 | if ( fp == NULL ) { |
146 | qDebug("Could not execute '" + cmd + "'! err=%d", fp); | 94 | qDebug("Could not execute '" + cmd + "'! err=%d", fp); |
147 | out("\nError while executing "+ cmd+"\n\n"); | 95 | out("\nError while executing "+ cmd+"\n\n"); |
148 | ret = false; | 96 | ret = false; |
149 | } else { | 97 | } else { |
150 | while ( fgets( line, sizeof line, fp) != NULL) | 98 | while ( fgets( line, sizeof line, fp) != NULL) |
151 | { | 99 | { |
152 | lineStr = line; | 100 | lineStr = line; |
153 | lineStr=lineStr.left(lineStr.length()-1); | 101 | lineStr=lineStr.left(lineStr.length()-1); |
154 | //Configuring opie-oipkg...Done | 102 | //Configuring opie-oipkg...Done |
155 | if (lineStr.contains("Done")) ret = true; | 103 | if (lineStr.contains("Done")) ret = true; |
156 | if (lineStr!=lineStrOld) | 104 | if (lineStr!=lineStrOld) |
157 | out(lineStr); | 105 | out(lineStr); |
158 | lineStrOld = lineStr; | 106 | lineStrOld = lineStr; |
159 | qApp->processEvents(); | 107 | qApp->processEvents(); |
160 | } | 108 | } |
161 | } | 109 | } |
162 | pclose(fp); | 110 | pclose(fp); |
163 | #endif | ||
164 | //out( "Finished!"); | ||
165 | pvDebug(2,QString(ret?"success\n":"failure\n")); | 111 | pvDebug(2,QString(ret?"success\n":"failure\n")); |
166 | return ret; | 112 | return ret; |
167 | } | 113 | } |
168 | 114 | ||
169 | void PmIpkg::makeLinks(Package *pack) | 115 | void PmIpkg::makeLinks(Package *pack) |
170 | { | 116 | { |
171 | pvDebug( 2, "PmIpkg::makeLinks "+ pack->name()); | 117 | pvDebug( 2, "PmIpkg::makeLinks "+ pack->name()); |
172 | QString pn = pack->name(); | 118 | QString pn = pack->name(); |
173 | linkPackage( pack->packageName(), pack->dest() ); | 119 | linkPackage( pack->packageName(), pack->dest() ); |
174 | } | 120 | } |
175 | 121 | ||
176 | QStringList* PmIpkg::getList( QString packFileName, QString d ) | 122 | QStringList* PmIpkg::getList( QString packFileName, QString d ) |
177 | { | 123 | { |
178 | QString dest = settings->getDestinationUrlByName( d ); | 124 | QString dest = settings->getDestinationUrlByName( d ); |
179 | dest = dest==""?d:dest; | 125 | dest = dest==""?d:dest; |
180 | // if (dest == "/" ) return 0; | 126 | // if (dest == "/" ) return 0; |
181 | { | 127 | { |
182 | Config cfg( "oipkg", Config::User ); | 128 | Config cfg( "oipkg", Config::User ); |
183 | cfg.setGroup( "Common" ); | 129 | cfg.setGroup( "Common" ); |
184 | QString statusDir = cfg.readEntry( "statusDir", "" ); | 130 | QString statusDir = cfg.readEntry( "statusDir", "" ); |
185 | } | 131 | } |
186 | QString packFileDir = dest+"/"+statusDir+"/info/"+packFileName+".list"; | 132 | QString packFileDir = dest+"/"+statusDir+"/info/"+packFileName+".list"; |
187 | QFile f( packFileDir ); | 133 | QFile f( packFileDir ); |
188 | qDebug("Try to open %s", packFileDir.latin1()); | 134 | qDebug("Try to open %s", packFileDir.latin1()); |
189 | if ( ! f.open(IO_ReadOnly) ) | 135 | if ( ! f.open(IO_ReadOnly) ) |
190 | { | 136 | { |
191 | out( "Could not open:\n"+packFileDir ); | 137 | out( "Could not open:\n"+packFileDir ); |
192 | f.close(); | 138 | f.close(); |
193 | packFileDir = "/"+statusDir+"/info/"+packFileName+".list"; | 139 | packFileDir = "/"+statusDir+"/info/"+packFileName+".list"; |
194 | f.setName( packFileDir ); | 140 | f.setName( packFileDir ); |
195 | qDebug("Try to open %s", packFileDir.latin1()); | 141 | qDebug("Try to open %s", packFileDir.latin1()); |
196 | if ( ! f.open(IO_ReadOnly) ) | 142 | if ( ! f.open(IO_ReadOnly) ) |
197 | { | 143 | { |
198 | qDebug(" Panik! Could not open"+packFileDir); | 144 | qDebug(" Panik! Could not open"+packFileDir); |
199 | out( "Could not open:\n"+packFileDir+"\n Panik!" ); | 145 | out( "Could not open:\n"+packFileDir+"\n Panik!" ); |
200 | return (QStringList*)0; | 146 | return (QStringList*)0; |
201 | } | 147 | } |
202 | } | 148 | } |
203 | QStringList *fileList = new QStringList(); | 149 | QStringList *fileList = new QStringList(); |
204 | QTextStream t( &f ); | 150 | QTextStream t( &f ); |
205 | while ( !t.eof() ) | 151 | while ( !t.eof() ) |
206 | { | 152 | { |
207 | *fileList += t.readLine(); | 153 | *fileList += t.readLine(); |
208 | } | 154 | } |
209 | f.close(); | 155 | f.close(); |
210 | return fileList; | 156 | return fileList; |
211 | } | 157 | } |
212 | 158 | ||
@@ -448,58 +394,48 @@ void PmIpkg::out( QString o ) | |||
448 | 394 | ||
449 | 395 | ||
450 | 396 | ||
451 | 397 | ||
452 | void PmIpkg::show() | 398 | void PmIpkg::show() |
453 | { | 399 | { |
454 | if (!runwindow->isVisible()) | 400 | if (!runwindow->isVisible()) |
455 | { | 401 | { |
456 | runwindow->showMaximized(); | 402 | runwindow->showMaximized(); |
457 | runwindow->show(); | 403 | runwindow->show(); |
458 | } | 404 | } |
459 | runwindow->outPut->setText(""); | 405 | runwindow->outPut->setText(""); |
460 | } | 406 | } |
461 | 407 | ||
462 | void PmIpkg::installFile(const QString &fileName, const QString &dest) | 408 | void PmIpkg::installFile(const QString &fileName, const QString &dest) |
463 | { | 409 | { |
464 | 410 | ||
465 | to_install.clear(); | 411 | to_install.clear(); |
466 | to_remove.clear(); | 412 | to_remove.clear(); |
467 | pvDebug( 2,"PmIpkg::installFile "+ fileName); | 413 | pvDebug( 2,"PmIpkg::installFile "+ fileName); |
468 | Package *p = new Package(fileName,settings); | 414 | Package *p = new Package(fileName,settings); |
469 | if ( dest!="") p->setDest( dest ); | 415 | if ( dest!="") p->setDest( dest ); |
470 | to_install.append( p ); | 416 | to_install.append( p ); |
471 | commit(); | 417 | commit(); |
472 | delete p; | 418 | delete p; |
473 | } | 419 | } |
474 | 420 | ||
475 | void PmIpkg::removeFile(const QString &fileName, const QString &dest) | 421 | void PmIpkg::removeFile(const QString &fileName, const QString &dest) |
476 | { | 422 | { |
477 | 423 | ||
478 | to_install.clear(); | 424 | to_install.clear(); |
479 | to_remove.clear(); | 425 | to_remove.clear(); |
480 | pvDebug( 2,"PmIpkg::removeFile "+ fileName); | 426 | pvDebug( 2,"PmIpkg::removeFile "+ fileName); |
481 | Package *p = new Package(fileName,settings); | 427 | Package *p = new Package(fileName,settings); |
482 | if ( dest!="") p->setDest( dest ); | 428 | if ( dest!="") p->setDest( dest ); |
483 | to_remove.append( p ); | 429 | to_remove.append( p ); |
484 | commit(); | 430 | commit(); |
485 | delete p; | 431 | delete p; |
486 | } | 432 | } |
487 | 433 | ||
488 | 434 | ||
489 | void PmIpkg::clearLists() | 435 | void PmIpkg::clearLists() |
490 | { | 436 | { |
491 | to_remove.clear(); | 437 | to_remove.clear(); |
492 | to_install.clear(); | 438 | to_install.clear(); |
493 | } | 439 | } |
494 | 440 | ||
495 | 441 | ||
496 | void PmIpkg::getIpkgOutput(OProcess *proc, char *buffer, int buflen) | ||
497 | { | ||
498 | QString lineStr, lineStrOld; | ||
499 | lineStr = buffer; | ||
500 | lineStr=lineStr.left(buflen); | ||
501 | //Configuring opie-oipkg...Done | ||
502 | if (lineStr!=lineStrOld) | ||
503 | out(lineStr); | ||
504 | lineStrOld = lineStr; | ||
505 | } | ||
diff --git a/noncore/unsupported/oipkg/pmipkg.h b/noncore/unsupported/oipkg/pmipkg.h index c84acfa..2f4d6ae 100644 --- a/noncore/unsupported/oipkg/pmipkg.h +++ b/noncore/unsupported/oipkg/pmipkg.h | |||
@@ -1,73 +1,69 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | * * | 2 | * * |
3 | * This program is free software; you can redistribute it and/or modify * | 3 | * This program is free software; you can redistribute it and/or modify * |
4 | * it under the terms of the GNU General Public License as published by * | 4 | * it under the terms of the GNU General Public License as published by * |
5 | * the Free Software Foundation; either version 2 of the License, or * | 5 | * the Free Software Foundation; either version 2 of the License, or * |
6 | * (at your option) any later version. * | 6 | * (at your option) any later version. * |
7 | * * | 7 | * * |
8 | ***************************************************************************/ | 8 | ***************************************************************************/ |
9 | // (c) 2002 Patrick S. Vogt <tille@handhelds.org> | 9 | // (c) 2002 Patrick S. Vogt <tille@handhelds.org> |
10 | #ifndef PMIPKG_H | 10 | #ifndef PMIPKG_H |
11 | #define PMIPKG_H | 11 | #define PMIPKG_H |
12 | 12 | ||
13 | |||
14 | #include <opie/oprocess.h> | ||
15 | #include <qobject.h> | 13 | #include <qobject.h> |
16 | #include <qlist.h> | 14 | #include <qlist.h> |
17 | #include <qstring.h> | 15 | #include <qstring.h> |
18 | #include <qwidget.h> | 16 | #include <qwidget.h> |
19 | #include "pksettings.h" | 17 | #include "pksettings.h" |
20 | #include "runwindow.h" | 18 | #include "runwindow.h" |
21 | #include "packagelist.h" | 19 | #include "packagelist.h" |
22 | #include "installdialog.h" | 20 | #include "installdialog.h" |
23 | #include "debug.h" | 21 | #include "debug.h" |
24 | 22 | ||
25 | #define createLink 0 | 23 | #define createLink 0 |
26 | #define removeLink 1 | 24 | #define removeLink 1 |
27 | 25 | ||
28 | class Package; | 26 | class Package; |
29 | class PmIpkg : public QObject | 27 | class PmIpkg : public QObject |
30 | { | 28 | { |
31 | Q_OBJECT | 29 | Q_OBJECT |
32 | public: | 30 | public: |
33 | PmIpkg( PackageManagerSettings* , QWidget* p=0, const char * name=0, WFlags f=0 ); | 31 | PmIpkg( PackageManagerSettings* , QWidget* p=0, const char * name=0, WFlags f=0 ); |
34 | ~PmIpkg(); | 32 | ~PmIpkg(); |
35 | 33 | ||
36 | int linkOpp; | 34 | int linkOpp; |
37 | void loadList( PackageList* ); | 35 | void loadList( PackageList* ); |
38 | void commit(); | 36 | void commit(); |
39 | void update(); | 37 | void update(); |
40 | void show(); | 38 | void show(); |
41 | void clearLists(); | 39 | void clearLists(); |
42 | 40 | ||
43 | public slots: | 41 | public slots: |
44 | void doIt(); | 42 | void doIt(); |
45 | void install(); | 43 | void install(); |
46 | void remove(); | 44 | void remove(); |
47 | void installFile(const QString &fileName, const QString &dest=""); | 45 | void installFile(const QString &fileName, const QString &dest=""); |
48 | void removeFile(const QString &fileName, const QString &dest=""); | 46 | void removeFile(const QString &fileName, const QString &dest=""); |
49 | void createLinks( const QString &dest ); | 47 | void createLinks( const QString &dest ); |
50 | void removeLinks( const QString &dest ); | 48 | void removeLinks( const QString &dest ); |
51 | 49 | ||
52 | //private slots: | ||
53 | void getIpkgOutput(OProcess *proc, char *buffer, int buflen); | ||
54 | 50 | ||
55 | private: | 51 | private: |
56 | OProcess *ipkgProcess; | 52 | QString ipkg_cmd; |
57 | PackageManagerSettings* settings; | 53 | PackageManagerSettings* settings; |
58 | RunWindow *runwindow; | 54 | RunWindow *runwindow; |
59 | InstallDialog *installDialog; | 55 | InstallDialog *installDialog; |
60 | QList<Package> to_remove; | 56 | QList<Package> to_remove; |
61 | QList<Package> to_install; | 57 | QList<Package> to_install; |
62 | void makeLinks(Package*); | 58 | void makeLinks(Package*); |
63 | void linkPackage( QString, QString ); | 59 | void linkPackage( QString, QString ); |
64 | void processLinkDir( QString , QString ); | 60 | void processLinkDir( QString , QString ); |
65 | bool runIpkg(const QString& args, const QString& dest="" ); | 61 | bool runIpkg(const QString& args, const QString& dest="" ); |
66 | void out( QString ); | 62 | void out( QString ); |
67 | QStringList* getList( QString, QString ); | 63 | QStringList* getList( QString, QString ); |
68 | void processFileList( QStringList*, QString ); | 64 | void processFileList( QStringList*, QString ); |
69 | 65 | ||
70 | 66 | ||
71 | }; | 67 | }; |
72 | 68 | ||
73 | #endif | 69 | #endif |