Repository: conda/conda

Issue:
conda install --offline still need net connection 
<!--
Hi!  Read this; it's important.

This is an issue tracker for conda -- the package manager.  File feature requests
for conda here, as well as bug reports about something conda has messed up.

If your issue is a bug report for:
  * a specific conda package from Anaconda ('defaults' channel):
      ==> file at https://github.com/ContinuumIO/anaconda-issues
  * a specific conda package from conda-forge:
      ==> file at the corresponding feedstock under https://github.com/conda-forge
  * repo.anaconda.com access and service:
      ==> file at https://github.com/ContinuumIO/anaconda-issues
  * anaconda.org access and service:
      ==> file at https://anaconda.org/contact/report
  * commands under 'conda build':
      ==> file at https://github.com/conda/conda-build
  * commands under 'conda env':
      ==> please file it here!
  * all other conda commands that start with 'conda':
      ==> please file it here!

If you continue on,

   **please include all requested information below.**

If a maintainer determines the information is required to understand 
your issue, and if it is not provided, your issue may be
closed automatically.

-->

## Current Behavior
<!-- What actually happens?
     If you want to include console output, please use "Steps to Reproduce" below. -->


### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
     Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
```
Dear all, 

I want update anaconda in a offline mechine, I rsync /pkgs files and use commend, 
conda update --all --offline
returns some errors:

CondaError: RuntimeError('EnforceUnusedAdapter called with url https://repo.continuum.io/pkgs/free/linux-64/blas-1.0-mkl.tar.bz2\nThis command is using a remote connection in offline mode.\n',)
CondaError: RuntimeError('EnforceUnusedAdapter called with url https://repo.continuum.io/pkgs/free/linux-64/blas-1.0-mkl.tar.bz2\nThis command is using a remote connection in offline mode.\n',)
CondaError: RuntimeError('EnforceUnusedAdapter called with url https://repo.continuum.io/pkgs/free/linux-64/blas-1.0-mkl.tar.bz2\nThis command is using a remote connection in offline mode.\n',)

here is detail log
[log.txt](https://github.com/conda/conda/files/2665227/log.txt)

Thanks. 
```


## Expected Behavior
<!-- What do you think should happen? -->


## Environment Information
<details open><summary><code>`conda info`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda info' -->

```
Current conda install:

               platform : linux-64
          conda version : 4.3.22
       conda is private : False
      conda-env version : 4.3.22
    conda-build version : 3.0.3
         python version : 3.5.3.final.0
       requests version : 2.14.2
       root environment : /home/zhangji/python/anaconda3  (writable)
    default environment : /home/zhangji/python/anaconda3
       envs directories : /home/zhangji/python/anaconda3/envs
                          /home/zhangji/.conda/envs
          package cache : /home/zhangji/python/anaconda3/pkgs
                          /home/zhangji/.conda/pkgs
           channel URLs : https://repo.continuum.io/pkgs/free/linux-64
                          https://repo.continuum.io/pkgs/free/noarch
                          https://repo.continuum.io/pkgs/r/linux-64
                          https://repo.continuum.io/pkgs/r/noarch
                          https://repo.continuum.io/pkgs/pro/linux-64
                          https://repo.continuum.io/pkgs/pro/noarch
            config file : None
             netrc file : None
           offline mode : False
             user-agent : conda/4.3.22 requests/2.14.2 CPython/3.5.3 Linux/2.6.32-504.el6.x86_64 CentOS/6.6 glibc/2.12
                UID:GID : 526:507

```
</p></details>


<details open><summary><code>`conda config --show-sources`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda config --show-sources' -->

```

```
</p></details>


<details><summary><code>`conda list --show-channel-urls`</code></summary><p>
<!-- between the ticks below, paste the output of 'conda list --show-channel-urls' -->

