help-octave
[Top][All Lists]
Advanced

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

Re: Ubuntu 12.04 "pkg install" does not work


From: c.
Subject: Re: Ubuntu 12.04 "pkg install" does not work
Date: Mon, 9 Sep 2013 11:30:18 +0200

On 9 Sep 2013, at 08:46, Thomas Weber <address@hidden> wrote:

> On Fri, Sep 06, 2013 at 04:59:02PM +0200, c. wrote:
>> 
>> On 6 Sep 2013, at 15:13, Jordi GutiƩrrez Hermoso <address@hidden> wrote:
>> 
>>> They don't.
>> 
>> What I meant is the following lines in "octave.conf" installed from
>> 
>> from 
>> "http://archive.ubuntu.com/ubuntu/pool/universe/o/octave/octave_3.6.4-3.debian.tar.gz":
>> 
>>  suffix = "/octave/packages";
>>  pkg ("prefix", sprintf ("%s%s", octave_config_info ("datadir"), suffix),
>>               sprintf ("%s%s", octave_config_info ("libdir"), suffix));
>>  clear suffix;
>> 
>> this automatically switches the installation prefix to system directories 
>> that are not accessible
>> to normal users, therefore by default only superuser may install packages.
>> 
>> I don't understand why this is necessary.
> 
> https://savannah.gnu.org/bugs/?func=detailitem&item_id=32049#comment5
> 
> Once we switch the directories, there is no way to set them back. And we
> have to switch them when building packages.
> 
>       Thomas

Hi Thomas,

Thanks for trying to explain!

I still don't understand exactly what you mean, 
so my comment below might make no sense, but if 
you _HAVE TO_ set the prefix, 
why not just set it differently for normal users and superuser:

if (geteuid () == 0)
 suffix = "/octave/packages";
 pkg ("prefix", sprintf ("%s%s", octave_config_info ("datadir"), suffix),
      sprintf ("%s%s", octave_config_info ("libdir"), suffix));
 clear suffix;
else
  pkg ("prefix", "~/octave", "~/octave");
end

c.

reply via email to

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