Diffstat (limited to 'core/launcher/packageslave.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/launcher/packageslave.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/core/launcher/packageslave.cpp b/core/launcher/packageslave.cpp index 0461432..abbc610 100644 --- a/core/launcher/packageslave.cpp +++ b/core/launcher/packageslave.cpp | |||
@@ -62,12 +62,16 @@ void PackageHandler::qcopMessage( const QCString &msg, const QByteArray &data ) | |||
62 | QDataStream stream( data, IO_ReadOnly ); | 62 | QDataStream stream( data, IO_ReadOnly ); |
63 | 63 | ||
64 | if ( msg == "installPackage(QString)" ) { | 64 | if ( msg == "installPackage(QString)" ) { |
65 | QString file; | 65 | QString file; |
66 | stream >> file; | 66 | stream >> file; |
67 | installPackage( file ); | 67 | installPackage( file ); |
68 | } else if ( msg == "installPackage(QString,QString)" ) { | ||
69 | QString file, dest; | ||
70 | stream >> file >> dest; | ||
71 | installPackage( file, dest ); | ||
68 | } else if ( msg == "removePackage(QString)" ) { | 72 | } else if ( msg == "removePackage(QString)" ) { |
69 | QString file; | 73 | QString file; |
70 | stream >> file; | 74 | stream >> file; |
71 | removePackage( file ); | 75 | removePackage( file ); |
72 | } else if ( msg == "addPackageFiles(QString,QString)" ) { | 76 | } else if ( msg == "addPackageFiles(QString,QString)" ) { |
73 | QString location, listfile; | 77 | QString location, listfile; |
@@ -90,22 +94,28 @@ void PackageHandler::qcopMessage( const QCString &msg, const QByteArray &data ) | |||
90 | stream >> size; | 94 | stream >> size; |
91 | stream >> path; | 95 | stream >> path; |
92 | prepareInstall( size, path ); | 96 | prepareInstall( size, path ); |
93 | } | 97 | } |
94 | } | 98 | } |
95 | 99 | ||
96 | void PackageHandler::installPackage( const QString &package ) | 100 | void PackageHandler::installPackage( const QString &package, const QString &dest ) |
97 | { | 101 | { |
98 | if ( mNoSpaceLeft ) { | 102 | if ( mNoSpaceLeft ) { |
99 | mNoSpaceLeft = FALSE; | 103 | mNoSpaceLeft = FALSE; |
100 | // Don't emit that for now, I still couldn't test it (Wener) | 104 | // Don't emit that for now, I still couldn't test it (Wener) |
101 | //sendReply( "installFailed(QString)", package ); | 105 | //sendReply( "installFailed(QString)", package ); |
102 | //return; | 106 | //return; |
103 | } | 107 | } |
104 | 108 | ||
105 | currentProcess = new QProcess( QStringList() << "ipkg" << "install" << package ); // No tr | 109 | QStringList cmd; |
110 | cmd << "ipkg"; | ||
111 | if ( !dest.isEmpty() ) { | ||
112 | cmd << "-d" << dest; | ||
113 | } | ||
114 | cmd << "install" << package; | ||
115 | currentProcess = new QProcess( cmd ); // No tr | ||
106 | connect( currentProcess, SIGNAL( processExited() ), SLOT( iProcessExited() ) ); | 116 | connect( currentProcess, SIGNAL( processExited() ), SLOT( iProcessExited() ) ); |
107 | connect( currentProcess, SIGNAL( readyReadStdout() ), SLOT( readyReadStdout() ) ); | 117 | connect( currentProcess, SIGNAL( readyReadStdout() ), SLOT( readyReadStdout() ) ); |
108 | connect( currentProcess, SIGNAL( readyReadStderr() ), SLOT( readyReadStderr() ) ); | 118 | connect( currentProcess, SIGNAL( readyReadStderr() ), SLOT( readyReadStderr() ) ); |
109 | currentPackage = package; | 119 | currentPackage = package; |
110 | 120 | ||
111 | currentProcessError=""; | 121 | currentProcessError=""; |