Ignore:
Timestamp:
2020-06-12T23:47:19+12:00 (4 years ago)
Author:
ak19
Message:

Fixing discovery of client-gli issues with previewing a different library (e.g. /default-library instead of /library). This commit adds to Kathy's recent work on supporting other libraries when previewing especially in the remote case, where Diego had detected problems. 1. First fixed a foolish copy paste error I made last time in full-rebuild.pl, commit 34128, when I was fixing up the script to accept the library_name parameter so it could pass this to buildcol.pl calling activate and/or to activate.pl directly. Only detected the problem when I was going to copy paste it into incremental-rebuild.pl. 2. Similar solution added to incremental-rebuild.pl and tested from commandline that this script too now accepts and passes on the library_name parameter to buildcol.pl to reach activate when needed. 3. GLI now passes library_name to building process, so activate can call the correct library to activate a collection. The library_name is obtained from client-gli, where the library (servlet_path) is set when configuring the site in use.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java

    r33015 r34158  
    234234        command_parts_list.add("-collectdir");
    235235        command_parts_list.add(getCollectDirectory()); // <../collect/>
     236    } else { // actually this should work in local Greenstone case too:
     237        command_parts_list.add("-library_name");
     238        String library_servlet_name = Configuration.servlet_path;
     239        if(library_servlet_name.startsWith("/")) {
     240        library_servlet_name = library_servlet_name.substring(1);
     241        }
     242        command_parts_list.add(library_servlet_name);
    236243    }
    237244
     
    291298        import_list.add(getCollectDirectory());
    292299    }
     300    // import.pl does not at present need to know the library/servlet_path
     301    // whether in a remote or local GS server situation
    293302
    294303    String[] import_options = collection.import_options.getValues();
     
    338347        build_list.add("-collectdir");
    339348        build_list.add(getCollectDirectory());
     349    } else { // actually this should work in local Greenstone case too:
     350        build_list.add("-library_name");
     351        String library_servlet_name = Configuration.servlet_path;
     352        if(library_servlet_name.startsWith("/")) {
     353        library_servlet_name = library_servlet_name.substring(1);
     354        }
     355        build_list.add(library_servlet_name);
    340356    }
    341357
Note: See TracChangeset for help on using the changeset viewer.