```
# packages in environment at /home/zhangji/python/anaconda3:
#
_license                  1.1                      py35_1    defaults
alabaster                 0.7.10                   py35_0    defaults
anaconda                  custom                   py35_0    defaults
anaconda-client           1.6.3                    py35_0    defaults
anaconda-navigator        1.6.3                    py35_0    defaults
anaconda-project          0.6.0                    py35_0    defaults
argcomplete               1.0.0                    py35_1    defaults
asn1crypto                0.22.0                   py35_0    defaults
astroid                   1.4.9                    py35_0    defaults
astropy                   2.0                 np112py35_0    defaults
babel                     2.4.0                    py35_0    defaults
backports                 1.0                      py35_0    defaults
beautifulsoup4            4.6.0                    py35_0    defaults
bitarray                  0.8.1                    py35_0    defaults
bkcharts                  0.2                      py35_0    defaults
blaze                     0.10.1                   py35_0    defaults
bleach                    1.5.0                    py35_0    defaults
bokeh                     0.12.6                   py35_0    defaults
boto                      2.47.0                   py35_0    defaults
bottleneck                1.2.1               np112py35_0    defaults
Bratu3D                   0.0.0                     <pip>
cairo                     1.14.8                        0    defaults
cffi                      1.10.0                   py35_0    defaults
chardet                   3.0.4                    py35_0    defaults
chest                     0.2.3                    py35_0    defaults
click                     6.7                      py35_0    defaults
cloudpickle               0.2.2                    py35_0    defaults
clyent                    1.2.2                    py35_0    defaults
colorama                  0.3.9                    py35_0    defaults
conda                     4.3.22                   py35_0    defaults
conda-build               3.0.3                    py35_0    defaults
conda-env                 2.6.0                         0    defaults
conda-manager             0.4.0                    py35_0    defaults
conda-verify              2.0.0                    py35_0    defaults
configobj                 5.0.6                    py35_0    defaults
contextlib2               0.5.5                    py35_0    defaults
cryptography              1.8.1                    py35_0    defaults
curl                      7.52.1                        0    defaults
cycler                    0.10.0                   py35_0    defaults
cython                    0.25.2                   py35_0    defaults
cytoolz                   0.8.2                    py35_0    defaults
dask                      0.15.0                   py35_0    defaults
datashape                 0.5.4                    py35_0    defaults
dbus                      1.10.20                       0    defaults
decorator                 4.0.11                   py35_0    defaults
dill                      0.2.6                    py35_0    defaults
distributed               1.17.1                   py35_0    defaults
docutils                  0.13.1                   py35_0    defaults
dynd-python               0.7.2                    py35_0    defaults
entrypoints               0.2.3                    py35_0    defaults
et_xmlfile                1.0.1                    py35_0    defaults
evtk                      1.0.0                     <pip>
expat                     2.1.0                         0    defaults
fastcache                 1.0.2                    py35_1    defaults
filelock                  2.0.7                    py35_0    defaults
flask                     0.12.2                   py35_0    defaults
flask-cors                3.0.2                    py35_0    defaults
fontconfig                2.12.1                        3    defaults
freetype                  2.5.5                         2    defaults
get_terminal_size         1.0.0                    py35_0    defaults
gevent                    1.2.2                    py35_0    defaults
glib                      2.50.2                        1    defaults
glob2                     0.5                      py35_0    defaults
greenlet                  0.4.12                   py35_0    defaults
gst-plugins-base          1.8.0                         0    defaults
gstreamer                 1.8.0                         0    defaults
h5py                      2.7.0               np112py35_0    defaults
harfbuzz                  0.9.39                        2    defaults
hdf5                      1.8.17                        2    defaults
heapdict                  1.0.0                    py35_1    defaults
html5lib                  0.999                    py35_0    defaults
icu                       54.1                          0    defaults
idna                      2.5                      py35_0    defaults
imagesize                 0.7.1                    py35_0    defaults
ipykernel                 4.6.1                    py35_0    defaults
ipython                   6.1.0                    py35_0    defaults
ipython_genutils          0.2.0                    py35_0    defaults
ipywidgets                6.0.0                    py35_0    defaults
isort                     4.2.15                   py35_0    defaults
itsdangerous              0.24                     py35_0    defaults
jbig                      2.1                           0    defaults
jdcal                     1.3                      py35_0    defaults
jedi                      0.10.2                   py35_2    defaults
jinja2                    2.9.6                    py35_0    defaults
joblib                    0.11                      <pip>
jpeg                      9b                            0    defaults
jsonschema                2.6.0                    py35_0    defaults
jupyter                   1.0.0                    py35_3    defaults
jupyter_client            5.1.0                    py35_0    defaults
jupyter_console           5.1.0                    py35_0    defaults
jupyter_core              4.3.0                    py35_0    defaults
lazy-object-proxy         1.3.1                    py35_0    defaults
libdynd                   0.7.2                         0    defaults
libffi                    3.2.1                         1    defaults
libgcc                    5.2.0                         0    defaults
libgfortran               3.0.0                         1    defaults
libiconv                  1.14                          0    defaults
libpng                    1.6.27                        0    defaults
libprotobuf               3.2.0                         0    defaults
libsodium                 1.0.10                        0    defaults
libtiff                   4.0.6                         3    defaults
libtool                   2.4.2                         0    defaults
libxcb                    1.12                          1    defaults
libxml2                   2.9.4                         0    defaults
libxslt                   1.1.29                        0    defaults
llvmlite                  0.18.0                   py35_0    defaults
locket                    0.2.0                    py35_1    defaults
lxml                      3.8.0                    py35_0    defaults
markupsafe                0.23                     py35_2    defaults
matplotlib                2.0.2               np112py35_0    defaults
mistune                   0.7.4                    py35_0    defaults
mkl                       2017.0.3                      0    defaults
mkl-service               1.1.2                    py35_3    defaults
mpi4py                    2.0.0                     <pip>
mpmath                    0.19                     py35_1    defaults
msgpack-python            0.4.8                    py35_0    defaults
multipledispatch          0.4.9                    py35_0    defaults
navigator-updater         0.1.0                    py35_0    defaults
nbconvert                 5.2.1                    py35_0    defaults
nbformat                  4.3.0                    py35_0    defaults
networkx                  1.11                     py35_0    defaults
nltk                      3.2.4                    py35_0    defaults
nose                      1.3.7                    py35_1    defaults
notebook                  5.0.0                    py35_0    defaults
numba                     0.33.0              np112py35_0    defaults
numexpr                   2.6.2               np112py35_0    defaults
numpy                     1.12.1                   py35_0    defaults
numpydoc                  0.6.0                    py35_0    defaults
odo                       0.5.0                    py35_1    defaults
olefile                   0.44                     py35_0    defaults
openpyxl                  2.4.7                    py35_0    defaults
openssl                   1.0.2l                        0    defaults
packaging                 16.8                     py35_0    defaults
pandas                    0.20.2              np112py35_0    defaults
pandocfilters             1.4.1                    py35_0    defaults
pango                     1.40.3                        1    defaults
partd                     0.3.8                    py35_0    defaults
patchelf                  0.9                           0    defaults
path.py                   10.3.1                   py35_0    defaults
pathlib2                  2.2.1                    py35_0    defaults
patsy                     0.4.1                    py35_0    defaults
pcre                      8.39                          1    defaults
pep8                      1.7.0                    py35_0    defaults
petsc4py                  3.7.0                     <pip>
pexpect                   4.2.1                    py35_0    defaults
pickleshare               0.7.4                    py35_0    defaults
pillow                    4.2.1                    py35_0    defaults
pip                       9.0.1                    py35_1    defaults
pixman                    0.34.0                        0    defaults
pkginfo                   1.4.1                    py35_0    defaults
ply                       3.10                     py35_0    defaults
prompt_toolkit            1.0.14                   py35_0    defaults
protobuf                  3.2.0                    py35_0    defaults
psutil                    5.2.2                    py35_0    defaults
ptyprocess                0.5.1                    py35_0    defaults
py                        1.4.34                   py35_0    defaults
pyasn1                    0.2.3                    py35_0    defaults
pycosat                   0.6.2                    py35_0    defaults
pycparser                 2.17                     py35_0    defaults
pycrypto                  2.6.1                    py35_6    defaults
pycurl                    7.43.0                   py35_2    defaults
pyflakes                  1.5.0                    py35_0    defaults
pygments                  2.2.0                    py35_0    defaults
pylint                    1.6.4                    py35_1    defaults
pyodbc                    4.0.17                   py35_0    defaults
pyopenssl                 17.0.0                   py35_0    defaults
pyparsing                 2.1.4                    py35_0    defaults
pyqt                      5.6.0                    py35_2    defaults
pytables                  3.3.0               np112py35_0    defaults
pytest                    3.1.2                    py35_0    defaults
python                    3.5.3                         1    defaults
python-dateutil           2.6.0                    py35_0    defaults
pytz                      2017.2                   py35_0    defaults
PyVTK                     0.5.18                    <pip>
pywavelets                0.5.2               np112py35_0    defaults
pyyaml                    3.12                     py35_0    defaults
pyzmq                     16.0.2                   py35_0    defaults
qt                        5.6.2                         4    defaults
qtawesome                 0.4.4                    py35_0    defaults
qtconsole                 4.3.0                    py35_0    defaults
qtpy                      1.2.1                    py35_0    defaults
readline                  6.2                           2    defaults
redis                     3.2.0                         0    defaults
redis-py                  2.10.5                   py35_0    defaults
requests                  2.14.2                   py35_0    defaults
rope                      0.9.4                    py35_1    defaults
ruamel_yaml               0.11.14                  py35_1    defaults
scikit-image              0.13.0              np112py35_0    defaults
scikit-learn              0.18.2              np112py35_0    defaults
scipy                     0.19.1              np112py35_0    defaults
seaborn                   0.7.1                    py35_0    defaults
setuptools                27.2.0                   py35_0    defaults
simplegeneric             0.8.1                    py35_1    defaults
singledispatch            3.4.0.3                  py35_0    defaults
sip                       4.18                     py35_0    defaults
six                       1.10.0                   py35_0    defaults
snowballstemmer           1.2.1                    py35_0    defaults
sockjs-tornado            1.0.3                    py35_0    defaults
sortedcollections         0.5.3                    py35_0    defaults
sortedcontainers          1.5.7                    py35_0    defaults
sphinx                    1.6.2                    py35_0    defaults
sphinx_rtd_theme          0.2.4                    py35_0    defaults
sphinxcontrib             1.0                      py35_0    defaults
sphinxcontrib-websupport  1.0.1                    py35_0    defaults
spyder                    3.1.4                    py35_0    defaults
sqlalchemy                1.1.11                   py35_0    defaults
sqlite                    3.13.0                        0    defaults
statsmodels               0.8.0               np112py35_0    defaults
sympy                     1.1                      py35_0    defaults
tblib                     1.3.2                    py35_0    defaults
tensorflow                1.1.0               np112py35_0    defaults
terminado                 0.6                      py35_0    defaults
testpath                  0.3.1                    py35_0    defaults
tk                        8.5.18                        0    defaults
toolz                     0.8.2                    py35_0    defaults
tornado                   4.5.1                    py35_0    defaults
tqdm                      4.14.0                    <pip>
traitlets                 4.3.2                    py35_0    defaults
unicodecsv                0.14.1                   py35_0    defaults
unixodbc                  2.3.4                         0    defaults
util-linux                2.21                          0    defaults
wcwidth                   0.1.7                    py35_0    defaults
werkzeug                  0.12.2                   py35_0    defaults
wheel                     0.29.0                   py35_0    defaults
widgetsnbextension        2.0.0                    py35_0    defaults
wrapt                     1.10.10                  py35_0    defaults
xlrd                      1.0.0                    py35_0    defaults
xlsxwriter                0.9.6                    py35_0    defaults
xlwt                      1.2.0                    py35_0    defaults
xz                        5.2.2                         1    defaults
yaml                      0.1.6                         0    defaults
zeromq                    4.1.5                         0    defaults
zict                      0.1.2                    py35_0    defaults
zlib                      1.2.8                         3    defaults

```
</p></details>



