From 541ddd1ff756fb9d8f6c6abe1734d40c813812f8 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 13 Oct 2022 14:14:51 +0200 Subject: [PATCH] RemoteLinux: Be explicit about the current rsync support We currently only transfer host->remote device (or back), not host->host or remote->remote. Inform the user if we hit an (currently) unsupported combination. Change-Id: Icd33414d7d0bc2b5db284a62b5d757989f1596c6 Reviewed-by: Christian Kandeler --- src/plugins/remotelinux/rsyncdeploystep.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/plugins/remotelinux/rsyncdeploystep.cpp b/src/plugins/remotelinux/rsyncdeploystep.cpp index ddd9079c125..1f6ae266282 100644 --- a/src/plugins/remotelinux/rsyncdeploystep.cpp +++ b/src/plugins/remotelinux/rsyncdeploystep.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -152,7 +153,13 @@ RsyncDeployStep::RsyncDeployStep(BuildStepList *bsl, Id id) BoolAspect::LabelPlacement::InExtraLabel); ignoreMissingFiles->setValue(false); - setInternalInitializer([service, flags, ignoreMissingFiles] { + setInternalInitializer([this, service, flags, ignoreMissingFiles] { + if (BuildDeviceKitAspect::device(kit()) == DeviceKitAspect::device(kit())) { + // rsync transfer on the same device currently not implemented + // and typically not wanted. + return CheckResult::failure( + Tr::tr("rsync is only supported for transfers between different devices.")); + } service->setIgnoreMissingFiles(ignoreMissingFiles->value()); service->setFlags(flags->value()); return service->isDeploymentPossible();