octave-maintainers
[Top][All Lists]
Advanced

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

On the use of PKG_ADD/PKG_DEL directives in the stk package


From: Julien Bect
Subject: On the use of PKG_ADD/PKG_DEL directives in the stk package
Date: Fri, 19 Jun 2015 09:12:34 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Le 18/05/2015 19:06, Julien Bect a écrit :
Le 18/05/2015 18:12, Carnë Draug a écrit :
On 18 May 2015 at 16:38, Julien Bect <address@hidden> wrote:
Le 18/05/2015 17:21, "Carnë Draug" a écrit :
About your copying of PKG_ADD files, a better solution may have it as
comment on the source of a function in inst/.

What do you mean ?

I saw your comment on post_install.m.  Take a look at the modified package
that is attached.  I removed the PKG_ADD files, and the lines on post_install
that handled them.  The code that was previously on PKG_ADD and PKG_DEL is
now inline in stk_version.

When pkg installs a package, it checks the source for PKG_ADD and PKG_DEL
comments.  It creates such scripts in the directory where those files are
installed.  This way, those files will not be created on the directory
with the mex files.  Note that you can also write if and unwind_protect
blocks in those inline PKG_ADD.

Octave itself uses this to register colormaps,
    
http://hg.savannah.gnu.org/hgweb/octave/file/f5d9e57d4380/scripts/image/autumn.m#l32

and optimization routines:
    
http://hg.savannah.gnu.org/hgweb/octave/file/f5d9e57d4380/scripts/optimization/fminbnd.m#l61

Octave Forge packages also use it for that, but also to autoload functions
in oct files:
    http://hg.code.sf.net/p/octave/image/file/b348244c0153/src/conndef.cc#l190

Also, I dropped the usage of root and config variables.  If the user was
using those variables, the current code would remove them at the end.

Carnë
Thanks a lot, I will examine your solution.

Hello Carnë,

I am preparing a new (minor) release of stk. I have followed your advice concerning PKG_ADD/PKG_DEL directives (preferable to moving files during post_install).

Can you tell me if my solution looks ok to you (see changeset [1] or release candidate [2) ?

Is it ok if I add your name to the AUTHORS file of stk for your help on this matter ?

@++
Julien


[1] http://sourceforge.net/p/kriging/hg/ci/5c00200d38b8c3ecc7004c58d2b750cbab6412ad/

[2] http://sourceforge.net/projects/kriging/files/stk/rc/stk-2.3.1-rc1-octpkg.tar.gz




reply via email to

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