Bug#976151: "lein -o" still downloads files from the internet

Louis-Philippe Véronneau pollo at debian.org
Mon Nov 30 15:28:09 GMT 2020


Package: leiningen
Version: 2.9.1-2
Severity: normal

Dear maintainers,

It seems that the offline option in leiningen "lein -o" does not work as
intended.

For example, starting from a fresh local maven cache:

-----------------------------------------------------------------------
foo at bar:~/git/debian/clojure/prismatic-schema-clojure$ rm -R ~/.m2
foo at bar:~/git/debian/clojure/prismatic-schema-clojure$ lein -o cljx
Retrieving com/keminglabs/cljx/0.6.0/cljx-0.6.0.pom from clojars
Retrieving org/clojure/core.match/0.2.0/core.match-0.2.0.pom from central
Retrieving org/clojure/pom.contrib/0.1.2/pom.contrib-0.1.2.pom from central
Retrieving org/sonatype/oss/oss-parent/7/oss-parent-7.pom from central
Retrieving net/cgrand/sjacket/0.1.1/sjacket-0.1.1.pom from clojars
Retrieving net/cgrand/regex/1.1.0/regex-1.1.0.pom from clojars
Retrieving net/cgrand/parsley/0.9.2/parsley-0.9.2.pom from clojars
Retrieving com/cemerick/piggieback/0.1.5/piggieback-0.1.5.pom from central
Retrieving org/clojure/clojurescript/0.0-2665/clojurescript-0.0-2665.pom
from central
Retrieving
com/google/javascript/closure-compiler/v20140625/closure-compiler-v20140625.pom
from central
Retrieving
com/google/javascript/closure-compiler-parent/v20140625/closure-compiler-parent-v20140625.pom
from central
Retrieving org/sonatype/oss/oss-parent/9/oss-parent-9.pom from central
Retrieving
com/google/javascript/closure-compiler-externs/v20140625/closure-compiler-externs-v20140625.pom
from central
Retrieving args4j/args4j/2.0.26/args4j-2.0.26.pom from central
Retrieving args4j/args4j-site/2.0.26/args4j-site-2.0.26.pom from central
Retrieving org/kohsuke/pom/6/pom-6.pom from central
Retrieving com/google/guava/guava/17.0/guava-17.0.pom from central
Retrieving com/google/guava/guava-parent/17.0/guava-parent-17.0.pom from
central
Retrieving
com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.pom from central
Retrieving com/google/google/1/google-1.pom from central
Retrieving org/json/json/20090211/json-20090211.pom from central
Retrieving com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.pom from
central
Retrieving
org/clojure/google-closure-library/0.0-20140718-946a7d39/google-closure-library-0.0-20140718-946a7d39.pom
from central
Retrieving
org/clojure/google-closure-library-third-party/0.0-20140718-946a7d39/google-closure-library-third-party-0.0-20140718-946a7d39.pom
from central
Retrieving org/clojure/data.json/0.2.3/data.json-0.2.3.pom from central
Retrieving org/mozilla/rhino/1.7R4/rhino-1.7R4.pom from central
Retrieving org/clojure/tools.reader/0.8.10/tools.reader-0.8.10.pom from
central
Retrieving watchtower/watchtower/0.1.1/watchtower-0.1.1.pom from clojars
Retrieving codox/codox/0.8.8/codox-0.8.8.pom from clojars
Retrieving codox/codox.leiningen/0.8.8/codox.leiningen-0.8.8.pom from
clojars
Retrieving leinjacker/leinjacker/0.4.2/leinjacker-0.4.2.pom from clojars
Retrieving org/clojure/core.contracts/0.0.1/core.contracts-0.0.1.pom
from central
Retrieving org/clojure/pom.contrib/0.0.26/pom.contrib-0.0.26.pom from
central
Retrieving org/sonatype/oss/oss-parent/5/oss-parent-5.pom from central
Retrieving org/clojure/core.unify/0.5.3/core.unify-0.5.3.pom from central
Retrieving org/clojure/clojure/1.4.0/clojure-1.4.0.pom from central
Retrieving lein-cljsbuild/lein-cljsbuild/1.0.5/lein-cljsbuild-1.0.5.pom
from clojars
Retrieving
lein-cljsbuild/cljs-compat/1.0.0-SNAPSHOT/cljs-compat-1.0.0-20151218.091126-41.pom
from clojars
Retrieving org/clojure/clojure/1.5.1/clojure-1.5.1.pom from central
Retrieving fs/fs/1.1.2/fs-1.1.2.pom from clojars
Retrieving org/clojure/clojure/1.3.0/clojure-1.3.0.pom from central
Retrieving
org/apache/commons/commons-compress/1.3/commons-compress-1.3.pom from
central
Retrieving org/apache/commons/commons-parent/22/commons-parent-22.pom
from central
Retrieving org/apache/apache/9/apache-9.pom from central
Retrieving
com/cemerick/clojurescript.test/0.3.1/clojurescript.test-0.3.1.pom from
central
Retrieving org/clojure/clojurescript/0.0-2138/clojurescript-0.0-2138.pom
from central
Retrieving
com/google/javascript/closure-compiler/v20131014/closure-compiler-v20131014.pom
from central
Retrieving args4j/args4j/2.0.16/args4j-2.0.16.pom from central
Retrieving args4j/args4j-site/2.0.16/args4j-site-2.0.16.pom from central
Retrieving com/google/guava/guava/15.0/guava-15.0.pom from central
Retrieving com/google/guava/guava-parent/15.0/guava-parent-15.0.pom from
central
Retrieving
com/google/protobuf/protobuf-java/2.4.1/protobuf-java-2.4.1.pom from central
Retrieving
org/clojure/google-closure-library/0.0-20130212-95c19e7f0f5f/google-closure-library-0.0-20130212-95c19e7f0f5f.pom
from central
Retrieving
org/clojure/google-closure-library-third-party/0.0-20130212-95c19e7f0f5f/google-closure-library-third-party-0.0-20130212-95c19e7f0f5f.pom
from central
Retrieving org/clojure/tools.reader/0.8.0/tools.reader-0.8.0.pom from
central
Retrieving org/clojure/core.match/0.2.0/core.match-0.2.0.jar from central
Retrieving com/cemerick/piggieback/0.1.5/piggieback-0.1.5.jar from central
Retrieving org/clojure/core.contracts/0.0.1/core.contracts-0.0.1.jar
from central
Retrieving org/clojure/core.unify/0.5.3/core.unify-0.5.3.jar from central
Retrieving
com/cemerick/clojurescript.test/0.3.1/clojurescript.test-0.3.1.jar from
central
Retrieving org/clojure/clojure/1.5.1/clojure-1.5.1.jar from central
Retrieving
com/google/javascript/closure-compiler/v20131014/closure-compiler-v20131014.jar
from central
Retrieving org/clojure/clojurescript/0.0-2138/clojurescript-0.0-2138.jar
from central
Retrieving
org/apache/commons/commons-compress/1.3/commons-compress-1.3.jar from
central
Retrieving args4j/args4j/2.0.16/args4j-2.0.16.jar from central
Retrieving com/google/guava/guava/15.0/guava-15.0.jar from central
Retrieving
com/google/protobuf/protobuf-java/2.4.1/protobuf-java-2.4.1.jar from central
Retrieving org/json/json/20090211/json-20090211.jar from central
Retrieving com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar from
central
Retrieving
org/clojure/google-closure-library/0.0-20130212-95c19e7f0f5f/google-closure-library-0.0-20130212-95c19e7f0f5f.jar
from central
Retrieving
org/clojure/google-closure-library-third-party/0.0-20130212-95c19e7f0f5f/google-closure-library-third-party-0.0-20130212-95c19e7f0f5f.jar
from central
Retrieving org/clojure/data.json/0.2.3/data.json-0.2.3.jar from central
Retrieving org/mozilla/rhino/1.7R4/rhino-1.7R4.jar from central
Retrieving org/clojure/tools.reader/0.8.0/tools.reader-0.8.0.jar from
central
Retrieving net/cgrand/regex/1.1.0/regex-1.1.0.jar from clojars
Retrieving net/cgrand/parsley/0.9.2/parsley-0.9.2.jar from clojars
Retrieving net/cgrand/sjacket/0.1.1/sjacket-0.1.1.jar from clojars
Retrieving codox/codox/0.8.8/codox-0.8.8.jar from clojars
Retrieving watchtower/watchtower/0.1.1/watchtower-0.1.1.jar from clojars
Retrieving com/keminglabs/cljx/0.6.0/cljx-0.6.0.jar from clojars
Retrieving codox/codox.leiningen/0.8.8/codox.leiningen-0.8.8.jar from
clojars
Retrieving leinjacker/leinjacker/0.4.2/leinjacker-0.4.2.jar from clojars
Retrieving lein-cljsbuild/lein-cljsbuild/1.0.5/lein-cljsbuild-1.0.5.jar
from clojars
Retrieving fs/fs/1.1.2/fs-1.1.2.jar from clojars
Retrieving
lein-cljsbuild/cljs-compat/1.0.0-SNAPSHOT/cljs-compat-1.0.0-20151218.091126-41.jar
from clojars
Rewriting src/cljx to target/generated/src/clj (clj) with features
#{clj} and 0 transformations.
Rewriting src/cljx to target/generated/src/cljs (cljs) with features
#{cljs} and 1 transformations.
Rewriting test/cljx to target/generated/test/clj (clj) with features
#{clj} and 0 transformations.
Rewriting test/cljx to target/generated/test/cljs (cljs) with features
#{cljs} and 1 transformations.
-----------------------------------------------------------------------

