[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pkg build: PKG_ADD run?
From: |
Olaf Till |
Subject: |
Re: pkg build: PKG_ADD run? |
Date: |
Sat, 16 Mar 2013 23:34:57 +0100 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
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.
Olaf
--
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net
signature.asc
Description: Digital signature