author | tille <tille> | 2002-05-03 19:08:09 (UTC) |
---|---|---|
committer | tille <tille> | 2002-05-03 19:08:09 (UTC) |
commit | 4eddfebd1b4f70bbfe9106a16e9a3eeb6601f653 (patch) (unidiff) | |
tree | 66d77ffe196c448782ce0d04877641280e74890d /noncore/unsupported/oipkg | |
parent | 6bf450ac622d22ba7e9156e474a7abb714167eba (diff) | |
download | opie-4eddfebd1b4f70bbfe9106a16e9a3eeb6601f653.zip opie-4eddfebd1b4f70bbfe9106a16e9a3eeb6601f653.tar.gz opie-4eddfebd1b4f70bbfe9106a16e9a3eeb6601f653.tar.bz2 |
fixes
-rw-r--r-- | noncore/unsupported/oipkg/TODO | 1 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/main.cpp | 3 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/mainwindow.cpp | 10 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/mainwindow.h | 0 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/packagelistdoclnk.cpp | 1 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/packagelistremote.cpp | 1 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.cpp | 89 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.h | 2 |
8 files changed, 52 insertions, 55 deletions
diff --git a/noncore/unsupported/oipkg/TODO b/noncore/unsupported/oipkg/TODO index b1ae6e3..6de54ec 100644 --- a/noncore/unsupported/oipkg/TODO +++ b/noncore/unsupported/oipkg/TODO | |||
@@ -9,6 +9,7 @@ | |||
9 | * dependency checking | 9 | * dependency checking |
10 | * create dest if it does not exist | 10 | * create dest if it does not exist |
11 | * allow reinstalling | 11 | * allow reinstalling |
12 | * different types of filters and searches | 12 | * different types of filters and searches |
13 | i.e. name, desc, files etc | 13 | i.e. name, desc, files etc |
14 | * mark packages from doclnk and ipkgfind installed if installed \ No newline at end of file | 14 | * mark packages from doclnk and ipkgfind installed if installed \ No newline at end of file |
15 | * show if different version is installed \ No newline at end of file | ||
diff --git a/noncore/unsupported/oipkg/main.cpp b/noncore/unsupported/oipkg/main.cpp index bacc973..4af11df 100644 --- a/noncore/unsupported/oipkg/main.cpp +++ b/noncore/unsupported/oipkg/main.cpp | |||
@@ -10,14 +10,15 @@ int main( int argc, char ** argv ) | |||
10 | { | 10 | { |
11 | 11 | ||
12 | debugLevel = 2; | 12 | debugLevel = 2; |
13 | if (argc > 0) | 13 | if (argc > 0) |
14 | { | 14 | { |
15 | debugLevel = QString ( argv[1] ).toInt(); | 15 | debugLevel = QString ( argv[1] ).toInt(); |
16 | qDebug("setting debug level to %i",debugLevel); | ||
16 | } | 17 | } |
17 | QPEApplication a( argc, argv ); | 18 | QPEApplication a( argc, argv ); |
18 | MainWindow mw; | 19 | MainWindow mw; |
19 | if (debugLevel < 4) | 20 | if (argc > 2) |
20 | QMessageBox::information( &mw, "oipkg","While ipkg is working\noipkg is hanging.\nPlease be patient!"); | 21 | QMessageBox::information( &mw, "oipkg","While ipkg is working\noipkg is hanging.\nPlease be patient!"); |
21 | a.showMainDocumentWidget( &mw ); | 22 | a.showMainDocumentWidget( &mw ); |
22 | return a.exec(); | 23 | return a.exec(); |
23 | } | 24 | } |
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp index 259a789..4f6e4cc 100644 --- a/noncore/unsupported/oipkg/mainwindow.cpp +++ b/noncore/unsupported/oipkg/mainwindow.cpp | |||
@@ -247,15 +247,15 @@ MainWindow::~MainWindow() | |||
247 | 247 | ||
248 | } | 248 | } |
249 | 249 | ||
250 | void MainWindow::runIpkg() | 250 | void MainWindow::runIpkg() |
251 | { | 251 | { |
252 | packageListServers.allPackages(); | 252 | packageListServers.allPackages(); |
253 | ipkg->loadList( packageListSearch ); | 253 | ipkg->loadList( &packageListSearch ); |
254 | ipkg->loadList( packageListDocLnk ); | 254 | ipkg->loadList( &packageListDocLnk ); |
255 | ipkg->loadList( packageListServers ); | 255 | ipkg->loadList( &packageListServers ); |
256 | ipkg->commit(); | 256 | ipkg->commit(); |
257 | // ##### If we looked in the list of files, we could send out accurate | 257 | // ##### If we looked in the list of files, we could send out accurate |
258 | // ##### messages. But we don't bother yet, and just do an "all". | 258 | // ##### messages. But we don't bother yet, and just do an "all". |
259 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); | 259 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); |
260 | QString lf = QString::null; | 260 | QString lf = QString::null; |
261 | e << lf; | 261 | e << lf; |
@@ -419,13 +419,14 @@ void MainWindow::setDocument(const QString &fileName) | |||
419 | installFile(fileName); | 419 | installFile(fileName); |
420 | // ##### If we looked in the list of files, we could send out accurate | 420 | // ##### If we looked in the list of files, we could send out accurate |
421 | // ##### messages. But we don't bother yet, and just do an "all". | 421 | // ##### messages. But we don't bother yet, and just do an "all". |
422 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); | 422 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); |
423 | QString lf = QString::null; | 423 | QString lf = QString::null; |
424 | e << lf; | 424 | e << lf; |
425 | displayList(); | 425 | // displayList(); |
426 | exit; | ||
426 | } | 427 | } |
427 | 428 | ||
428 | void MainWindow::installFile(const QString &fileName) | 429 | void MainWindow::installFile(const QString &fileName) |
429 | { | 430 | { |
430 | pvDebug(3, "MainWindow::installFile "+fileName); | 431 | pvDebug(3, "MainWindow::installFile "+fileName); |
431 | if ( !QFile::exists( fileName ) ) return; | 432 | if ( !QFile::exists( fileName ) ) return; |
@@ -480,8 +481,9 @@ void MainWindow::removeLinks() | |||
480 | ipkg->removeLinks( settings->destinationurl->text() ); | 481 | ipkg->removeLinks( settings->destinationurl->text() ); |
481 | } | 482 | } |
482 | 483 | ||
483 | void MainWindow::remotePackageQuery() | 484 | void MainWindow::remotePackageQuery() |
484 | { | 485 | { |
485 | packageListSearch.query( searchEdit->text() ); | 486 | packageListSearch.query( searchEdit->text() ); |
487 | packageListSearch.update(); | ||
486 | displayList(); | 488 | displayList(); |
487 | } | 489 | } |
diff --git a/noncore/unsupported/oipkg/mainwindow.h b/noncore/unsupported/oipkg/mainwindow.h index f6023b0..7c93dad 100644 --- a/noncore/unsupported/oipkg/mainwindow.h +++ b/noncore/unsupported/oipkg/mainwindow.h | |||
diff --git a/noncore/unsupported/oipkg/packagelistdoclnk.cpp b/noncore/unsupported/oipkg/packagelistdoclnk.cpp index 5787fdf..1d10adf 100644 --- a/noncore/unsupported/oipkg/packagelistdoclnk.cpp +++ b/noncore/unsupported/oipkg/packagelistdoclnk.cpp | |||
@@ -17,12 +17,13 @@ PackageListDocLnk::PackageListDocLnk(PackageManagerSettings* s) | |||
17 | PackageListDocLnk::PackageListDocLnk() | 17 | PackageListDocLnk::PackageListDocLnk() |
18 | : PackageList() | 18 | : PackageList() |
19 | { | 19 | { |
20 | Config cfg( "oipkg", Config::User ); | 20 | Config cfg( "oipkg", Config::User ); |
21 | cfg.setGroup( "Common" ); | 21 | cfg.setGroup( "Common" ); |
22 | docLnkDir = cfg.readEntry( "docLnkDir", "/root/" ); | 22 | docLnkDir = cfg.readEntry( "docLnkDir", "/root/" ); |
23 | pvDebug(2,"opening DocLnkSet "+docLnkDir); | ||
23 | doclnkset = new DocLnkSet(docLnkDir,"application/ipkg"); | 24 | doclnkset = new DocLnkSet(docLnkDir,"application/ipkg"); |
24 | } | 25 | } |
25 | 26 | ||
26 | PackageListDocLnk::~PackageListDocLnk() | 27 | PackageListDocLnk::~PackageListDocLnk() |
27 | { | 28 | { |
28 | Config cfg( "oipkg", Config::User ); | 29 | Config cfg( "oipkg", Config::User ); |
diff --git a/noncore/unsupported/oipkg/packagelistremote.cpp b/noncore/unsupported/oipkg/packagelistremote.cpp index 3c6ede7..ee54fca 100644 --- a/noncore/unsupported/oipkg/packagelistremote.cpp +++ b/noncore/unsupported/oipkg/packagelistremote.cpp | |||
@@ -19,12 +19,13 @@ PackageListRemote::PackageListRemote() | |||
19 | PackageListRemote::~PackageListRemote() | 19 | PackageListRemote::~PackageListRemote() |
20 | { | 20 | { |
21 | } | 21 | } |
22 | 22 | ||
23 | void PackageListRemote::query(QString s) | 23 | void PackageListRemote::query(QString s) |
24 | { | 24 | { |
25 | pvDebug(4,"set query "+s); | ||
25 | searchString = s; | 26 | searchString = s; |
26 | } | 27 | } |
27 | 28 | ||
28 | void PackageListRemote::update() | 29 | void PackageListRemote::update() |
29 | { | 30 | { |
30 | pvDebug(2,"PackageListRemote::update"); | 31 | pvDebug(2,"PackageListRemote::update"); |
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp index fd8279b..0ae74da 100644 --- a/noncore/unsupported/oipkg/pmipkg.cpp +++ b/noncore/unsupported/oipkg/pmipkg.cpp | |||
@@ -41,13 +41,13 @@ PmIpkg::~PmIpkg() | |||
41 | #define SYSTEM | 41 | #define SYSTEM |
42 | int PmIpkg::runIpkg(const QString& args, const QString& dest ) | 42 | int PmIpkg::runIpkg(const QString& args, const QString& dest ) |
43 | { | 43 | { |
44 | pvDebug(2,"PmIpkg::runIpkg "+args); | 44 | pvDebug(2,"PmIpkg::runIpkg "+args); |
45 | 45 | ||
46 | #ifdef PROC | 46 | #ifdef PROC |
47 | QStringList cmd = "/usr/bin/ipkg "; | 47 | QStringList cmd = "ipkg "; |
48 | #endif | 48 | #endif |
49 | #ifdef SYSTEM | 49 | #ifdef SYSTEM |
50 | QString cmd = "/usr/bin/ipkg "; | 50 | QString cmd = "/usr/bin/ipkg "; |
51 | #endif | 51 | #endif |
52 | pvDebug( 3,"PmIpkg::runIpkg got dest="+dest); | 52 | pvDebug( 3,"PmIpkg::runIpkg got dest="+dest); |
53 | if ( dest == "" ) | 53 | if ( dest == "" ) |
@@ -72,14 +72,14 @@ int PmIpkg::runIpkg(const QString& args, const QString& dest ) | |||
72 | int r = 0; | 72 | int r = 0; |
73 | #ifdef PROC | 73 | #ifdef PROC |
74 | QString o = "start"; | 74 | QString o = "start"; |
75 | Process *ipkg = new Process( cmd ); | 75 | Process *ipkg = new Process( cmd ); |
76 | out( "running:<br>\n"+ipkg->arguments().join(" ")+"<br>\n" ); | 76 | out( "running:<br>\n"+ipkg->arguments().join(" ")+"<br>\n" ); |
77 | QString description; | 77 | QString description; |
78 | ipkg->exec("",o); | 78 | r = ipkg->exec("",o); |
79 | // out( o ); | 79 | out( o ); |
80 | #endif | 80 | #endif |
81 | #ifdef SYSTEM | 81 | #ifdef SYSTEM |
82 | out( "running:<br>\n"+cmd+"<br>\n" ); | 82 | out( "running:<br>\n"+cmd+"<br>\n" ); |
83 | QString redirect = "/tmp/oipkg.pipe"; | 83 | QString redirect = "/tmp/oipkg.pipe"; |
84 | cmd += " 2>&1 | tee "+redirect+" 2>&1"; | 84 | cmd += " 2>&1 | tee "+redirect+" 2>&1"; |
85 | pvDebug(2, "running >"+cmd+"<"); | 85 | pvDebug(2, "running >"+cmd+"<"); |
@@ -174,13 +174,12 @@ void PmIpkg::processLinkDir( QString file, QString dest ) | |||
174 | if (linkOpp==createLink) destDir.mkdir( destFile, true ); | 174 | if (linkOpp==createLink) destDir.mkdir( destFile, true ); |
175 | QDir d( file ); | 175 | QDir d( file ); |
176 | // d.setFilter( QDir::Files | QDir::Hidden | QDir::NoSymLinks ); | 176 | // d.setFilter( QDir::Files | QDir::Hidden | QDir::NoSymLinks ); |
177 | const QFileInfoList *list = d.entryInfoList(); | 177 | const QFileInfoList *list = d.entryInfoList(); |
178 | QFileInfoListIterator it( *list ); | 178 | QFileInfoListIterator it( *list ); |
179 | QFileInfo *fi; | 179 | QFileInfo *fi; |
180 | qDebug( "while %i",list->count()); | ||
181 | while ( (fi=it.current()) ) | 180 | while ( (fi=it.current()) ) |
182 | { | 181 | { |
183 | pvDebug(4, "processLinkDir "+fi->absFilePath()); | 182 | pvDebug(4, "processLinkDir "+fi->absFilePath()); |
184 | processLinkDir( fi->absFilePath(), dest ); | 183 | processLinkDir( fi->absFilePath(), dest ); |
185 | ++it; | 184 | ++it; |
186 | } | 185 | } |
@@ -205,15 +204,15 @@ void PmIpkg::processLinkDir( QString file, QString dest ) | |||
205 | unlink( linkFile ); | 204 | unlink( linkFile ); |
206 | } | 205 | } |
207 | } | 206 | } |
208 | } | 207 | } |
209 | } | 208 | } |
210 | 209 | ||
211 | void PmIpkg::loadList( PackageList pl ) | 210 | void PmIpkg::loadList( PackageList *pl ) |
212 | { | 211 | { |
213 | for( Package *pack = pl.first();pack ; (pack = pl.next()) ) | 212 | for( Package *pack = pl->first();pack ; (pack = pl->next()) ) |
214 | { | 213 | { |
215 | if ( pack && (pack->name() != "") && pack) | 214 | if ( pack && (pack->name() != "") && pack) |
216 | { | 215 | { |
217 | if ( pack->toInstall() ) | 216 | if ( pack->toInstall() ) |
218 | to_install.append( pack ); | 217 | to_install.append( pack ); |
219 | if ( pack->toRemove() ) | 218 | if ( pack->toRemove() ) |
@@ -222,42 +221,34 @@ void PmIpkg::loadList( PackageList pl ) | |||
222 | } | 221 | } |
223 | } | 222 | } |
224 | 223 | ||
225 | void PmIpkg::commit() | 224 | void PmIpkg::commit() |
226 | { | 225 | { |
227 | int sizecount = 0; | 226 | int sizecount = 0; |
228 | for (uint i=0; i < to_remove.count(); i++) | ||
229 | sizecount += 1; | ||
230 | for (uint i=0; i < to_install.count(); i++) | ||
231 | sizecount += to_install.at(i)->size().toInt(); | ||
232 | runwindow->progress->setTotalSteps(sizecount); | ||
233 | startDialog(); | ||
234 | } | ||
235 | |||
236 | void PmIpkg::startDialog() | ||
237 | { | ||
238 | installDialog = new InstallDialog(settings,0,0,true); | 227 | installDialog = new InstallDialog(settings,0,0,true); |
239 | QCheckListItem *toRemoveItem; | 228 | QCheckListItem *toRemoveItem = new QCheckListItem( installDialog->ListViewPackages, QObject::tr("To remove") ); |
240 | toRemoveItem= new QCheckListItem( installDialog->ListViewPackages, QObject::tr("To remove") ); | 229 | QCheckListItem *toInstallItem = new QCheckListItem( installDialog->ListViewPackages, QObject::tr("To install") ); |
241 | toRemoveItem->setOpen( true ); | 230 | toRemoveItem->setOpen( true ); |
242 | for (Package *it=to_remove.first(); it != 0; it=to_remove.next() ) | 231 | toInstallItem->setOpen( true ); |
232 | for (uint i=0; i < to_remove.count(); i++) | ||
243 | { | 233 | { |
244 | toRemoveItem->insertItem( new PackageListItem(installDialog->ListViewPackages, it,settings) ); | 234 | sizecount += 1; |
235 | toRemoveItem->insertItem( new PackageListItem(installDialog->ListViewPackages, to_remove.at(i),settings) ); | ||
245 | } | 236 | } |
246 | QCheckListItem *toInstallItem; | 237 | for (uint i=0; i < to_install.count(); i++) |
247 | toInstallItem = new QCheckListItem( installDialog->ListViewPackages, QObject::tr("To install") ); | ||
248 | toInstallItem->setOpen( true ); | ||
249 | for (Package *it=to_install.first(); it != 0; it=to_install.next() ) | ||
250 | { | 238 | { |
251 | toInstallItem->insertItem( new PackageListItem(installDialog->ListViewPackages, it,settings) ); | 239 | sizecount += to_install.at(i)->size().toInt(); |
240 | toInstallItem->insertItem( new PackageListItem(installDialog->ListViewPackages, to_install.at(i),settings) ); | ||
252 | } | 241 | } |
242 | runwindow->progress->setTotalSteps(sizecount); | ||
243 | qDebug("Install size %i",sizecount); | ||
253 | installDialog->showMaximized(); | 244 | installDialog->showMaximized(); |
254 | if ( installDialog->exec() ) doIt(); | 245 | if ( installDialog->exec() ) doIt(); |
255 | installDialog->close(); | 246 | installDialog->close(); |
247 | runwindow->showMaximized(); | ||
256 | out(tr("<b>All done.</b>")); | 248 | out(tr("<b>All done.</b>")); |
257 | to_install.clear(); | ||
258 | } | 249 | } |
259 | 250 | ||
260 | void PmIpkg::doIt() | 251 | void PmIpkg::doIt() |
261 | { | 252 | { |
262 | show( true ); | 253 | show( true ); |
263 | remove(); | 254 | remove(); |
@@ -269,59 +260,59 @@ void PmIpkg::remove() | |||
269 | { | 260 | { |
270 | if ( to_remove.count() == 0 ) return; | 261 | if ( to_remove.count() == 0 ) return; |
271 | 262 | ||
272 | out("<b>"+tr("Removing")+"<br>"+tr("please wait")+"</b><br><hr>"); | 263 | out("<b>"+tr("Removing")+"<br>"+tr("please wait")+"</b><br><hr>"); |
273 | 264 | ||
274 | QStringList *fileList; | 265 | QStringList *fileList; |
275 | for (Package *it=to_remove.first(); it != 0; it=to_remove.next() ) | 266 | for (uint i=0; i < to_remove.count(); i++) |
276 | { | 267 | { |
277 | if ( it->link() )fileList = getList( it->name(), it->dest() ); | 268 | if ( to_remove.at(i)->link() )fileList = getList( to_remove.at(i)->name(), to_remove.at(i)->dest() ); |
278 | if ( runIpkg("remove " + it->name(), it->dest() ) == 0) | 269 | if ( runIpkg("remove " + to_remove.at(i)->name(), to_remove.at(i)->dest() ) == 0) |
279 | { | 270 | { |
280 | runwindow->progress->setProgress( 1 + runwindow->progress->progress() ); | 271 | runwindow->progress->setProgress( 1 ); |
281 | linkOpp = removeLink; | 272 | linkOpp = removeLink; |
282 | if ( it->link() ) | 273 | if ( to_remove.at(i)->link() ) |
283 | { | 274 | { |
284 | out( "<br>removing links<br>" ); | 275 | out( "<br>removing links<br>" ); |
285 | out( "for package "+it->name()+" in "+it->dest()+"<br>" ); | 276 | out( "for package "+to_remove.at(i)->name()+" in "+to_remove.at(i)->dest()+"<br>" ); |
286 | processFileList( fileList, it->dest() ); | 277 | processFileList( fileList, to_remove.at(i)->dest() ); |
287 | } | 278 | } |
288 | it->processed(); | 279 | to_remove.at(i)->processed(); |
289 | // to_install.take( it ); | 280 | to_remove.take( i ); |
290 | out("<br><hr>"); | 281 | out("<br><hr>"); |
291 | }else{ | 282 | }else{ |
292 | out("<b>"+tr("Error while removing")+"</b><hr>"+it->name()); | 283 | out("<b>"+tr("Error while removing")+"</b><hr>"+to_remove.at(i)->name()); |
293 | } | 284 | } |
294 | if ( it->link() )delete fileList; | 285 | if ( to_remove.at(i)->link() )delete fileList; |
295 | } | 286 | } |
287 | to_remove.clear(); | ||
296 | out("<br>"); | 288 | out("<br>"); |
297 | } | 289 | } |
298 | 290 | ||
299 | 291 | ||
300 | void PmIpkg::install() | 292 | void PmIpkg::install() |
301 | { | 293 | { |
302 | if ( to_install.count() == 0 ) return; | 294 | if ( to_install.count() == 0 ) return; |
303 | out("<b>"+tr("Installing")+"<br>"+tr("please wait")+"</b><br>"); | 295 | out("<b>"+tr("Installing")+"<br>"+tr("please wait")+"</b><br>"); |
304 | for (Package *it=to_install.first(); it != 0; it=to_install.next() ) | 296 | for (uint i=0; i < to_install.count(); i++) |
305 | { | 297 | { |
306 | 298 | if ( runIpkg("install " + to_install.at(i)->installName(), to_install.at(i)->dest() ) == 0 ) | |
307 | if ( runIpkg("install " + it->installName(), it->dest() ) == 0 ) | ||
308 | { | 299 | { |
309 | runwindow->progress->setProgress( it->size().toInt() + runwindow->progress->progress()); | 300 | runwindow->progress->setProgress( to_install.at(i)->size().toInt() ); |
310 | linkOpp = createLink; | 301 | linkOpp = createLink; |
311 | if ( it->link() ) | 302 | if ( to_install.at(i)->link() ) |
312 | { | 303 | { |
313 | out( "<br>creating links<br>" ); | 304 | out( "<br>creating links<br>" ); |
314 | out( "for package "+it->name()+" in "+it->dest()+"<br>" ); | 305 | out( "for package "+to_install.at(i)->name()+" in "+to_install.at(i)->dest()+"<br>" ); |
315 | makeLinks( it ); | 306 | makeLinks( to_install.at(i) ); |
316 | } | 307 | } |
317 | it->processed(); | 308 | to_install.at(i)->processed(); |
318 | // to_install.take( it->name() ); | 309 | to_install.take( i ); |
319 | out("<br><hr>"); | 310 | out("<br><hr>"); |
320 | }else{ | 311 | }else{ |
321 | out("<b>"+tr("Error while installing")+"</b><hr>"+it->name()); | 312 | out("<b>"+tr("Error while installing")+"</b><hr>"+to_install.at(i)->name()); |
322 | } | 313 | } |
323 | } | 314 | } |
324 | out("<br>"); | 315 | out("<br>"); |
325 | to_install.clear(); | 316 | to_install.clear(); |
326 | } | 317 | } |
327 | 318 | ||
@@ -395,23 +386,23 @@ void PmIpkg::installFile(const QString &fileName, const QString &dest) | |||
395 | to_install.clear(); | 386 | to_install.clear(); |
396 | to_remove.clear(); | 387 | to_remove.clear(); |
397 | pvDebug( 2,"PmIpkg::installFile "+ fileName); | 388 | pvDebug( 2,"PmIpkg::installFile "+ fileName); |
398 | Package *p = new Package(fileName,settings); | 389 | Package *p = new Package(fileName,settings); |
399 | if ( dest!="") p->setDest( dest ); | 390 | if ( dest!="") p->setDest( dest ); |
400 | to_install.append( p ); | 391 | to_install.append( p ); |
401 | startDialog(); | 392 | commit(); |
402 | delete p; | 393 | delete p; |
403 | } | 394 | } |
404 | 395 | ||
405 | void PmIpkg::removeFile(const QString &fileName, const QString &dest) | 396 | void PmIpkg::removeFile(const QString &fileName, const QString &dest) |
406 | { | 397 | { |
407 | 398 | ||
408 | to_install.clear(); | 399 | to_install.clear(); |
409 | to_remove.clear(); | 400 | to_remove.clear(); |
410 | pvDebug( 2,"PmIpkg::removeFile "+ fileName); | 401 | pvDebug( 2,"PmIpkg::removeFile "+ fileName); |
411 | Package *p = new Package(fileName,settings); | 402 | Package *p = new Package(fileName,settings); |
412 | if ( dest!="") p->setDest( dest ); | 403 | if ( dest!="") p->setDest( dest ); |
413 | to_remove.append( p ); | 404 | to_remove.append( p ); |
414 | startDialog(); | 405 | commit(); |
415 | delete p; | 406 | delete p; |
416 | } | 407 | } |
417 | 408 | ||
diff --git a/noncore/unsupported/oipkg/pmipkg.h b/noncore/unsupported/oipkg/pmipkg.h index d2490e8..7bc62f1 100644 --- a/noncore/unsupported/oipkg/pmipkg.h +++ b/noncore/unsupported/oipkg/pmipkg.h | |||
@@ -21,13 +21,13 @@ class PmIpkg : public QObject | |||
21 | Q_OBJECT | 21 | Q_OBJECT |
22 | public: | 22 | public: |
23 | PmIpkg( PackageManagerSettings* , QWidget* p=0, const char * name=0, WFlags f=0 ); | 23 | PmIpkg( PackageManagerSettings* , QWidget* p=0, const char * name=0, WFlags f=0 ); |
24 | ~PmIpkg(); | 24 | ~PmIpkg(); |
25 | 25 | ||
26 | int linkOpp; | 26 | int linkOpp; |
27 | void loadList( PackageList ); | 27 | void loadList( PackageList* ); |
28 | void commit(); | 28 | void commit(); |
29 | void update(); | 29 | void update(); |
30 | void showButtons(bool b=true); | 30 | void showButtons(bool b=true); |
31 | void show( bool buttons=true ); | 31 | void show( bool buttons=true ); |
32 | 32 | ||
33 | public slots: | 33 | public slots: |