summaryrefslogtreecommitdiff
path: root/noncore
authordrw <drw>2004-12-21 19:58:58 (UTC)
committer drw <drw>2004-12-21 19:58:58 (UTC)
commit2e21be2e93866511f55e2a200514b3ce15b14791 (patch) (side-by-side diff)
tree0aa6ca907bfbcfc5b8abbc5a83f0a2cae70730fe /noncore
parent570c8709d1d7622e2a57432f40a67213216d2606 (diff)
downloadopie-2e21be2e93866511f55e2a200514b3ce15b14791.zip
opie-2e21be2e93866511f55e2a200514b3ce15b14791.tar.gz
opie-2e21be2e93866511f55e2a200514b3ce15b14791.tar.bz2
Fix app linking to link all dependent packages as well as selected packages.
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/installdlg.cpp52
-rw-r--r--noncore/settings/packagemanager/installdlg.h2
2 files changed, 35 insertions, 19 deletions
diff --git a/noncore/settings/packagemanager/installdlg.cpp b/noncore/settings/packagemanager/installdlg.cpp
index 494603b..985e2bd 100644
--- a/noncore/settings/packagemanager/installdlg.cpp
+++ b/noncore/settings/packagemanager/installdlg.cpp
@@ -56,3 +56,3 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &cap
OPackage::Command command3, const QStringList &packages3 )
- : QWidget( 0x0 )
+ : QWidget( 0l )
, m_packman( pm )
@@ -61,3 +61,3 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &cap
, m_currCommand( 0 )
- , m_destItem( 0x0 )
+ , m_destItem( 0l )
{
@@ -118,4 +118,4 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &cap
{
- m_destination = 0x0;
- m_availSpace = 0x0;
+ m_destination = 0l;
+ m_availSpace = 0l;
}
@@ -256,8 +256,5 @@ void InstallDlg::slotBtnStart()
- // 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 ) )
+ if ( m_command[ m_currCommand ] == OPackage::Remove )
{
- //m_packman->findPackage( m_packages[ m_currCommand ]->destination() != "root"*/ )
+ // Unlink application if the package was removed
@@ -276,8 +273,4 @@ void InstallDlg::slotBtnStart()
// 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->append( tr( QString( "Running ipkg-link to remove links for package '%1'." )
+ .arg( currPackage->name() ) ) );
m_output->setCursorPosition( m_output->numLines(), 0 );
@@ -292,3 +285,3 @@ void InstallDlg::slotBtnStart()
{
- slotProcessDone( 0x0 );
+ slotProcessDone( 0l );
m_output->append( tr( "Unable to run ipkg-link." ) );
@@ -298,3 +291,26 @@ void InstallDlg::slotBtnStart()
}
-
+ }
+ else if ( m_command[ m_currCommand ] == OPackage::Install && dest != "root" )
+ {
+ // Link applications in the destination directory
+
+ m_output->append( tr( "Running ipkg-link to link packages in '%1'." ).arg( dest ) );
+ m_output->setCursorPosition( m_output->numLines(), 0 );
+
+ QString destPath;
+ OConfItem *destItem = m_packman->findConfItem( OConfItem::Destination, dest );
+
+ // Execute ipkg-link
+ process.clearArguments();
+ process << "ipkg-link"
+ << "mount"
+ << destItem->value();
+ if ( !process.start( Opie::Core::OProcess::Block,
+ Opie::Core::OProcess::NoCommunication ) )
+ {
+ slotProcessDone( 0l );
+ m_output->append( tr( "Unable to run ipkg-link." ) );
+ m_output->setCursorPosition( m_output->numLines(), 0 );
+ return;
+ }
}
@@ -302,3 +318,3 @@ void InstallDlg::slotBtnStart()
- slotProcessDone( 0x0 );
+ slotProcessDone( 0l );
}
diff --git a/noncore/settings/packagemanager/installdlg.h b/noncore/settings/packagemanager/installdlg.h
index eabb717..7a64fe0 100644
--- a/noncore/settings/packagemanager/installdlg.h
+++ b/noncore/settings/packagemanager/installdlg.h
@@ -57,3 +57,3 @@ class InstallDlg : public QWidget
public:
- InstallDlg( QWidget *parent = 0x0, OPackageManager *pm = 0x0,
+ InstallDlg( QWidget *parent = 0l, OPackageManager *pm = 0l,
const QString &caption = QString::null,