[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[CHANGESET] Re: Octave-forge and 'pkg install' question
From: |
David Bateman |
Subject: |
[CHANGESET] Re: Octave-forge and 'pkg install' question |
Date: |
Tue, 29 Apr 2008 09:26:56 +0200 |
User-agent: |
Thunderbird 2.0.0.12 (X11/20080306) |
E. Joshua Rigler wrote:
> On Mon, Apr 28, 2008 at 1:18 AM, Tatsuro MATSUOKA <address@hidden> wrote:
>
>> Hello
>>
>>
>> --- "E. Joshua Rigler" <address@hidden> wrote:
>>
>> > ... Can anyone tell me why my *.oct files get
>> > placed in my personal directory (i.e., ~/octave), even though the *.m
>> > scripts get placed in the system directory (i.e.,
>> > ~/local/share/octave/packages), when I install using 'pkg install
>> > -global plot-1.0.4.tar.gz'? Maybe I misunderstand the '-global'
>> > option.
>>
>>
>> Please read:
>>
>> octave>help path
>>
>> See also: addpath, rmpath, genpath, pathdef, savepath, pathsep.
>>
>> After that, please execute
>>
>> octave>path
>>
>> Octave loads *.m and *.oct files from the load path and present working
>> directry.
>>
>>
>> > Maybe I misunderstand the '-global'
>> > option.
>>
>> `-local'
>> A local installation is forced, even if the user has
>> system privileges.
>>
>> `-global'
>> A global installation is forced, even if the user
>> doesn't normally have system privileges
>>
>> Regards
>>
>> Tatsuro
>>
>>
>
>
> I'm sorry if my follow-up question was not clearly stated, but I'm
> fairly certain the answer has nothing to do with setting Octave's
> search path(s), nor was my statement about not understanding the
> '-global' option an indication that I had not read the appropriate
> pkg.m help output (rather it indicated that the pkg.m help output does
> not provide a very thorough description of what happens when the
> '-global' option is invoked).
>
If you think the documentation can be clarified can you supply a patch?
> What I wanted was to understand better why, when I attempted to
> install an Octave-forge package like plot-1.0.4.tar.gz using the pkg.m
> script with the '-global' option, the *.m files were placed in a
> system (i.e., 'global') directory as expected, but the *.oct files
> were placed in my personal (i.e., 'local') octave directory. I think
> I know the answer now:
> * By default, when I start Octave, both my 'Installation prefix' and
> my 'Architecture dependent prefix' (determined by typing 'pkg prefix'
> at the Octave prompt) are set to ~/octave, which is my personal, or
> 'local' package directory;
> * If I install a package using the '-global' option, the 'Installation
> prefix' is changed to PREFIX/share/octave/packages, but the
> 'Architecture dependent prefix' continues to point to my personal
> package directory;
> * The installation then proceeds using these prefix directories as
> targets for the architecture independent and dependent files;
>
> I can think of one or two reasons why this might all be expected
> behavior, but I suspect it is an unintentional feature in pkg.m that
> both architecture independent and dependent files are not placed in
> the same system directory when the '-global' option is used. Can
> anyone confirm or deny this?
>
Yes its a bug.. Changeset attached...
D.
--
David Bateman address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
# HG changeset patch
# User David Bateman <address@hidden>
# Date 1209453941 -7200
# Node ID c6f7774d1caa4882b7bbcf796e25fc95c9fba95c
# Parent 9f4805695c6c69b121da807dab40ea06d6914398
Set archprefix for -local and -global options to pkg
diff --git a/scripts/ChangeLog b/scripts/ChangeLog
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,7 @@ 2008-04-27 David Bateman <address@hidden
+2008-04-29 David Bateman <address@hidden>
+
+ pkg/pkg.m: Also set archprefix with the -local and -global options.
+
2008-04-27 David Bateman <address@hidden>
* miscellaneous/single.m: Remove.
diff --git a/scripts/pkg/pkg.m b/scripts/pkg/pkg.m
--- a/scripts/pkg/pkg.m
+++ b/scripts/pkg/pkg.m
@@ -248,11 +248,14 @@ function [local_packages, global_package
global_install = false;
if (! user_prefix)
prefix = tilde_expand (fullfile ("~", "octave"));
+ archprefix = prefix;
endif
case "-global"
global_install = true;
if (! user_prefix)
prefix = fullfile (OCTAVE_HOME (), "share", "octave", "packages");
+ archprefix = fullfile (octave_config_info ("libexecdir"),
+ "octave", "packages");
endif
case available_actions
if (strcmp (action, "none"))
Re: Octave-forge and 'pkg install' question, Sergei Steshenko, 2008/04/25