octave-maintainers
[Top][All Lists]
Advanced

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

Re: pkg build: PKG_ADD run?


From: Carnë Draug
Subject: Re: pkg build: PKG_ADD run?
Date: Sat, 16 Mar 2013 23:03:04 +0000

On 16 March 2013 22:34, Olaf Till <address@hidden> wrote:
> On Fri, Mar 15, 2013 at 04:54:16PM +0000, Carnë Draug wrote:
>> On 15 March 2013 09:38, Olaf Till <address@hidden> wrote:
>> > Since PKG_ADD is meant to be run when the package is added to the
>> > path, I'd consider it a bug if it is run even if only a binary package
>> > is built. Do you see any reasons to run PKG_ADD even in this case?
>>
>> I'm not 100% of how PKG_ADD is ran when doing `pkg build` but I'd
>> guess it may make sense for pkg to try to install and load the package
>> it just built, to make sure it's built correctly.
>
> I see now that the problem with the package was triggered by the fact
> that a PKG_ADD instruction of an oct-function required both the
> oct-function and the packages m-functions to be in the path. Since in
> 'pkg install' the m-functions seemingly are (happen to be?) added to
> the path before the oct-functions (adding to path triggers respective
> PKG_ADD instructions) this is no problem here. But in 'pkg build',
> since the functions are not already in the path due to installation,
> 'gen_doc_cache' will temporarily add them (triggering PKG_ADD
> instructions), but m-functions and oct-functions separately, so they
> are not in the path at the same time; so there is a problem.
>
> Should this be fixed in Octave? If yes, the only way I see is to make
> 'gen_doc_cache' return each directory it newly added to the path
> (instead of removing it from the path again), so that all directories
> of a package temporarily added to the path can be removed from the
> path at the same time by the caller in pkg.m, after all gen_doc_cache
> calls are over. Should I make such a patch?
>
> The problem could also be worked around in the package by providing
> m-file wrappers for the oct-functions.

Yes there is a problem. I remember it from the io package which had
the opposite issue. Since the path for oct was loaded first, and the
PKG_ADD had a function from the inst directory it would fail. The work
around we still have on the IO package is to have a post_install
script https://sourceforge.net/p/octave/code/9983 removing the
unnecessary PKG_ADD file.

Carnë


reply via email to

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