RemoteLinux: Remove docker related device hack in install step

It's getting into the way with RL->RL setups.

Change-Id: I46e8330293da1ca6dfba00e413518fa3f16ef1d8
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
hjk
2022-10-14 17:48:39 +02:00
parent 7b0b127e90
commit 053990c357

View File

@@ -187,31 +187,21 @@ bool MakeInstallStep::init()
void MakeInstallStep::finish(bool success) void MakeInstallStep::finish(bool success)
{ {
if (success) { if (success) {
const bool hack = makeCommand().needsDevice();
const FilePath rootDir = installRoot().onDevice(makeCommand()); const FilePath rootDir = installRoot().onDevice(makeCommand());
m_deploymentData = DeploymentData(); m_deploymentData = DeploymentData();
m_deploymentData.setLocalInstallRoot(rootDir); m_deploymentData.setLocalInstallRoot(rootDir);
const int startPos = rootDir.toString().length(); const int startPos = rootDir.path().length();
const auto appFileNames = transform<QSet<QString>>(buildSystem()->applicationTargets(), const auto appFileNames = transform<QSet<QString>>(buildSystem()->applicationTargets(),
[](const BuildTargetInfo &appTarget) { return appTarget.targetFilePath.fileName(); }); [](const BuildTargetInfo &appTarget) { return appTarget.targetFilePath.fileName(); });
auto handleFile = [this, &appFileNames, startPos, hack](const FilePath &filePath) { auto handleFile = [this, &appFileNames, startPos](const FilePath &filePath) {
const DeployableFile::Type type = appFileNames.contains(filePath.fileName()) const DeployableFile::Type type = appFileNames.contains(filePath.fileName())
? DeployableFile::TypeExecutable ? DeployableFile::TypeExecutable
: DeployableFile::TypeNormal; : DeployableFile::TypeNormal;
QString targetDir = filePath.parentDir().toString().mid(startPos); const QString targetDir = filePath.parentDir().path().mid(startPos);
// FIXME: This is conceptually the wrong place, but currently "downstream" like
// the rsync step doesn't handle full remote paths here.
targetDir = FilePath::fromString(targetDir).path();
// FIXME: Hack, Part#2: If the build was indeed not local, drop the remoteness.
// As we rely on shared build directory, this "maps" to the host.
if (hack)
m_deploymentData.addFile(FilePath::fromString(filePath.path()), targetDir, type);
else
m_deploymentData.addFile(filePath, targetDir, type); m_deploymentData.addFile(filePath, targetDir, type);
return true; return true;
}; };