Discussion:
Your problem sounds like https://github.com/conda/conda/issues/5370. Your log indicates that you are using conda 4.3.22. #5370 was fixed in the 4.4 version of conda.
This issue still seems to have reappeared in 4.7.11.

`conda create --offline -n test numpy`
```
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/rkeith/anaconda3/envs/test

  added / updated specs:
    - numpy


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    _libgcc_mutex-0.1          |             main           3 KB
    blas-1.0                   |              mkl           6 KB
    intel-openmp-2019.4        |              243         729 KB
    libedit-3.1.20181209       |       hc058e9b_0         163 KB
    libffi-3.2.1               |       hd88cf55_4          40 KB
    libgcc-ng-9.1.0            |       hdf63c60_0         5.1 MB
    libgfortran-ng-7.3.0       |       hdf63c60_0        1006 KB
    libstdcxx-ng-9.1.0         |       hdf63c60_0         3.1 MB
    mkl-2019.4                 |              243       131.2 MB
    mkl-service-2.0.2          |   py37h7b6447c_0          65 KB
    mkl_random-1.0.2           |   py37hd81dba3_0         361 KB
    ncurses-6.1                |       he6710b0_1         777 KB
    numpy-1.16.4               |   py37h7e9f1db_0          48 KB
    numpy-base-1.16.4          |   py37hde5b4d6_0         3.5 MB
    openssl-1.1.1c             |       h7b6447c_1         2.5 MB
    readline-7.0               |       h7b6447c_5         324 KB
    setuptools-41.0.1          |           py37_0         506 KB
    six-1.12.0                 |           py37_0          23 KB
    tk-8.6.8                   |       hbc83047_0         2.8 MB
    wheel-0.33.4               |           py37_0          41 KB
    xz-5.2.4                   |       h14c3975_4         283 KB
    zlib-1.2.11                |       h7b6447c_3         103 KB
    ------------------------------------------------------------
                                           Total:       152.6 MB

The following NEW packages will be INSTALLED:

  _libgcc_mutex      pkgs/main/linux-64::_libgcc_mutex-0.1-main
  blas               pkgs/main/linux-64::blas-1.0-mkl
  ca-certificates    pkgs/main/linux-64::ca-certificates-2019.5.15-1
  certifi            pkgs/main/linux-64::certifi-2019.6.16-py37_1
  intel-openmp       pkgs/main/linux-64::intel-openmp-2019.4-243
  libedit            pkgs/main/linux-64::libedit-3.1.20181209-hc058e9b_0
  libffi             pkgs/main/linux-64::libffi-3.2.1-hd88cf55_4
  libgcc-ng          pkgs/main/linux-64::libgcc-ng-9.1.0-hdf63c60_0
  libgfortran-ng     pkgs/main/linux-64::libgfortran-ng-7.3.0-hdf63c60_0
  libstdcxx-ng       pkgs/main/linux-64::libstdcxx-ng-9.1.0-hdf63c60_0
  mkl                pkgs/main/linux-64::mkl-2019.4-243
  mkl-service        pkgs/main/linux-64::mkl-service-2.0.2-py37h7b6447c_0
  mkl_fft            pkgs/main/linux-64::mkl_fft-1.0.14-py37ha843d7b_0
  mkl_random         pkgs/main/linux-64::mkl_random-1.0.2-py37hd81dba3_0
  ncurses            pkgs/main/linux-64::ncurses-6.1-he6710b0_1
  numpy              pkgs/main/linux-64::numpy-1.16.4-py37h7e9f1db_0
  numpy-base         pkgs/main/linux-64::numpy-base-1.16.4-py37hde5b4d6_0
  openssl            pkgs/main/linux-64::openssl-1.1.1c-h7b6447c_1
  pip                pkgs/main/linux-64::pip-19.2.2-py37_0
  python             pkgs/main/linux-64::python-3.7.4-h265db76_1
  readline           pkgs/main/linux-64::readline-7.0-h7b6447c_5
  setuptools         pkgs/main/linux-64::setuptools-41.0.1-py37_0
  six                pkgs/main/linux-64::six-1.12.0-py37_0
  sqlite             pkgs/main/linux-64::sqlite-3.29.0-h7b6447c_0
  tk                 pkgs/main/linux-64::tk-8.6.8-hbc83047_0
  wheel              pkgs/main/linux-64::wheel-0.33.4-py37_0
  xz                 pkgs/main/linux-64::xz-5.2.4-h14c3975_4
  zlib               pkgs/main/linux-64::zlib-1.2.11-h7b6447c_3


Proceed ([y]/n)? y


Downloading and Extracting Packages
libgcc-ng-9.1.0      | 5.1 MB    |                                                                                                                                                                                   |   0% 
blas-1.0             | 6 KB      |                                                                                                                                                                                   |   0% 
libstdcxx-ng-9.1.0   | 3.1 MB    |                                                                                                                                                                                   |   0% 
libffi-3.2.1         | 40 KB     |                                                                                                                                                                                   |   0% 
wheel-0.33.4         | 41 KB     |                                                                                                                                                                                   |   0% 
mkl-service-2.0.2    | 65 KB     |                                                                                                                                                                                   |   0% 
tk-8.6.8             | 2.8 MB    |                                                                                                                                                                                   |   0% 
intel-openmp-2019.4  | 729 KB    |                                                                                                                                                                                   |   0% 
numpy-base-1.16.4    | 3.5 MB    |                                                                                                                                                                                   |   0% 
six-1.12.0           | 23 KB     |                                                                                                                                                                                   |   0% 
setuptools-41.0.1    | 506 KB    |                                                                                                                                                                                   |   0% 
readline-7.0         | 324 KB    |                                                                                                                                                                                   |   0% 
libedit-3.1.20181209 | 163 KB    |                                                                                                                                                                                   |   0% 
xz-5.2.4             | 283 KB    |                                                                                                                                                                                   |   0% 
mkl_random-1.0.2     | 361 KB    |                                                                                                                                                                                   |   0% 
_libgcc_mutex-0.1    | 3 KB      |                                                                                                                                                                                   |   0% 
mkl-2019.4           | 131.2 MB  |                                                                                                                                                                                   |   0% 
ncurses-6.1          | 777 KB    |                                                                                                                                                                                   |   0% 
openssl-1.1.1c       | 2.5 MB    |                                                                                                                                                                                   |   0% 
numpy-1.16.4         | 48 KB     |                                                                                                                                                                                   |   0% 
libgfortran-ng-7.3.0 | 1006 KB   |                                                                                                                                                                                   |   0% 
zlib-1.2.11          | 103 KB    |                                                                                                                                                                                   |   0% 

RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/libgcc-ng-9.1.0-hdf63c60_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/blas-1.0-mkl.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/libstdcxx-ng-9.1.0-hdf63c60_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/libffi-3.2.1-hd88cf55_4.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/wheel-0.33.4-py37_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/mkl-service-2.0.2-py37h7b6447c_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/tk-8.6.8-hbc83047_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/intel-openmp-2019.4-243.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/numpy-base-1.16.4-py37hde5b4d6_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/six-1.12.0-py37_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/setuptools-41.0.1-py37_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/readline-7.0-h7b6447c_5.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/libedit-3.1.20181209-hc058e9b_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/xz-5.2.4-h14c3975_4.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/mkl_random-1.0.2-py37hd81dba3_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/_libgcc_mutex-0.1-main.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/mkl-2019.4-243.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/ncurses-6.1-he6710b0_1.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/openssl-1.1.1c-h7b6447c_1.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/numpy-1.16.4-py37h7e9f1db_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/libgfortran-ng-7.3.0-hdf63c60_0.conda\nThis command is using a remote connection in offline mode.\n')
RuntimeError('EnforceUnusedAdapter called with url https://repo.anaconda.com/pkgs/main/linux-64/zlib-1.2.11-h7b6447c_3.conda\nThis command is using a remote connection in offline mode.\n')
```
Here is my conda info:
`conda info`
```
     active environment : base
    active env location : /home/rkeith/anaconda3
            shell level : 2
          conda version : 4.7.11
    conda-build version : 3.18.9
         python version : 3.7.4.final.0
       virtual packages : __cuda=9.1
       base environment : /home/rkeith/anaconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/rkeith/anaconda3/pkgs
       envs directories : /home/rkeith/anaconda3/envs
               platform : linux-64
             user-agent : conda/4.7.11 requests/2.22.0 CPython/3.7.4 Linux/4.15.0-58-generic ubuntu/16.04.6 glibc/2.23
             netrc file : None
           offline mode : False
```

