summaryrefslogtreecommitdiff
path: root/noncore/settings
Side-by-side diff
Diffstat (limited to 'noncore/settings') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/ChangeLog8
-rw-r--r--noncore/settings/packagemanager/README2
-rw-r--r--noncore/settings/packagemanager/TODO14
-rw-r--r--noncore/settings/packagemanager/installdlg.cpp104
-rw-r--r--noncore/settings/packagemanager/installdlg.h7
-rw-r--r--noncore/settings/packagemanager/mainwindow.cpp29
-rw-r--r--noncore/settings/packagemanager/opie-packagemanager.control4
7 files changed, 105 insertions, 63 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 @@
+2004-11-18 Dan Williams <drw@handhelds.org>
+
+ * Released version 0.5.0
+ * All v1.0 functionality implemented
+ * Implemented installation of local packages
+ * Implemented linking of non-root apps (using ipkg-link)
+ * Many UI tweaks for installation and filter dialogs
+
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 @@
/* ========================
-/* Version 0.4.0
+/* Version 0.5.0
/*
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 @@
/* ========================
-/* Version 0.4.0
+/* Version 0.5.0
/*
@@ -10,5 +10,5 @@
----------------------------------------------
- To-do for Opie-PackageManager - April, 2004
----------------------------------------------
+-----------------------------------------------
+ To-do for Opie-PackageManager - November, 2004
+-----------------------------------------------
@@ -18,5 +18,3 @@
-1. Link non-root destination apps
-2. Implement QCOP interface for installing, removing, etc.
-3. Redesign configuration dialog
+1. Re-work package download dialog
@@ -26,2 +24,2 @@
-1. ??? \ No newline at end of file
+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
-InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &caption, bool showDestInfo,
+InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &caption,
OPackage::Command command1, const QStringList &packages1,
@@ -58,2 +58,3 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &cap
, m_packman( pm )
+ , m_installFound( false )
, m_numCommands( 0 )
@@ -68,2 +69,5 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &cap
++m_numCommands;
+
+ if ( command1 == OPackage::Install )
+ m_installFound = true;
}
@@ -74,2 +78,5 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &cap
++m_numCommands;
+
+ if ( command2 == OPackage::Install )
+ m_installFound = true;
}
@@ -80,2 +87,5 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &cap
++m_numCommands;
+
+ if ( command3 == OPackage::Install )
+ m_installFound = true;
}
@@ -88,3 +98,3 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &cap
- if ( showDestInfo )
+ if ( m_installFound )
{
@@ -222,3 +232,3 @@ void InstallDlg::slotBtnStart()
QString dest;
- if ( m_destination )
+ if ( m_installFound )
{
@@ -239,2 +249,3 @@ void InstallDlg::slotBtnStart()
+ Opie::Core::OProcess process( this );
for ( m_currCommand = 0; m_currCommand < m_numCommands; m_currCommand++ )
@@ -244,29 +255,50 @@ void InstallDlg::slotBtnStart()
this, SLOT(slotOutput(char*)), true );
+
+ // Link/Unlink application if the package was removed from or installed to a destination
+ // other than root
+ if ( ( m_command[ m_currCommand ] == OPackage::Install && dest != "root" ) ||
+ ( m_command[ m_currCommand ] == OPackage::Remove ) )
+ {
+ //m_packman->findPackage( m_packages[ m_currCommand ]->destination() != "root"*/ )
+
+ // Loop through all package names in the command group
+ for ( QStringList::Iterator it = m_packages[ m_currCommand ].begin();
+ it != m_packages[ m_currCommand ].end();
+ ++it )
+ {
+ OPackage *currPackage = m_packman->findPackage( (*it) );
+
+ // Skip package if it is not found or being removed from 'root'
+ if ( !currPackage || ( m_command[ m_currCommand ] == OPackage::Remove &&
+ currPackage->destination() == "root" ) )
+ continue;
+
+ // Display feedback to user
+ if ( m_command[ m_currCommand ] == OPackage::Install )
+ m_output->append( tr( QString( "Running ipkg-link to link package '%1'." )
+ .arg( currPackage->name() ) ) );
+ else
+ m_output->append( tr( QString( "Running ipkg-link to remove links for package '%1'." )
+ .arg( currPackage->name() ) ) );
+ m_output->setCursorPosition( m_output->numLines(), 0 );
+
+ // Execute ipkg-link
+ process.clearArguments();
+ process << "ipkg-link"
+ << ( ( m_command[ m_currCommand ] == OPackage::Install ) ? "add" : "remove" )
+ << currPackage->name();
+ if ( !process.start( Opie::Core::OProcess::Block,
+ Opie::Core::OProcess::NoCommunication ) )
+ {
+ slotProcessDone( 0x0 );
+ m_output->append( tr( "Unable to run ipkg-link." ) );
+ m_output->setCursorPosition( m_output->numLines(), 0 );
+ return;
+ }
+ }
+
+ }
}
- slotProcessDone(0l);
-
- // Get destination
-/*
- if ( dest == "root" )
- {
- slotProcessDone(0l);
- return;
- }
-
- m_destItem = m_packman->findConfItem( OConfItem::Destination, dest );
- if ( m_destItem )
- {
- QString path = m_destItem->value();
- Opie::Core::OProcess *process = new Opie::Core::OProcess( this, "ipkg-link process" );
- connect( process, SIGNAL(processExited(Opie::Core::OProcess*)),
- this, SLOT(slotProcessDone(Opie::Core::OProcess*)) );
-
- *process << "ipkg-link" << "mount" << path;
- if ( !process->start( Opie::Core::OProcess::NotifyOnExit,
- Opie::Core::OProcess::NoCommunication ) )
- slotProcessDone( 0l );
- m_output->append( tr( "Starting ipkg-link to link installed applications." ) );
- m_output->setCursorPosition( m_output->numLines(), 0 );
- }
-*/
+
+ slotProcessDone( 0x0 );
}
@@ -275,7 +307,11 @@ void InstallDlg::slotProcessDone( Opie::Core::OProcess *proc )
{
- delete proc;
-
- m_output->append( tr( "The package linking is done." ) );
- m_output->setCursorPosition( m_output->numLines(), 0 );
-
+ if ( proc )
+ {
+ // Display message pnly if linking was done
+ m_output->append( tr( "The package linking is done." ) );
+ m_output->setCursorPosition( m_output->numLines(), 0 );
+
+ delete proc;
+ }
+
// 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
public:
- InstallDlg( QWidget *parent = 0x0, OPackageManager *pm = 0x0, const QString &caption = QString::null,
- bool showDestInfo = true,
+ InstallDlg( QWidget *parent = 0x0, OPackageManager *pm = 0x0,
+ const QString &caption = QString::null,
OPackage::Command command1 = OPackage::NotDefined,
@@ -68,2 +68,5 @@ private:
OPackageManager *m_packman; // Pointer to application instance of package manager
+
+ bool m_installFound; // Indicates if an install is being done, controls display of
+ // destination selection, available space
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,4 +314,4 @@ void MainWindow::installLocalPackage( const QString &ipkFile )
// Install selected file
- InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Install local package" ), true,
- OPackage::Install, ipkFile );
+ InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Install local package" ),
+ OPackage::Install, ipkFile );
connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) );
@@ -388,3 +388,3 @@ void MainWindow::slotUpdate()
// Create package manager output widget
- InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Update package information" ), false,
+ InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Update package information" ),
OPackage::Update );
@@ -400,3 +400,3 @@ void MainWindow::slotUpgrade()
// Create package manager output widget
- InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Upgrade installed packages" ), false,
+ InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Upgrade installed packages" ),
OPackage::Upgrade );
@@ -447,4 +447,4 @@ void MainWindow::slotDownload()
// Create package manager output widget
- InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Download packages" ), false,
- OPackage::Download, workingPackages );
+ InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Download packages" ),
+ OPackage::Download, workingPackages );
connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) );
@@ -522,14 +522,11 @@ void MainWindow::slotApply()
// Send command only if there are packages to process
- OPackage::Command removeCmd = OPackage::NotDefined;
- if ( !removeList.isEmpty() )
- removeCmd = OPackage::Remove;
- OPackage::Command installCmd = OPackage::NotDefined;
- if ( !installList.isEmpty() )
- installCmd = OPackage::Install;
- OPackage::Command upgradeCmd = OPackage::NotDefined;
- if ( !upgradeList.isEmpty() )
- upgradeCmd = OPackage::Upgrade;
+ OPackage::Command removeCmd = !removeList.isEmpty() ? OPackage::Remove
+ : OPackage::NotDefined;
+ OPackage::Command installCmd = !installList.isEmpty() ? OPackage::Install
+ : OPackage::NotDefined;
+ OPackage::Command upgradeCmd = !upgradeList.isEmpty() ? OPackage::Upgrade
+ : OPackage::NotDefined;
// Create package manager output widget
- InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Apply changes" ), !installList.isEmpty(),
+ InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Apply changes" ),
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
Section: opie/settings
-Depends: task-opie-minimal, libopiecore2, libopieui2, libipkg (>=0.99.120)
+Depends: task-opie-minimal, libopiecore2, libopieui2, libipkg (>=0.99.120), ipkg-link
Replaces: packagemanager
@@ -9,2 +9,2 @@ Maintainer: Dan Williams (drw@handhelds.org)
Description: Opie package management client
-Version: 0.4.0$EXTRAVERSION
+Version: 0.5.0$EXTRAVERSION