octave-maintainers
[Top][All Lists]
Advanced

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

Re: pkg dependencies


From: David Bateman
Subject: Re: pkg dependencies
Date: Tue, 05 Jun 2007 10:37:29 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

Michael,

I'm forwarding this response to the list, as it directly relates to the
pkg patch I proposed there.

Michael Goffioul wrote:
> On 6/5/07, David Bateman <address@hidden> wrote:
>> The issue is that the jhandles package uses functions of the java
>> package in its PKG_ADD file. As "pkg load" didn't respect any particular
>> order to add the directories of packages to the path, it could occur
>> that the the jhandles packages was loaded before the java package and an
>> error message about missing functions would appear.
>
> Indeed, I figured it out yesterday after sending my response.

There are two ways to address this.. The easiest would be the call "pkg
load java" in the jhandles PKG_ADD. However, the downside of this is
that it means the developer must be aware of the issue and take steps.
The alternative is to have pkg order the paths so that the dependencies
are always loaded first. This is what the patch I sent a few hours back
does.. So is the ordering of paths important enough so that we need to
include this patch or do we let the developers handle the issue?

>
>> > The fact is that in general I want jhandles loaded *after* the plot
>> > package, because I overload some functions. This is the reason
>> > of the little m-script I added to the installer
>> > (admin/Windows/msvc/do_pkg_init.m)
>> If you place a dependency on the plot package then my proposed patch
>> will do this.
>
> Indeed. I looked at your patch and was wondering if you coulnd't do
> the same
> with "save_in_order" instead of "load_in_order". This wouldn't
> increase the
> octave startup time (I guess load_in_order does), with the same result.
>
> Michael.
>
Yes I thought about that, but then you also have to deal with the case

pkg install jhandles-0.2.0.tar.gz java-1.2.0.tar.gz

as the install option also automatically includes the packages on the
path. This was why I went the load_in_order route.. To have
save_in_order we'd then have two choices. The easiest is just to remove
the above automatic inclusion of installed packages and make the use
call "pkg load" after the install. Otherwise we might save the package
files in the install process prior to call the load on the newly
installed packages.

I'm happy enough to implement it (or not all) in what ever way the
consensus seems to think is the appropriate manner.

D.


-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



reply via email to

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