-rw-r--r-- | noncore/unsupported/oipkg/TODO | 3 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/opie-oipkg.control | 2 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.cpp | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/noncore/unsupported/oipkg/TODO b/noncore/unsupported/oipkg/TODO index 9d9a650..1aa9e6b 100644 --- a/noncore/unsupported/oipkg/TODO +++ b/noncore/unsupported/oipkg/TODO | |||
@@ -1,13 +1,14 @@ | |||
1 | * Settings Class | 1 | * Settings Class |
2 | * tr() ;) | 2 | * tr() ;) |
3 | * Dialog to display ipkg output live | 3 | * Dialog to display ipkg output live |
4 | * parse "to install" and "to remove" from status | 4 | * parse "to install" and "to remove" from status |
5 | * install local file dialog | 5 | * install local file dialog |
6 | * qcop | 6 | * qcop |
7 | * error handling | 7 | * error handling |
8 | * manage links | 8 | * manage links |
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 \ No newline at end of file | 13 | i.e. name, desc, files etc |
14 | * get packages from doclnk \ No newline at end of file | ||
diff --git a/noncore/unsupported/oipkg/opie-oipkg.control b/noncore/unsupported/oipkg/opie-oipkg.control index 2d2b63c..1cff44e 100644 --- a/noncore/unsupported/oipkg/opie-oipkg.control +++ b/noncore/unsupported/oipkg/opie-oipkg.control | |||
@@ -1,9 +1,9 @@ | |||
1 | Files: bin/oipkg apps/Settings/oipkg.desktop pics/oipkg/ | 1 | Files: bin/oipkg apps/Settings/oipkg.desktop pics/oipkg/* |
2 | Priority: optional | 2 | Priority: optional |
3 | Section: opie/settings | 3 | Section: opie/settings |
4 | Maintainer: Patrick S. Vogt <tille@almana.ch> | 4 | Maintainer: Patrick S. Vogt <tille@almana.ch> |
5 | Architecture: arm | 5 | Architecture: arm |
6 | Version: $QPE_VERSION-$SUB_VERSION | 6 | Version: $QPE_VERSION-$SUB_VERSION |
7 | Depends: opie-base ($QPE_VERSION), ipkg (>0.9) | 7 | Depends: opie-base ($QPE_VERSION), ipkg (>0.9) |
8 | Description: Opie Projects advanced gui ipkg installer | 8 | Description: Opie Projects advanced gui ipkg installer |
9 | A GUI front-end to ipkg for the Opie environment. | 9 | A GUI front-end to ipkg for the Opie environment. |
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp index 1798c80..2559a51 100644 --- a/noncore/unsupported/oipkg/pmipkg.cpp +++ b/noncore/unsupported/oipkg/pmipkg.cpp | |||
@@ -217,193 +217,193 @@ void PmIpkg::loadList( PackageList pl ) | |||
217 | if ( pack && (pack->name() != "") && pack) | 217 | if ( pack && (pack->name() != "") && pack) |
218 | { | 218 | { |
219 | if ( pack->toInstall() ) | 219 | if ( pack->toInstall() ) |
220 | to_install.append( pack ); | 220 | to_install.append( pack ); |
221 | if ( pack->toRemove() ) | 221 | if ( pack->toRemove() ) |
222 | to_remove.append( pack ); | 222 | to_remove.append( pack ); |
223 | } | 223 | } |
224 | } | 224 | } |
225 | } | 225 | } |
226 | 226 | ||
227 | void PmIpkg::commit( PackageList pl ) | 227 | void PmIpkg::commit( PackageList pl ) |
228 | { | 228 | { |
229 | sizecount = 0; | 229 | sizecount = 0; |
230 | QString rem="<b>"+tr("To remove:")+"</b><br>\n"; | 230 | QString rem="<b>"+tr("To remove:")+"</b><br>\n"; |
231 | QString inst="<b>"+tr("To install:")+"</b><br>\n"; | 231 | QString inst="<b>"+tr("To install:")+"</b><br>\n"; |
232 | loadList(pl); | 232 | loadList(pl); |
233 | for (uint i=0; i < to_remove.count(); i++) | 233 | for (uint i=0; i < to_remove.count(); i++) |
234 | sizecount += 1; | 234 | sizecount += 1; |
235 | for (uint i=0; i < to_install.count(); i++) | 235 | for (uint i=0; i < to_install.count(); i++) |
236 | sizecount += to_install.at(i)->size().toInt(); | 236 | sizecount += to_install.at(i)->size().toInt(); |
237 | startDialog(); | 237 | startDialog(); |
238 | } | 238 | } |
239 | 239 | ||
240 | void PmIpkg::startDialog() | 240 | void PmIpkg::startDialog() |
241 | { | 241 | { |
242 | installDialog = new QDialog(0,0,true); | 242 | installDialog = new QDialog(0,0,true); |
243 | QGridLayout *RunWindowLayout = new QGridLayout( installDialog ); | 243 | QGridLayout *RunWindowLayout = new QGridLayout( installDialog ); |
244 | RunWindowLayout->setSpacing( 2 ); | 244 | RunWindowLayout->setSpacing( 2 ); |
245 | RunWindowLayout->setMargin( 2 ); | 245 | RunWindowLayout->setMargin( 2 ); |
246 | 246 | ||
247 | PackageListView *plv = new PackageListView(installDialog, "install",settings); | 247 | PackageListView *plv = new PackageListView(installDialog, "install",settings); |
248 | plv->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding, plv->sizePolicy().mayShrinkVertically()) ); | 248 | plv->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding, plv->sizePolicy().mayShrinkVertically()) ); |
249 | RunWindowLayout->addWidget( plv, 1, 0 ); | 249 | RunWindowLayout->addWidget( plv, 1, 0 ); |
250 | QCheckListItem *toRemoveItem; | 250 | QCheckListItem *toRemoveItem; |
251 | toRemoveItem= new QCheckListItem( plv, QObject::tr("To remove") ); | 251 | toRemoveItem= new QCheckListItem( plv, QObject::tr("To remove") ); |
252 | toRemoveItem->setOpen( true ); | 252 | toRemoveItem->setOpen( true ); |
253 | for (Package *it=to_remove.first(); it != 0; it=to_remove.next() ) | 253 | for (Package *it=to_remove.first(); it != 0; it=to_remove.next() ) |
254 | { | 254 | { |
255 | toRemoveItem->insertItem( new PackageListItem(plv, it,settings) ); | 255 | toRemoveItem->insertItem( new PackageListItem(plv, it,settings) ); |
256 | } | 256 | } |
257 | QCheckListItem *toInstallItem; | 257 | QCheckListItem *toInstallItem; |
258 | toInstallItem = new QCheckListItem( plv, QObject::tr("To install") ); | 258 | toInstallItem = new QCheckListItem( plv, QObject::tr("To install") ); |
259 | toInstallItem->setOpen( true ); | 259 | toInstallItem->setOpen( true ); |
260 | for (Package *it=to_install.first(); it != 0; it=to_install.next() ) | 260 | for (Package *it=to_install.first(); it != 0; it=to_install.next() ) |
261 | { | 261 | { |
262 | toInstallItem->insertItem( new PackageListItem(plv, it,settings) ); | 262 | toInstallItem->insertItem( new PackageListItem(plv, it,settings) ); |
263 | } | 263 | } |
264 | 264 | ||
265 | QGroupBox *GroupBox1 = new QGroupBox( installDialog, "Ipkg" ); | 265 | QGroupBox *GroupBox1 = new QGroupBox( installDialog, "Ipkg" ); |
266 | GroupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, GroupBox1->sizePolicy().mayShrinkVertically() ) ); | 266 | GroupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, GroupBox1->sizePolicy().mayShrinkVertically() ) ); |
267 | GroupBox1->setTitle( tr( "Ipkg options" ) ); | 267 | GroupBox1->setTitle( tr( "Ipkg options" ) ); |
268 | GroupBox1->setColumnLayout(0, Qt::Vertical ); | 268 | GroupBox1->setColumnLayout(0, Qt::Vertical ); |
269 | GroupBox1->layout()->setSpacing( 0 ); | 269 | GroupBox1->layout()->setSpacing( 0 ); |
270 | GroupBox1->layout()->setMargin( 0 ); | 270 | GroupBox1->layout()->setMargin( 0 ); |
271 | QGridLayout *GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); | 271 | QGridLayout *GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); |
272 | GroupBox1Layout->setAlignment( Qt::AlignTop ); | 272 | GroupBox1Layout->setAlignment( Qt::AlignTop ); |
273 | GroupBox1Layout->setSpacing( 3 ); | 273 | GroupBox1Layout->setSpacing( 3 ); |
274 | GroupBox1Layout->setMargin( 3 ); | 274 | GroupBox1Layout->setMargin( 3 ); |
275 | _force_depends = new QCheckBox( GroupBox1, "_force_depends" ); | 275 | _force_depends = new QCheckBox( GroupBox1, "_force_depends" ); |
276 | _force_depends->setText( tr( "-force-depends" ) ); | 276 | _force_depends->setText( tr( "-force-depends" ) ); |
277 | _force_depends->setAutoResize( TRUE ); | 277 | _force_depends->setAutoResize( TRUE ); |
278 | _force_depends->setChecked(true); | 278 | _force_depends->setChecked(true); |
279 | GroupBox1Layout->addWidget( _force_depends, 0, 0 ); | 279 | GroupBox1Layout->addWidget( _force_depends, 0, 0 ); |
280 | _force_reinstall = new QCheckBox( GroupBox1, "_force_reinstall" ); | 280 | _force_reinstall = new QCheckBox( GroupBox1, "_force_reinstall" ); |
281 | _force_reinstall->setText( tr( "-force-reinstall" ) ); | 281 | _force_reinstall->setText( tr( "-force-reinstall" ) ); |
282 | _force_reinstall->setAutoResize( TRUE ); | 282 | _force_reinstall->setAutoResize( TRUE ); |
283 | GroupBox1Layout->addWidget( _force_reinstall, 1, 0 ); | 283 | GroupBox1Layout->addWidget( _force_reinstall, 1, 0 ); |
284 | _force_remove = new QCheckBox( GroupBox1, "_force_remove" ); | 284 | _force_remove = new QCheckBox( GroupBox1, "_force_remove" ); |
285 | _force_remove->setText( tr( "-force-removal-of-essential-packages" ) ); | 285 | _force_remove->setText( tr( "-force-removal-of-essential-packages" ) ); |
286 | _force_remove->setAutoResize( TRUE ); | 286 | _force_remove->setAutoResize( TRUE ); |
287 | GroupBox1Layout->addWidget( _force_remove, 1, 0 ); | 287 | GroupBox1Layout->addWidget( _force_remove, 1, 0 ); |
288 | RunWindowLayout->addWidget( GroupBox1 , 3, 0 ); | 288 | RunWindowLayout->addWidget( GroupBox1 , 3, 0 ); |
289 | installDialog->showMaximized(); | 289 | installDialog->showMaximized(); |
290 | if ( installDialog->exec() ) doIt(); | 290 | if ( installDialog->exec() ) doIt(); |
291 | installDialog->close(); | 291 | installDialog->close(); |
292 | out(tr("<b>All done.</b>")); | 292 | out(tr("<b>All done.</b>")); |
293 | } | 293 | } |
294 | 294 | ||
295 | void PmIpkg::doIt() | 295 | void PmIpkg::doIt() |
296 | { | 296 | { |
297 | show( true ); | 297 | show( true ); |
298 | remove(); | 298 | remove(); |
299 | install(); | 299 | install(); |
300 | } | 300 | } |
301 | 301 | ||
302 | 302 | ||
303 | void PmIpkg::remove() | 303 | void PmIpkg::remove() |
304 | { | 304 | { |
305 | if ( to_remove.count() == 0 ) return; | 305 | if ( to_remove.count() == 0 ) return; |
306 | 306 | ||
307 | out("<b>"+tr("Removing")+"<br>"+tr("please wait")+"</b><br><hr>"); | 307 | out("<b>"+tr("Removing")+"<br>"+tr("please wait")+"</b><br><hr>"); |
308 | 308 | ||
309 | QStringList *fileList; | 309 | QStringList *fileList; |
310 | for (Package *it=to_remove.first(); it != 0; it=to_remove.next() ) | 310 | for (Package *it=to_remove.first(); it != 0; it=to_remove.next() ) |
311 | { | 311 | { |
312 | if ( it->link() )fileList = getList( it->name(), it->dest() ); | 312 | if ( it->link() )fileList = getList( it->name(), it->dest() ); |
313 | if ( runIpkg("remove " + it->name()) == 0) | 313 | if ( runIpkg("remove " + it->name(), it->dest() ) == 0) |
314 | { | 314 | { |
315 | runwindow->progress->setProgress( 1 + runwindow->progress->progress() ); | 315 | runwindow->progress->setProgress( 1 + runwindow->progress->progress() ); |
316 | linkOpp = removeLink; | 316 | linkOpp = removeLink; |
317 | if ( it->link() ) | 317 | if ( it->link() ) |
318 | { | 318 | { |
319 | out( "<br>removing links<br>" ); | 319 | out( "<br>removing links<br>" ); |
320 | out( "for package "+it->name()+" in "+it->dest()+"<br>" ); | 320 | out( "for package "+it->name()+" in "+it->dest()+"<br>" ); |
321 | processFileList( fileList, it->dest() ); | 321 | processFileList( fileList, it->dest() ); |
322 | } | 322 | } |
323 | it->processed(); | 323 | it->processed(); |
324 | 324 | ||
325 | out("<br><hr>"); | 325 | out("<br><hr>"); |
326 | }else{ | 326 | }else{ |
327 | out("<b>"+tr("Error while removing")+"</b><hr>"+it->name()); | 327 | out("<b>"+tr("Error while removing")+"</b><hr>"+it->name()); |
328 | } | 328 | } |
329 | if ( it->link() )delete fileList; | 329 | if ( it->link() )delete fileList; |
330 | } | 330 | } |
331 | out("<br>"); | 331 | out("<br>"); |
332 | } | 332 | } |
333 | 333 | ||
334 | 334 | ||
335 | void PmIpkg::install() | 335 | void PmIpkg::install() |
336 | { | 336 | { |
337 | if ( to_install.count() == 0 ) return; | 337 | if ( to_install.count() == 0 ) return; |
338 | out("<b>"+tr("Installing")+"<br>"+tr("please wait")+"</b><br>"); | 338 | out("<b>"+tr("Installing")+"<br>"+tr("please wait")+"</b><br>"); |
339 | for (Package *it=to_install.first(); it != 0; it=to_install.next() ) | 339 | for (Package *it=to_install.first(); it != 0; it=to_install.next() ) |
340 | { | 340 | { |
341 | 341 | ||
342 | if ( runIpkg("install " + it->installName(), it->dest() ) == 0 ) | 342 | if ( runIpkg("install " + it->installName(), it->dest() ) == 0 ) |
343 | { | 343 | { |
344 | runwindow->progress->setProgress( it->size().toInt() + runwindow->progress->progress()); | 344 | runwindow->progress->setProgress( it->size().toInt() + runwindow->progress->progress()); |
345 | linkOpp = createLink; | 345 | linkOpp = createLink; |
346 | if ( it->link() ) | 346 | if ( it->link() ) |
347 | { | 347 | { |
348 | out( "<br>creating links<br>" ); | 348 | out( "<br>creating links<br>" ); |
349 | out( "for package "+it->name()+" in "+it->dest()+"<br>" ); | 349 | out( "for package "+it->name()+" in "+it->dest()+"<br>" ); |
350 | makeLinks( it ); | 350 | makeLinks( it ); |
351 | } | 351 | } |
352 | it->processed(); | 352 | it->processed(); |
353 | out("<br><hr>"); | 353 | out("<br><hr>"); |
354 | }else{ | 354 | }else{ |
355 | out("<b>"+tr("Error while installing")+"</b><hr>"+it->name()); | 355 | out("<b>"+tr("Error while installing")+"</b><hr>"+it->name()); |
356 | } | 356 | } |
357 | } | 357 | } |
358 | out("<br>"); | 358 | out("<br>"); |
359 | } | 359 | } |
360 | 360 | ||
361 | void PmIpkg::createLinks( const QString &dest ) | 361 | void PmIpkg::createLinks( const QString &dest ) |
362 | { | 362 | { |
363 | pvDebug(2,"PmIpkg::createLinks "+dest); | 363 | pvDebug(2,"PmIpkg::createLinks "+dest); |
364 | linkOpp=createLink; | 364 | linkOpp=createLink; |
365 | QString url = settings->getDestinationUrlByName( dest ); | 365 | QString url = settings->getDestinationUrlByName( dest ); |
366 | url = url==""?dest:url; | 366 | url = url==""?dest:url; |
367 | processLinkDir( "/", url ); | 367 | processLinkDir( "/", url ); |
368 | } | 368 | } |
369 | 369 | ||
370 | void PmIpkg::removeLinks( const QString &dest ) | 370 | void PmIpkg::removeLinks( const QString &dest ) |
371 | { | 371 | { |
372 | pvDebug(2,"PmIpkg::removeLinks "+dest); | 372 | pvDebug(2,"PmIpkg::removeLinks "+dest); |
373 | linkOpp=removeLink; | 373 | linkOpp=removeLink; |
374 | QString url = settings->getDestinationUrlByName( dest ); | 374 | QString url = settings->getDestinationUrlByName( dest ); |
375 | url = url==""?dest:url; | 375 | url = url==""?dest:url; |
376 | processLinkDir( "/", url ); | 376 | processLinkDir( "/", url ); |
377 | } | 377 | } |
378 | 378 | ||
379 | void PmIpkg::update() | 379 | void PmIpkg::update() |
380 | { | 380 | { |
381 | show( false ); | 381 | show( false ); |
382 | runIpkg( "update" ); | 382 | runIpkg( "update" ); |
383 | runwindow->close(); | 383 | runwindow->close(); |
384 | } | 384 | } |
385 | 385 | ||
386 | void PmIpkg::out( QString o ) | 386 | void PmIpkg::out( QString o ) |
387 | { | 387 | { |
388 | runwindow->outPut->append(o); | 388 | runwindow->outPut->append(o); |
389 | //runwindow->outPut->setCursorPosition(0, runwindow->outPut->contentsHeight()); | 389 | //runwindow->outPut->setCursorPosition(0, runwindow->outPut->contentsHeight()); |
390 | //runwindow->outPut->setText( runwindow->outPut->text()+o ); | 390 | //runwindow->outPut->setText( runwindow->outPut->text()+o ); |
391 | runwindow->outPut->setContentsPos(0, runwindow->outPut->contentsHeight()); | 391 | runwindow->outPut->setContentsPos(0, runwindow->outPut->contentsHeight()); |
392 | } | 392 | } |
393 | 393 | ||
394 | 394 | ||
395 | void PmIpkg::showButtons(bool b) | 395 | void PmIpkg::showButtons(bool b) |
396 | { | 396 | { |
397 | if ( b ) | 397 | if ( b ) |
398 | { | 398 | { |
399 | runwindow->cancelButton->hide(); | 399 | runwindow->cancelButton->hide(); |
400 | runwindow->doItButton->hide(); | 400 | runwindow->doItButton->hide(); |
401 | runwindow->removeButton->hide(); | 401 | runwindow->removeButton->hide(); |
402 | runwindow->installButton->hide(); | 402 | runwindow->installButton->hide(); |
403 | }else{ | 403 | }else{ |
404 | runwindow->cancelButton->show(); | 404 | runwindow->cancelButton->show(); |
405 | runwindow->doItButton->show(); | 405 | runwindow->doItButton->show(); |
406 | runwindow->removeButton->show(); | 406 | runwindow->removeButton->show(); |
407 | runwindow->installButton->show(); | 407 | runwindow->installButton->show(); |
408 | 408 | ||
409 | } | 409 | } |