Ignore:
Timestamp:
2017-07-28T19:56:48+12:00 (7 years ago)
Author:
ak19
Message:

Part of previous commit. GLI needs to pass WGETRC env var down to perl running wget

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/download/DownloadJob.java

    r31823 r31831  
    318318            // Specify proxies as environment variables
    319319            // Need to manually specify GSDLHOME and GSDLOS also
    320             env = new String[4];
     320            env = new String[6];
    321321                    proxy_url = proxy_url.replaceAll("http://","");
    322322            env[0] = "http_proxy=http://"+proxy_url;
    323             env[1] = "ftp_proxy=ftp://"+proxy_url;
    324             env[2] = "GSDLHOME=" + Configuration.gsdl_path;
    325             env[3] = "GSDLOS=" + Gatherer.client_operating_system;
     323            env[1] = "https_proxy=http://"+proxy_url; // HTTP protocol for https:// too
     324                        // see also https://wiki.archlinux.org/index.php/proxy_settings
     325            env[2] = "ftp_proxy=ftp://"+proxy_url;
     326            env[3] = "GSDLHOME=" + Configuration.gsdl_path;
     327            env[4] = "GSDLOS=" + Gatherer.client_operating_system;
     328            env[5] = "WGETRC=" + LocalGreenstone.getBinOSDirectoryPath(Gatherer.client_operating_system)+"wgetrc"; // teach it where the wgetrc file lives, in gs2build/bin/<os>
    326329            prcs = rt.exec(cmd, env);
    327330        }
     
    329332            // Not Windows, but running client with download panel
    330333            // Need to manually specify GSDLHOME and GSDLOS
    331             env = new String[2];
     334            env = new String[3];
    332335            env[0] = "GSDLHOME=" + Configuration.gsdl_path;
    333336            env[1] = "GSDLOS=" + Gatherer.client_operating_system;
     337            env[2] = "WGETRC=" + LocalGreenstone.getBinOSDirectoryPath(Gatherer.client_operating_system)+"wgetrc"; // teach it where the wgetrc file lives, in gs2build/bin/<os>
    334338            prcs = rt.exec(cmd, env);
    335339        }
     
    623627            // Specify proxies as environment variables
    624628            // Need to manually specify GSDLHOME and GSDLOS also
    625             env = new String[5];
     629            env = new String[6];
    626630                    proxy_url = proxy_url.replaceAll("http://","");
    627631            env[0] = "http_proxy=http://"+proxy_url;
     
    631635            env[3] = "GSDLHOME=" + Configuration.gsdl_path;
    632636            env[4] = "GSDLOS=" + Gatherer.client_operating_system;
    633 
     637            env[5] = "WGETRC=" + LocalGreenstone.getBinOSDirectoryPath(Gatherer.client_operating_system)+"wgetrc"; // teach it where the wgetrc file lives, in gs2build/bin/<os>
    634638            prcs = new SafeProcess(cmd, env, null);
    635639        }
     
    637641            // Not Windows, but running client with download panel
    638642            // Need to manually specify GSDLHOME and GSDLOS
    639             env = new String[2];
     643            env = new String[3];
    640644            env[0] = "GSDLHOME=" + Configuration.gsdl_path;
    641645            env[1] = "GSDLOS=" + Gatherer.client_operating_system;
    642 
     646            env[2] = "WGETRC=" + LocalGreenstone.getBinOSDirectoryPath(Gatherer.client_operating_system)+"wgetrc"; // teach it where the wgetrc file lives, in gs2build/bin/<os>
    643647            prcs = new SafeProcess(cmd, env, null);
    644648        }
Note: See TracChangeset for help on using the changeset viewer.