octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #57083] pkg list does not indicate loaded glob


From: Rik
Subject: [Octave-bug-tracker] [bug #57083] pkg list does not indicate loaded global packages
Date: Wed, 23 Oct 2019 18:21:06 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Follow-up Comment #3, bug #57083 (project octave):

I think you might need to try some sort of bisection.  The code that
determines whether a package is loaded is in
scripts/pkg/private/installed_packages.m.


  ## Now check if the package is loaded.
  ## FIXME: Couldn't dir_in_loadpath() be used here?
  tmppath = strrep (path (), '\', '/');
  for i = 1:numel (installed_pkgs_lst)
    if (strfind (tmppath, strrep (installed_pkgs_lst{i}.dir, '\', '/')))
      installed_pkgs_lst{i}.loaded = true;
    else
      installed_pkgs_lst{i}.loaded = false;
    endif
  endfor
  for i = 1:numel (local_packages)
    if (strfind (tmppath, strrep (local_packages{i}.dir, '\', '/')))
      local_packages{i}.loaded = true;
    else
      local_packages{i}.loaded = false;
    endif
  endfor
  for i = 1:numel (global_packages)
    if (strfind (tmppath, strrep (global_packages{i}.dir, '\', '/')))
      global_packages{i}.loaded = true;
    else
      global_packages{i}.loaded = false;
    endif
  endfor


If I had to guess, the problem is that something has changed in the way paths
are represented on Windows.  Either this is in path() or in the calculation of
local_packages and global_packages variables.

The most likely suspect is this change on Oct. 9th


changeset:   27497:5a0543de1e47
user:        Markus Mützel <address@hidden>
date:        Wed Oct 09 14:35:03 2019 +0200
summary:     Add canonical path when using addpath (bug #56267).





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57083>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]