Diffstat (limited to 'noncore/settings/packagemanager') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/ChangeLog | 8 | ||||
-rw-r--r-- | noncore/settings/packagemanager/README | 2 | ||||
-rw-r--r-- | noncore/settings/packagemanager/TODO | 14 | ||||
-rw-r--r-- | noncore/settings/packagemanager/installdlg.cpp | 84 | ||||
-rw-r--r-- | noncore/settings/packagemanager/installdlg.h | 7 | ||||
-rw-r--r-- | noncore/settings/packagemanager/mainwindow.cpp | 25 | ||||
-rw-r--r-- | noncore/settings/packagemanager/opie-packagemanager.control | 4 |
7 files changed, 93 insertions, 51 deletions
diff --git a/noncore/settings/packagemanager/ChangeLog b/noncore/settings/packagemanager/ChangeLog index c9e33c4..7799136 100644 --- a/noncore/settings/packagemanager/ChangeLog +++ b/noncore/settings/packagemanager/ChangeLog | |||
@@ -1 +1,9 @@ | |||
1 | 2004-11-18 Dan Williams <drw@handhelds.org> | ||
2 | |||
3 | * Released version 0.5.0 | ||
4 | * All v1.0 functionality implemented | ||
5 | * Implemented installation of local packages | ||
6 | * Implemented linking of non-root apps (using ipkg-link) | ||
7 | * Many UI tweaks for installation and filter dialogs | ||
8 | |||
1 | 2004-04-21 Dan Williams <drw@handhelds.org> | 9 | 2004-04-21 Dan Williams <drw@handhelds.org> |
diff --git a/noncore/settings/packagemanager/README b/noncore/settings/packagemanager/README index bf93c98..c34a6af 100644 --- a/noncore/settings/packagemanager/README +++ b/noncore/settings/packagemanager/README | |||
@@ -4,3 +4,3 @@ | |||
4 | /* ======================== | 4 | /* ======================== |
5 | /* Version 0.4.0 | 5 | /* Version 0.5.0 |
6 | /* | 6 | /* |
diff --git a/noncore/settings/packagemanager/TODO b/noncore/settings/packagemanager/TODO index 633c589..265beda 100644 --- a/noncore/settings/packagemanager/TODO +++ b/noncore/settings/packagemanager/TODO | |||
@@ -4,3 +4,3 @@ | |||
4 | /* ======================== | 4 | /* ======================== |
5 | /* Version 0.4.0 | 5 | /* Version 0.5.0 |
6 | /* | 6 | /* |
@@ -10,5 +10,5 @@ | |||
10 | 10 | ||
11 | --------------------------------------------- | 11 | ----------------------------------------------- |
12 | To-do for Opie-PackageManager - April, 2004 | 12 | To-do for Opie-PackageManager - November, 2004 |
13 | --------------------------------------------- | 13 | ----------------------------------------------- |
14 | 14 | ||
@@ -18,5 +18,3 @@ | |||
18 | 18 | ||
19 | 1. Link non-root destination apps | 19 | 1. Re-work package download dialog |
20 | 2. Implement QCOP interface for installing, removing, etc. | ||
21 | 3. Redesign configuration dialog | ||
22 | 20 | ||
@@ -26,2 +24,2 @@ | |||
26 | 24 | ||
27 | 1. ??? \ No newline at end of file | 25 | 1. Re-work server and destination tabs in configuration dialog \ No newline at end of file |
diff --git a/noncore/settings/packagemanager/installdlg.cpp b/noncore/settings/packagemanager/installdlg.cpp index 781f8f5..494603b 100644 --- a/noncore/settings/packagemanager/installdlg.cpp +++ b/noncore/settings/packagemanager/installdlg.cpp | |||
@@ -52,3 +52,3 @@ _;:, .> :=|. This file is free software; you can | |||
52 | 52 | ||
53 | InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &caption, bool showDestInfo, | 53 | InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &caption, |
54 | OPackage::Command command1, const QStringList &packages1, | 54 | OPackage::Command command1, const QStringList &packages1, |
@@ -58,2 +58,3 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &cap | |||
58 | , m_packman( pm ) | 58 | , m_packman( pm ) |
59 | , m_installFound( false ) | ||
59 | , m_numCommands( 0 ) | 60 | , m_numCommands( 0 ) |
@@ -68,2 +69,5 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &cap | |||
68 | ++m_numCommands; | 69 | ++m_numCommands; |
70 | |||
71 | if ( command1 == OPackage::Install ) | ||
72 | m_installFound = true; | ||
69 | } | 73 | } |
@@ -74,2 +78,5 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &cap | |||
74 | ++m_numCommands; | 78 | ++m_numCommands; |
79 | |||
80 | if ( command2 == OPackage::Install ) | ||
81 | m_installFound = true; | ||
75 | } | 82 | } |
@@ -80,2 +87,5 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &cap | |||
80 | ++m_numCommands; | 87 | ++m_numCommands; |
88 | |||
89 | if ( command3 == OPackage::Install ) | ||
90 | m_installFound = true; | ||
81 | } | 91 | } |
@@ -88,3 +98,3 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &cap | |||
88 | 98 | ||
89 | if ( showDestInfo ) | 99 | if ( m_installFound ) |
90 | { | 100 | { |
@@ -222,3 +232,3 @@ void InstallDlg::slotBtnStart() | |||
222 | QString dest; | 232 | QString dest; |
223 | if ( m_destination ) | 233 | if ( m_installFound ) |
224 | { | 234 | { |
@@ -239,2 +249,3 @@ void InstallDlg::slotBtnStart() | |||
239 | 249 | ||
250 | Opie::Core::OProcess process( this ); | ||
240 | for ( m_currCommand = 0; m_currCommand < m_numCommands; m_currCommand++ ) | 251 | for ( m_currCommand = 0; m_currCommand < m_numCommands; m_currCommand++ ) |
@@ -244,29 +255,50 @@ void InstallDlg::slotBtnStart() | |||
244 | this, SLOT(slotOutput(char*)), true ); | 255 | this, SLOT(slotOutput(char*)), true ); |
245 | } | ||
246 | slotProcessDone(0l); | ||
247 | 256 | ||
248 | // Get destination | 257 | // Link/Unlink application if the package was removed from or installed to a destination |
249 | /* | 258 | // other than root |
250 | if ( dest == "root" ) | 259 | if ( ( m_command[ m_currCommand ] == OPackage::Install && dest != "root" ) || |
260 | ( m_command[ m_currCommand ] == OPackage::Remove ) ) | ||
251 | { | 261 | { |
252 | slotProcessDone(0l); | 262 | //m_packman->findPackage( m_packages[ m_currCommand ]->destination() != "root"*/ ) |
253 | return; | ||
254 | } | ||
255 | 263 | ||
256 | m_destItem = m_packman->findConfItem( OConfItem::Destination, dest ); | 264 | // Loop through all package names in the command group |
257 | if ( m_destItem ) | 265 | for ( QStringList::Iterator it = m_packages[ m_currCommand ].begin(); |
266 | it != m_packages[ m_currCommand ].end(); | ||
267 | ++it ) | ||
258 | { | 268 | { |
259 | QString path = m_destItem->value(); | 269 | OPackage *currPackage = m_packman->findPackage( (*it) ); |
260 | Opie::Core::OProcess *process = new Opie::Core::OProcess( this, "ipkg-link process" ); | ||
261 | connect( process, SIGNAL(processExited(Opie::Core::OProcess*)), | ||
262 | this, SLOT(slotProcessDone(Opie::Core::OProcess*)) ); | ||
263 | 270 | ||
264 | *process << "ipkg-link" << "mount" << path; | 271 | // Skip package if it is not found or being removed from 'root' |
265 | if ( !process->start( Opie::Core::OProcess::NotifyOnExit, | 272 | if ( !currPackage || ( m_command[ m_currCommand ] == OPackage::Remove && |
273 | currPackage->destination() == "root" ) ) | ||
274 | continue; | ||
275 | |||
276 | // Display feedback to user | ||
277 | if ( m_command[ m_currCommand ] == OPackage::Install ) | ||
278 | m_output->append( tr( QString( "Running ipkg-link to link package '%1'." ) | ||
279 | .arg( currPackage->name() ) ) ); | ||
280 | else | ||
281 | m_output->append( tr( QString( "Running ipkg-link to remove links for package '%1'." ) | ||
282 | .arg( currPackage->name() ) ) ); | ||
283 | m_output->setCursorPosition( m_output->numLines(), 0 ); | ||
284 | |||
285 | // Execute ipkg-link | ||
286 | process.clearArguments(); | ||
287 | process << "ipkg-link" | ||
288 | << ( ( m_command[ m_currCommand ] == OPackage::Install ) ? "add" : "remove" ) | ||
289 | << currPackage->name(); | ||
290 | if ( !process.start( Opie::Core::OProcess::Block, | ||
266 | Opie::Core::OProcess::NoCommunication ) ) | 291 | Opie::Core::OProcess::NoCommunication ) ) |
267 | slotProcessDone( 0l ); | 292 | { |
268 | m_output->append( tr( "Starting ipkg-link to link installed applications." ) ); | 293 | slotProcessDone( 0x0 ); |
294 | m_output->append( tr( "Unable to run ipkg-link." ) ); | ||
269 | m_output->setCursorPosition( m_output->numLines(), 0 ); | 295 | m_output->setCursorPosition( m_output->numLines(), 0 ); |
296 | return; | ||
270 | } | 297 | } |
271 | */ | 298 | } |
299 | |||
300 | } | ||
301 | } | ||
302 | |||
303 | slotProcessDone( 0x0 ); | ||
272 | } | 304 | } |
@@ -275,4 +307,5 @@ void InstallDlg::slotProcessDone( Opie::Core::OProcess *proc ) | |||
275 | { | 307 | { |
276 | delete proc; | 308 | if ( proc ) |
277 | 309 | { | |
310 | // Display message pnly if linking was done | ||
278 | m_output->append( tr( "The package linking is done." ) ); | 311 | m_output->append( tr( "The package linking is done." ) ); |
@@ -280,2 +313,5 @@ void InstallDlg::slotProcessDone( Opie::Core::OProcess *proc ) | |||
280 | 313 | ||
314 | delete proc; | ||
315 | } | ||
316 | |||
281 | // All commands executed, allow user to close dialog | 317 | // All commands executed, allow user to close dialog |
diff --git a/noncore/settings/packagemanager/installdlg.h b/noncore/settings/packagemanager/installdlg.h index f45c17c..eabb717 100644 --- a/noncore/settings/packagemanager/installdlg.h +++ b/noncore/settings/packagemanager/installdlg.h | |||
@@ -57,4 +57,4 @@ class InstallDlg : public QWidget | |||
57 | public: | 57 | public: |
58 | InstallDlg( QWidget *parent = 0x0, OPackageManager *pm = 0x0, const QString &caption = QString::null, | 58 | InstallDlg( QWidget *parent = 0x0, OPackageManager *pm = 0x0, |
59 | bool showDestInfo = true, | 59 | const QString &caption = QString::null, |
60 | OPackage::Command command1 = OPackage::NotDefined, | 60 | OPackage::Command command1 = OPackage::NotDefined, |
@@ -69,2 +69,5 @@ private: | |||
69 | 69 | ||
70 | bool m_installFound; // Indicates if an install is being done, controls display of | ||
71 | // destination selection, available space | ||
72 | |||
70 | // UI controls | 73 | // UI controls |
diff --git a/noncore/settings/packagemanager/mainwindow.cpp b/noncore/settings/packagemanager/mainwindow.cpp index 459a75b..8a5b90c 100644 --- a/noncore/settings/packagemanager/mainwindow.cpp +++ b/noncore/settings/packagemanager/mainwindow.cpp | |||
@@ -314,3 +314,3 @@ void MainWindow::installLocalPackage( const QString &ipkFile ) | |||
314 | // Install selected file | 314 | // Install selected file |
315 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Install local package" ), true, | 315 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Install local package" ), |
316 | OPackage::Install, ipkFile ); | 316 | OPackage::Install, ipkFile ); |
@@ -388,3 +388,3 @@ void MainWindow::slotUpdate() | |||
388 | // Create package manager output widget | 388 | // Create package manager output widget |
389 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Update package information" ), false, | 389 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Update package information" ), |
390 | OPackage::Update ); | 390 | OPackage::Update ); |
@@ -400,3 +400,3 @@ void MainWindow::slotUpgrade() | |||
400 | // Create package manager output widget | 400 | // Create package manager output widget |
401 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Upgrade installed packages" ), false, | 401 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Upgrade installed packages" ), |
402 | OPackage::Upgrade ); | 402 | OPackage::Upgrade ); |
@@ -447,3 +447,3 @@ void MainWindow::slotDownload() | |||
447 | // Create package manager output widget | 447 | // Create package manager output widget |
448 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Download packages" ), false, | 448 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Download packages" ), |
449 | OPackage::Download, workingPackages ); | 449 | OPackage::Download, workingPackages ); |
@@ -522,14 +522,11 @@ void MainWindow::slotApply() | |||
522 | // Send command only if there are packages to process | 522 | // Send command only if there are packages to process |
523 | OPackage::Command removeCmd = OPackage::NotDefined; | 523 | OPackage::Command removeCmd = !removeList.isEmpty() ? OPackage::Remove |
524 | if ( !removeList.isEmpty() ) | 524 | : OPackage::NotDefined; |
525 | removeCmd = OPackage::Remove; | 525 | OPackage::Command installCmd = !installList.isEmpty() ? OPackage::Install |
526 | OPackage::Command installCmd = OPackage::NotDefined; | 526 | : OPackage::NotDefined; |
527 | if ( !installList.isEmpty() ) | 527 | OPackage::Command upgradeCmd = !upgradeList.isEmpty() ? OPackage::Upgrade |
528 | installCmd = OPackage::Install; | 528 | : OPackage::NotDefined; |
529 | OPackage::Command upgradeCmd = OPackage::NotDefined; | ||
530 | if ( !upgradeList.isEmpty() ) | ||
531 | upgradeCmd = OPackage::Upgrade; | ||
532 | 529 | ||
533 | // Create package manager output widget | 530 | // Create package manager output widget |
534 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Apply changes" ), !installList.isEmpty(), | 531 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Apply changes" ), |
535 | removeCmd, removeList, | 532 | removeCmd, removeList, |
diff --git a/noncore/settings/packagemanager/opie-packagemanager.control b/noncore/settings/packagemanager/opie-packagemanager.control index 5385ea5..aacd0ca 100644 --- a/noncore/settings/packagemanager/opie-packagemanager.control +++ b/noncore/settings/packagemanager/opie-packagemanager.control | |||
@@ -4,3 +4,3 @@ Priority: optional | |||
4 | Section: opie/settings | 4 | Section: opie/settings |
5 | Depends: task-opie-minimal, libopiecore2, libopieui2, libipkg (>=0.99.120) | 5 | Depends: task-opie-minimal, libopiecore2, libopieui2, libipkg (>=0.99.120), ipkg-link |
6 | Replaces: packagemanager | 6 | Replaces: packagemanager |
@@ -9,2 +9,2 @@ Maintainer: Dan Williams (drw@handhelds.org) | |||
9 | Description: Opie package management client | 9 | Description: Opie package management client |
10 | Version: 0.4.0$EXTRAVERSION | 10 | Version: 0.5.0$EXTRAVERSION |