<div dir="auto"><div dir="auto"><br></div><div dir="auto">Wow! </div><div dir="auto"><br></div><div dir="auto"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On May 29, 2017 23:20, "Samuel Gougeon" <<a href="mailto:sgougeon@free.fr">sgougeon@free.fr</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  

    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    Since the ATOMS package manager exists (Scilab 5.2), its client
    interface launched with atomsGui() has some weird and rather
    annoying troubles about categories: While a package is tagged in one
    or several categories on the ATOMS website, and while the package is
    well compiled and available for the OS and the Scilab version we
    use, it can be missing -- i.e. not listed / proposed to install --
    in the given categories. Actually, it can be listed in one of its
    categories, and missing in another one. This puzzling behavior
    impedes a lot the interest in using the ATOMS GUI rather than the
    atoms functions. A pity !<br>
    <br>
    Considering the number of hours passed to try to understand why,
    noticeably when trying to publish on the ATOMS system a new package
    or a new version of a package that commonly refuses to appear in the
    manager, i have managed to analyze and track this issue up to a
    solution. I've got it ! There was a thread that it was on the server
    (so private) side, but it is not the case.<br>
    <br>
    The solution is committed here, aiming to make it available in
    Scilab 6.0.1, when it will find a reviewer:<br>
    <a class="m_3088319837452568250moz-txt-link-freetext" href="https://codereview.scilab.org/19273" target="_blank">https://codereview.scilab.org/<wbr>19273</a><br>
    <br>
    <b>This fix works for all Scilab versions since 5.2 and up to Scilab
      5.5.2 </b>and 6.<br>
    Everybody can apply the patch on his/her Scilab, <font color="#33cc00">provided that one has <i>write access</i> to the
      Scilab's installation directory</font>.<br>
    <b>The how-to apply the patch is the following</b>:<br>
    <ul>
      <li><tt>--> oldd = pwd();  // save your current directory<br>
        </tt></li>
      <li><tt>--> edit("atomsDESCRIPTIONcat.sci"<wbr>, 114)</tt></li>
      <li>In the <i>categor</i><i>ies_flat</i> section, replace</li>
    </ul>
    <font size="-1"><tt><font size="-1"><tt>for
            i=1:size(category_names,"</tt><tt>*</tt><tt>"</tt><tt>)</tt><br>
        </font>    </tt><tt>if</tt><tt> </tt><tt>~</tt><tt> </tt><tt>isfield</tt><tt>(</tt><tt>categories_flat_out</tt><tt>,</tt><tt>ca<wbr>tegory_names</tt><tt>(</tt><tt>i</tt><tt>)</tt><tt>)</tt><tt>
      </tt><tt>then</tt><br>
      <tt>        </tt><tt>categories_flat_out</tt><tt>(</tt><tt>category_<wbr>names</tt><tt>(</tt><tt>i</tt><tt>)</tt><tt>)</tt><tt>
      </tt><tt>=</tt><tt> </tt><tt>categories_flat_in_2</tt><tt>(</tt><tt>category_<wbr>names</tt><tt>(</tt><tt>i</tt><tt>)</tt><tt>)</tt><tt>;</tt><br>
      <tt>    </tt><tt>end</tt><br>
      end</font><br>
            with<br>
    <font size="-1"><tt><br>
        for i=1:size(category_names,"</tt><tt>*</tt><tt>"</tt><tt>)</tt><br>
      <tt>    </tt><tt>if</tt><tt> </tt><tt>~</tt><tt> </tt><tt>isfield</tt><tt>(</tt><tt>categories_flat_out</tt><tt>,</tt><tt>ca<wbr>tegory_names</tt><tt>(</tt><tt>i</tt><tt>)</tt><tt>)</tt><tt>
      </tt><tt>then</tt><br>
      <tt>        </tt><tt>categories_flat_out</tt><tt>(</tt><tt>category_<wbr>names</tt><tt>(</tt><tt>i</tt><tt>)</tt><tt>)</tt><tt>
      </tt><tt>=</tt><tt> </tt><tt>categories_flat_in_2</tt><tt>(</tt><tt>category_<wbr>names</tt><tt>(</tt><tt>i</tt><tt>)</tt><tt>)</tt><tt>;</tt><br>
      <font color="#33cc00"><tt>    </tt><tt>else</tt><br>
        <tt>        </tt><tt>// If the category is already registered,
          we concatenate the master</tt><br>
        <tt>        </tt><tt>// and the new incoming lists of packages
          registered in it:</tt><br>
        <tt>        </tt><tt>tmp_out</tt><tt> </tt><tt>=</tt><tt> </tt><tt>categories_flat_out</tt><tt>(</tt><tt>category_<wbr>names</tt><tt>(</tt><tt>i</tt><tt>)</tt><tt>)</tt><tt>(</tt><tt>"</tt><tt>packages</tt><tt>"</tt><tt>)</tt><tt>;</tt><br>
        <tt>        </tt><tt>tmp_in_2</tt><tt> </tt><tt>=</tt><tt> </tt><tt>categories_flat_in_2</tt><tt>(</tt><tt>category_<wbr>names</tt><tt>(</tt><tt>i</tt><tt>)</tt><tt>)</tt><tt>(</tt><tt>"</tt><tt>packages</tt><tt>"</tt><tt>)</tt><tt>;</tt><br>
        <tt>        </tt><tt>categories_flat_out</tt><tt>(</tt><tt>category_<wbr>names</tt><tt>(</tt><tt>i</tt><tt>)</tt><tt>)</tt><tt>(</tt><tt>"</tt><tt>packages</tt><tt>"</tt><tt>)</tt><tt>
        </tt><tt>=</tt><tt> </tt><tt>[</tt><tt>tmp_out</tt><tt> </tt><tt>;</tt><tt>
        </tt><tt>tmp_in_2</tt><tt>]</tt><tt>;</tt><br>
      </font><tt>    </tt><tt>end</tt><br>
      <tt>end<br>
      </tt></font><tt>        Then : <br>
    </tt>
    <ul>
      <li><tt>save the modification. In the console:<br>
          --> predef clear        // unprotect the library name<br>
          --> genlib atomsinternalslib  // recompile the library<br>
          --> cd(oldd)            // go back to your working dir<br>
          --> atomsSystemUpdate   // refresh your atoms list<br>
          --> atomsGui()          // launch the manager, and enjoy,
          for ever :)</tt></li>
    </ul>
    <p>The issue was that as soon as a first package was installed from
      a category, it canceled the listing of all other packages proposed
      in its categories. So, the bug appeared or not for a category
      depending on packages already installed.</p>
    Hope this can save hours to other ATOMS users and authors<br>
    <br>
    Samuel<br>
    <br>
  </div>

<br>______________________________<wbr>_________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.scilab.org/<wbr>mailman/listinfo/users</a><br>
<br></blockquote></div></div>