The LEIN_OFFLINE environment variables does work though:

-----------------------------------------------------------------------
foo at bar:~/git/debian/clojure/prismatic-schema-clojure$ rm -R ~/.m2
foo at bar:~/git/debian/clojure/prismatic-schema-clojure$ LEIN_OFFLINE=true
lein cljx
Cannot access central (https://repo1.maven.org/maven2/) in offline mode
and the artifact com.keminglabs:cljx:jar:0.6.0 has not been downloaded
from it before.
Cannot access clojars (https://repo.clojars.org/) in offline mode and
the artifact com.keminglabs:cljx:jar:0.6.0 has not been downloaded from
it before.
Cannot access central (https://repo1.maven.org/maven2/) in offline mode
and the artifact codox:codox:jar:0.8.8 has not been downloaded from it
before.
Cannot access clojars (https://repo.clojars.org/) in offline mode and
the artifact codox:codox:jar:0.8.8 has not been downloaded from it before.
Cannot access central (https://repo1.maven.org/maven2/) in offline mode
and the artifact lein-cljsbuild:lein-cljsbuild:jar:1.0.5 has not been
downloaded from it before.
Cannot access clojars (https://repo.clojars.org/) in offline mode and
the artifact lein-cljsbuild:lein-cljsbuild:jar:1.0.5 has not been
downloaded from it before.
Cannot access central (https://repo1.maven.org/maven2/) in offline mode
and the artifact com.cemerick:clojurescript.test:jar:0.3.1 has not been
downloaded from it before.
Cannot access clojars (https://repo.clojars.org/) in offline mode and
the artifact com.cemerick:clojurescript.test:jar:0.3.1 has not been
downloaded from it before.
This could be due to a typo in :dependencies, file system permissions,
or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment
variable.
-----------------------------------------------------------------------

I would expect both the "-o" parameter and the LEIN_OFFLINE env var to
behave the same way.

-- 
  ⢀⣴⠾⠻⢶⣦⠀
  ⣾⠁⢠⠒⠀⣿⡁  Louis-Philippe Véronneau
  ⢿⡄⠘⠷⠚⠋   pollo at debian.org / veronneau.org
  ⠈⠳⣄



More information about the Pkg-clojure-maintainers mailing list