author | drw <drw> | 2004-12-21 19:58:58 (UTC) |
---|---|---|
committer | drw <drw> | 2004-12-21 19:58:58 (UTC) |
commit | 2e21be2e93866511f55e2a200514b3ce15b14791 (patch) (unidiff) | |
tree | 0aa6ca907bfbcfc5b8abbc5a83f0a2cae70730fe /noncore | |
parent | 570c8709d1d7622e2a57432f40a67213216d2606 (diff) | |
download | opie-2e21be2e93866511f55e2a200514b3ce15b14791.zip opie-2e21be2e93866511f55e2a200514b3ce15b14791.tar.gz opie-2e21be2e93866511f55e2a200514b3ce15b14791.tar.bz2 |
Fix app linking to link all dependent packages as well as selected packages.
-rw-r--r-- | noncore/settings/packagemanager/installdlg.cpp | 46 | ||||
-rw-r--r-- | noncore/settings/packagemanager/installdlg.h | 2 |
2 files changed, 32 insertions, 16 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 | |||
56 | OPackage::Command command3, const QStringList &packages3 ) | 56 | OPackage::Command command3, const QStringList &packages3 ) |
57 | : QWidget( 0x0 ) | 57 | : QWidget( 0l ) |
58 | , m_packman( pm ) | 58 | , m_packman( pm ) |
@@ -61,3 +61,3 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &cap | |||
61 | , m_currCommand( 0 ) | 61 | , m_currCommand( 0 ) |
62 | , m_destItem( 0x0 ) | 62 | , m_destItem( 0l ) |
63 | { | 63 | { |
@@ -118,4 +118,4 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &cap | |||
118 | { | 118 | { |
119 | m_destination = 0x0; | 119 | m_destination = 0l; |
120 | m_availSpace = 0x0; | 120 | m_availSpace = 0l; |
121 | } | 121 | } |
@@ -256,8 +256,5 @@ void InstallDlg::slotBtnStart() | |||
256 | 256 | ||
257 | // Link/Unlink application if the package was removed from or installed to a destination | 257 | if ( m_command[ m_currCommand ] == OPackage::Remove ) |
258 | // other than root | ||
259 | if ( ( m_command[ m_currCommand ] == OPackage::Install && dest != "root" ) || | ||
260 | ( m_command[ m_currCommand ] == OPackage::Remove ) ) | ||
261 | { | 258 | { |
262 | //m_packman->findPackage( m_packages[ m_currCommand ]->destination() != "root"*/ ) | 259 | // Unlink application if the package was removed |
263 | 260 | ||
@@ -276,6 +273,2 @@ void InstallDlg::slotBtnStart() | |||
276 | // Display feedback to user | 273 | // 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'." ) | 274 | m_output->append( tr( QString( "Running ipkg-link to remove links for package '%1'." ) |
@@ -292,3 +285,3 @@ void InstallDlg::slotBtnStart() | |||
292 | { | 285 | { |
293 | slotProcessDone( 0x0 ); | 286 | slotProcessDone( 0l ); |
294 | m_output->append( tr( "Unable to run ipkg-link." ) ); | 287 | m_output->append( tr( "Unable to run ipkg-link." ) ); |
@@ -298,3 +291,26 @@ void InstallDlg::slotBtnStart() | |||
298 | } | 291 | } |
292 | } | ||
293 | else if ( m_command[ m_currCommand ] == OPackage::Install && dest != "root" ) | ||
294 | { | ||
295 | // Link applications in the destination directory | ||
299 | 296 | ||
297 | m_output->append( tr( "Running ipkg-link to link packages in '%1'." ).arg( dest ) ); | ||
298 | m_output->setCursorPosition( m_output->numLines(), 0 ); | ||
299 | |||
300 | QString destPath; | ||
301 | OConfItem *destItem = m_packman->findConfItem( OConfItem::Destination, dest ); | ||
302 | |||
303 | // Execute ipkg-link | ||
304 | process.clearArguments(); | ||
305 | process << "ipkg-link" | ||
306 | << "mount" | ||
307 | << destItem->value(); | ||
308 | if ( !process.start( Opie::Core::OProcess::Block, | ||
309 | Opie::Core::OProcess::NoCommunication ) ) | ||
310 | { | ||
311 | slotProcessDone( 0l ); | ||
312 | m_output->append( tr( "Unable to run ipkg-link." ) ); | ||
313 | m_output->setCursorPosition( m_output->numLines(), 0 ); | ||
314 | return; | ||
315 | } | ||
300 | } | 316 | } |
@@ -302,3 +318,3 @@ void InstallDlg::slotBtnStart() | |||
302 | 318 | ||
303 | slotProcessDone( 0x0 ); | 319 | slotProcessDone( 0l ); |
304 | } | 320 | } |
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 | |||
57 | public: | 57 | public: |
58 | InstallDlg( QWidget *parent = 0x0, OPackageManager *pm = 0x0, | 58 | InstallDlg( QWidget *parent = 0l, OPackageManager *pm = 0l, |
59 | const QString &caption = QString::null, | 59 | const QString &caption = QString::null, |