Commit 9faa4b5a authored by ck's avatar ck
Browse files

Maemo: Only run dpkg if the package has been newly deployed.

Reviewed-by: kh1
parent 0a9087ee
...@@ -127,6 +127,9 @@ void AbstractMaemoRunControl::startDeployment(bool forDebugging) ...@@ -127,6 +127,9 @@ void AbstractMaemoRunControl::startDeployment(bool forDebugging)
m_deployables.append(Deployable(packageFileName(), m_deployables.append(Deployable(packageFileName(),
QFileInfo(executableOnHost()).canonicalPath(), QFileInfo(executableOnHost()).canonicalPath(),
&MaemoRunConfiguration::wasDeployed)); &MaemoRunConfiguration::wasDeployed));
m_needsInstall = true;
} else {
m_needsInstall = false;
} }
if (forDebugging if (forDebugging
&& m_runConfig->debuggingHelpersNeedDeployment(m_devConfig.host)) { && m_runConfig->debuggingHelpersNeedDeployment(m_devConfig.host)) {
...@@ -317,9 +320,11 @@ QString AbstractMaemoRunControl::remoteInstallCommand() const ...@@ -317,9 +320,11 @@ QString AbstractMaemoRunControl::remoteInstallCommand() const
const QString AbstractMaemoRunControl::targetCmdLinePrefix() const const QString AbstractMaemoRunControl::targetCmdLinePrefix() const
{ {
return QString::fromLocal8Bit("%1 && %2 chmod u+x %3 && source /etc/profile && ") const QString &installPrefix = m_needsInstall
.arg(remoteInstallCommand()).arg(remoteSudo()) ? remoteInstallCommand() + QLatin1String(" && ")
.arg(executableFilePathOnTarget()); : QString();
return QString::fromLocal8Bit("%1%2 chmod u+x %3 && source /etc/profile && ")
.arg(installPrefix).arg(remoteSudo()).arg(executableFilePathOnTarget());
} }
QString AbstractMaemoRunControl::targetCmdLineSuffix() const QString AbstractMaemoRunControl::targetCmdLineSuffix() const
......
...@@ -125,6 +125,7 @@ private: ...@@ -125,6 +125,7 @@ private:
updateFunc updateTimestamp; updateFunc updateTimestamp;
}; };
QList<Deployable> m_deployables; QList<Deployable> m_deployables;
bool m_needsInstall;
}; };
class MaemoRunControl : public AbstractMaemoRunControl class MaemoRunControl : public AbstractMaemoRunControl
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment