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 affected by mixup of 8.3 and


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #57083] pkg list affected by mixup of 8.3 and LFN path names
Date: Sat, 26 Oct 2019 13:20:46 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.4

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

Thx Markus, turning it into an easy reloctable .oct file is a Good Idea.

BTW I'm entering relatively long posts here to keep the discussion going in
order to arrive at an optimal solution. I hope no one is offended or
irritated.

is_same_file() won't *easily* fix the original problem ("pkg list" showing no
loaded packages) as the pertinent if conditions are not about comparing files
but rather about finding path name strings in a long text constructed by
path().

Of course I can do s/th like (here for installed_packages.m):

:
tmppath = strsplit (path (); pathsep);
## Find which packages are loaded and thus appear in the path
for i = 1:numel (installed_pkgs_lst)
  if (any (cellfun (@(x) is_same_file (x, installed_pkgs_lst{i}.dir), tmppath,
"uni", 0)))
    ....


(yet untested, but ripe for vectorizing) however similar constructs need to be
added in several other places in pkg.m and private/ functions.
I'm hoping that by just choosing one path name style (i.e., LFN) in the
octave_packages files the existing code can be kept as-is (with the exception
of the strrep()s for replacing fileseps) and more intensive surgery can be
avoided.
IOW presently I'm believe more in Rik's philosophy :-)

But we'll see what the best approach is.

AFAICS is_same_file() could be a very useful addition to the user functions. I
wonder if it works with symlinks on *nix and (quite relevant but often
overlooked) NTFS "joins" and SUBST etc. on Windows.


    _______________________________________________________

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]