[Pkg-octave-devel] Changing pkg-octave-dev to parse config files

Thomas Weber thomas.weber.mail at gmail.com
Sun Apr 27 21:10:14 UTC 2008


On 27/04/08 22:12 +0200, Ólafur Jens Sigurðsson wrote:
> On Sun, Apr 27, 2008 at 09:33:47PM +0200, Thomas Weber wrote:
> > On 27/04/08 19:56 +0200, Rafael Laboissiere wrote:
> > > * Thomas Weber <thomas.weber.mail at gmail.com> [2008-04-27 10:01]:
> > > 
> > > > we currently start up octave for building forge package with the
> > > > following options:
> > > > 
> > > > octave_options = --norc --no-history --silent --no-site-file
> > > > 
> > > > I would like to drop the "--norc" part, such that the system wide config
> > > > file (/etc/octave.conf) is parsed.
> > > 
> > > In this case, we should also drop --no-site-file
> > 
> > Upps, you are right.
> > 
> > octave's help says the following:
> >   --no-init-file          Don't read the ~/.octaverc or .octaverc files.
> >   --no-site-file          Don't read the site-wide octaverc file.
> >   --norc, -f              Don't read any initialization files.
> > 
> > So, does this mean that "--norc == --no-init-file --no-site-file"?
> > 
> > > What about replacin "--norc --no-site-file" by --no-init-file?  I do not
> > > remember well, but I think that one of the goals of using --norc was to
> > > avoid ~/.octaverc being loaded.
> > 
> > --no-init-file should work. But I guess if we have a ~/.octaverc file in
> > the build chroots, there's something screwed to begin with.
> 
> Jup, there shouldn't be any .octaverc files around in the chroots so
> that shouldn't be a neccissity to exclude but doesn't harm either.
> 
> Is there any specific reason you want the system wide configurations
> file parsed Thomas? 

We have the not so small problem with Octave currently not finding its
.oct files, because the relevant part of the loadpath somehow vanishes
on its way from pathdef() to path()[1]. This means that virtually every
build is breaking.[2]

The work-around for this was adding an addpath() directive to
/etc/octave.conf. But if we call octave in such a way that it doesn't
parse this file, we loose. 

Another question is what "depends" in the context of -forge package
means. If package A depends on B, does it mean that A needs B at runtime
or already at build time? The first case is simple, but for the second
case we need to load the package. This again is easier by the "pkg load"
part of /etc/octave.conf. However, this is just one thought, I don't
know if this "pre-depends" is the case, actually.

> Just wondering and it is nice to have it for the
> record since the next time people wonder about this then the argument
> can be looked up :-)

It's a work-around, I haven't made up my mind whether we should keep it
like that in the future. 


[1] I don't know how to describe it better: the directory is in
pathdef(), but not in path().

[2] With the exception of Rafael's machine, who seems to be immune
against such breakage. Rafael, are you up for hire as a sys-admin?

	Thomas



More information about the Pkg-octave-devel mailing list