octave-maintainers
[Top][All Lists]
Advanced

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

Re: pkg / PKG_ADD / arch-dependent


From: Philip Nienhuis
Subject: Re: pkg / PKG_ADD / arch-dependent
Date: Sat, 8 Mar 2014 04:44:29 -0800 (PST)

Julien Bect wrote
> Hi everyone,
> 
> Is there any reason why the PKG_ADD/PKG_DEL scripts located at the root 
> of a package source (.tar.gz) should end up being moved to the 
> arch-dependent subdirectory after installation with "pkg install" ?
> 
> Because this is the behaviour that I currently observe while trying to 
> create my first octave package (Octave 3.8.1 / Ubutu 13.04).
> 
> The documentation here :
> 
> http://www.gnu.org/software/octave/doc/interpreter/Creating-Packages.html
> 
> doesn't say explicitely where PKG_ADD will be, just that it is "run when 
> the package is added to the users path".

If there is a arch-dependent subdir (some OF packages don't have one),
PKG_ADD will end up there. Otherwise PKG_ADD ends up in the scripts subdir
(AFAIK, I'm not sure).

Yep, sometimes this behavior is very undesired.
E.g. in the io package, PKG_ADD (in the arch-dependent subdir) was already
run when the package hadn't fully been loaded yet, so a number of commands
needed for proper operation of the io package couldn't be executed. 
That's why in post_install.m I entered some stanzas that move PKG_ADD to the
scripts subdir.

If it solves your problem you can copy those lines to your package's
post_install.m.

A better solution would be some flag in e.g. the file DESCRIPTION in the
package .tar.gz telling pkg.m where PKG_ADD is to be moved to.

Philip




--
View this message in context: 
http://octave.1599824.n4.nabble.com/pkg-PKG-ADD-arch-dependent-tp4662849p4662853.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.


reply via email to

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