Repository: conan-io/conan

Issue:
conan download only respects the first repository in remotes.txt
Scenario:
I want to download a package from an Artifactory repository called 'conan-local' with the following command
`conan download package/version@user/channel`

But the package gets downloaded only if the repository which contains the package is the first in the list of remotes in registry.txt.

registry.txt:
```
conan-local http://...
other-repo http://...
```

If the repository which contains the package is not the first in the list of remotes, the following error occurs:
`ERROR: 'package/version@user/channel' not found in remote`

registry.txt:
```
other-repo http://...
conan-local http://...
```

I think there is also a mistake in the documentation for the conan download command: 
"Only if a *reference* is specified, it will download all packages from the specified remote. Otherwise, it will search sequentially in the configured remotes."
should be:
"Only if a **remote** is specified, it will download all packages from the specified remote. Otherwise, it will search sequentially in the configured remotes."

Tested with Conan 1.5.0 + Conan 1.6.0 using Python 3.6.5 running in Windows 7 and Ubuntu 14.04



Discussion:
Hi!

I am not sure if I understand this issue.
If you specify ``conan download <pkg-ref> -r=myremote`` it will get the packages from that remote. Not specifying the remote equals to defaulting to the first remote in the list.

Yes, it might happen that the docs are a bit outdated, but the behavior seems to be correct. Could you please clarify which behavior would you expect? Thanks!

Hello memsharded,

I would expect that not specifying a remote would "search sequentially in the configured remotes" as stated in the documentation.

Text from hopefully corrected documentation:
 "Only if a **remote** is specified, it will download all packages from the specified remote. Otherwise, it will search sequentially in the configured remotes"
Which means for me: "If a remote is not specified, it will search sequentially in the configured remotes"?

You said "Not specifying the remote equals to defaulting to the first remote in the list". I could not find this in the documentation.
 
I hope you can help me clarify this.

Best regards
Hi @ahauan4 

I think this is somehow outdated documentation, the behavior is not intended to be the same. The ``conan download`` behavior is not transitive, and it is not configuration (settings/profile) based. It just downloads the recipe and the binaries. It is mainly used for maintenance and mirroring operations like ``conan download`` from a specific remote + ``conan upload`` to a different remote. 

This is why the behavior is not the same as install, it doesn't make much sense to start looking for the packages in different remotes. So I would say that such docs could be because of some copy & paste from "conan install" or something like that.

Thanks for the feedback!

Resolving patch:
diff --git a/conans/client/command.py b/conans/client/command.py
--- a/conans/client/command.py
+++ b/conans/client/command.py
@@ -256,8 +256,8 @@ def download(self, *args):
         specifying the recipe reference and package ID to be installed. Not transitive, requirements
         of the specified reference will NOT be retrieved. Useful together with 'conan copy' to
         automate the promotion of packages to a different user/channel. Only if a reference
-        is specified, it will download all packages from the specified remote. Otherwise, it will
-        search sequentially in the configured remotes.
+        is specified, it will download all packages from the specified remote. If no remote is
+        specified, it will use the default remote.
         """
 
         parser = argparse.ArgumentParser(description=self.download.__doc__, prog="conan download")


Test patch: