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

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

[Octave-bug-tracker] [bug #51632] make global pkg paths always relative


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #51632] make global pkg paths always relative to OCTAVE_HOME, no need to pkg rebuild -global when path changes
Date: Sat, 16 Nov 2019 18:19:16 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #54, bug #51632 (project octave):

Here are two csets.

The first (bug_51632_3rd_fix_global_OCTAVE_HOME.cset) is the fix for the
original issue, i.e., 
* when writing the octave_packages file it replaces the OCTAVE_HOME part of
packages installation paths with "__OH__"
* when reading the octave_packages file it replaces "__OH__" with the then
current OCTAVE_HOME contents.

This fix make Octave completely relocatable; I tried on Windows, but AFAICS it
should also work on Linux.

The other cset (bug_51632_list_global_OCTAVE_HOME.cset) is for cosmetics, it
replaces the OCTAVE_HOME part of package installation files with <OCTAVE_HOME>
when running "pkg list", and is independent of the first cset. See below for
an example.
Before:

>> pkg list
Package Name         | Version | Installation directory
---------------------+---------+-----------------------
     communications  |   1.2.1 |
...\mingw64\share\octave\packages\communications-1.2.1
            control *|   3.1.0 |
...\OCTAVE~1.0\mingw64\share\octave\packages\control-3.1.0
           database  |   2.4.3 |
...\OCTAVE~1.0\mingw64\share\octave\packages\database-2.4.3
:


After:

>> pkg list
Package Name         | Version | Installation directory
---------------------+---------+-----------------------
     communications  |   1.2.1 |
<OCTAVE_HOME>\share\octave\packages\communications-1.2.1
            control *|   3.2.0 |
<OCTAVE_HOME>\share\octave\packages\control-3.2.0
     data-smoothing  |   1.3.0 |
<OCTAVE_HOME>\share\octave\packages\data-smoothing-1.3.0
:


The fix here (replacing just the OCTAVE_HOME parts) will work for the vast
majority of the Octave installations. I've been busy with replacing the
prefix/archprefix parts as well but that is a bit more complicated. Later on
I'll come up with a fix that builds on top of the ones here.

I think the patches here are ready to be applied.

A related question is how to get an octave_packages file in mxe-octave. One
way would be to have a local Octave installation on the build system (Linux)
and use that with a script to generate the octave_packages file, along the
lines of:
 
1. "pkg prefix" and "pkg archprefix" pointing to the octave installation in
<mxe-octave>/dist/octave/mingw64

2. "pkg global_list" to specify where the octave_packages file needs to be
created (<mxe-octave>/dist/octave/mingw64/share/octave)

3. "pkg rebuild" to actually create the octave-packages file.


(file #47875, file #47876)
    _______________________________________________________

Additional Item Attachment:

File name: bug_51632_3rd_fix_global_OCTAVE_HOME.cset Size:7 KB
   
<https://savannah.gnu.org/file/bug_51632_3rd_fix_global_OCTAVE_HOME.cset?file_id=47875>

File name: bug_51632_list_global_OCTAVE_HOME.cset Size:1 KB
   
<https://savannah.gnu.org/file/bug_51632_list_global_OCTAVE_HOME.cset?file_id=47876>



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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