Resolving patch:
diff --git a/conda/core/subdir_data.py b/conda/core/subdir_data.py
--- a/conda/core/subdir_data.py
+++ b/conda/core/subdir_data.py
@@ -22,12 +22,13 @@
 from .. import CondaError
 from .._vendor.auxlib.ish import dals
 from .._vendor.auxlib.logz import stringify
-from .._vendor.toolz import concat, take
+from .._vendor.boltons.setutils import IndexedSet
+from .._vendor.toolz import concat, take, groupby
 from ..base.constants import CONDA_HOMEPAGE_URL, CONDA_PACKAGE_EXTENSION_V1, REPODATA_FN
 from ..base.context import context
 from ..common.compat import (ensure_binary, ensure_text_type, ensure_unicode, iteritems, iterkeys,
                              string_types, text_type, with_metaclass)
-from ..common.io import ThreadLimitedThreadPoolExecutor, DummyExecutor
+from ..common.io import ThreadLimitedThreadPoolExecutor, DummyExecutor, dashlist
 from ..common.url import join_url, maybe_unquote
 from ..core.package_cache_data import PackageCacheData
 from ..exceptions import (CondaDependencyError, CondaHTTPError, CondaUpgradeError,
@@ -85,6 +86,13 @@ def query_all(package_ref_or_match_spec, channels=None, subdirs=None,
         if subdirs is None:
             subdirs = context.subdirs
         channel_urls = all_channel_urls(channels, subdirs=subdirs)
+        if context.offline:
+            grouped_urls = groupby(lambda url: url.startswith('file://'), channel_urls)
+            ignored_urls = grouped_urls.get(False, ())
+            if ignored_urls:
+                log.info("Ignoring the following channel urls because mode is offline.%s",
+                         dashlist(ignored_urls))
+            channel_urls = IndexedSet(grouped_urls.get(True, ()))
         check_whitelist(channel_urls)
         subdir_query = lambda url: tuple(SubdirData(Channel(url), repodata_fn=repodata_fn).query(
             package_ref_or_match_spec))


Test patch:
diff --git a/tests/core/test_subdir_data.py b/tests/core/test_subdir_data.py
--- a/tests/core/test_subdir_data.py
+++ b/tests/core/test_subdir_data.py
@@ -66,6 +66,14 @@ def test_get_index_no_platform_with_offline_cache(self):
                     assert all(index3.get(k) == rec for k, rec in iteritems(index))
                     assert unknown or len(index) == len(index3)
 
+    def test_subdir_data_context_offline(self):
+        with env_var('CONDA_OFFLINE', 'yes', stack_callback=conda_tests_ctxt_mgmt_def_pol):
+            local_channel = Channel(join(dirname(__file__), "..", "data", "conda_format_repo", context.subdir))
+            sd = SubdirData(channel=local_channel)
+            assert len(sd.query_all('zlib', channels=[local_channel])) > 0
+            assert len(sd.query_all('zlib')) == 0
+        assert len(sd.query_all('zlib')) > 1
+
 
 class StaticFunctionTests(TestCase):