bugGNU Octave - Bugs: bug #32049, -default option for pkg command

 
 

bug #32049: -default option for pkg command

Submitted by:  Josef Vukovic <josef>
Submitted on:  Tue 04 Jan 2011 05:05:05 PM UTC  
 
Category: Octave FunctionSeverity: 1 - Wish
Priority: 5 - NormalItem Group: Feature Request
Status: Wont FixAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Fri 13 Mar 2015 03:00:13 AM UTC, comment #8:

I'm closing this as won't fix since I don't think this feature is needed any more. The original problem was due to the way Debian configured the octave package, but it has been resolved in Debian and users can now install packages without the need for a new -default option.

Mike Miller <mtmiller>
Project Administrator
Sat 22 Feb 2014 10:51:06 PM UTC, comment #7:

Recategorizing this dusty bug as a feature request. If the people working on the project to enhance the pkg command want to pick this up they are welcome to it, or close as won't fix if it doesn't align with what the current vision for pkg is.

There should be no failure starting with the latest Debian packages, the prefix is no longer being overridden, users should now be allowed to install packages in their own prefix independent of where the system packages are installed.

Mike Miller <mtmiller>
Project Administrator
Sun 20 Feb 2011 05:56:20 PM UTC, comment #6:

Having something like described by David in comment #5 would be sensible. We have a bug report about this in Debian for quite some time:
http://bugs.debian.org/536839

Thomas (Debian maintainer)

Thomas Weber <tweber>
Thu 06 Jan 2011 10:59:08 PM UTC, comment #5:

These variables are persistent to allow something like

pkg prefix /usr/share/octave/packages/ /usr/lib/octave/packages
pkg install mypackage.tar.gz

to work over the two calls to pkg. So once the user sets these they stick. This means that the call that debain makes in octaverc sticks as well. It also has the side-effect of removing the distinction between a local and global install of a package, so the "-local" and "-global" flags will do nothing.

John if you instead do

pkg prefix ~/octave ~/octave

so that both the prefix and archprefix variables are set, I think you'll find this works.

However, should we have a way to define the default package location rather than hardcode it in pkg.m so that debian can set the system package directories to be where they want them without removing the capacity for the users to install the packages locally?

Something like

pkg prefix -default /usr/share/octave/packages/3.2 /usr/lib/octave/packages/3.2;

which would then overwrite prefix and archprefix, saves them as a system default value so that -global/-local can toggle between the default system prefix and the local user prefix, without marking the change as having defined a new user prefix.

I attach a patch as an idea of what I mean.

D.

PS: This isn't an octave-forge bug as pkg is a core function of Octave.

(file #22366)

David Bateman <dbateman>
Project Member
Thu 06 Jan 2011 04:54:54 PM UTC, comment #4:

I can duplicate this problem on my system with Octave 3.2.4 installed from the Debian package. The problem there is that the system-wide octaverc file /usr/share/octave/3.2.4/m/startup/octaverc includes the line

pkg prefix /usr/share/octave/packages/3.2 /usr/lib/octave/packages/3.2;

This setting is persistent, so until you set it to something else it sticks.

What happens if you type

pkg prefix

just after starting Octave?

I thought it would be possible to avoid the problem by doing

pkg prefix ~/octave

before installing the package, but that doesn't seem to work for me.

I think someone who understands pkg.m better than I do will have to debug this further.
pkg

John W. Eaton <jwe>
Project Administrator
Thu 06 Jan 2011 04:06:00 PM UTC, comment #3:

I unistalled the package communications and tryed to install it
without to be root. Here is what happens

octave:1> pkg install ~/src/octaveforge/communications-1.0.10.tar.gz
couldn't create installation directory /usr/share/octave/packages/3.2/communications-1.0.10 : Permission denied
error: called from `pkg>copy_files' in file /usr/share/octave/3.2.3/m/pkg/pkg.m near line 1431, column 7
error: called from:
error: /usr/share/octave/3.2.3/m/pkg/pkg.m at line 756, column 5
error: /usr/share/octave/3.2.3/m/pkg/pkg.m at line 287, column 7
octave:1>

even if I use pkg install -local I can't install the package

octave:2> pkg install -local ~/src/octaveforge/communications-1.0.10.tar.gz
couldn't create installation directory /usr/share/octave/packages/3.2/communications-1.0.10 : Permission denied
error: called from `pkg>copy_files' in file /usr/share/octave/3.2.3/m/pkg/pkg.m near line 1431, column 7
error: called from:
error: /usr/share/octave/3.2.3/m/pkg/pkg.m at line 756, column 5
error: /usr/share/octave/3.2.3/m/pkg/pkg.m at line 287, column 7
octave:2>

So, porbably no need to delete the bugreport, if it is no porblem to post octave-forge bugs to the octave bug reporter.

Josef Vukovic <josef>
Tue 04 Jan 2011 09:06:33 PM UTC, comment #2:

This show work as a user or as root, with the package installed to the users home when installed as a user. However, the Galois field code in the communications package takes sometime to compile and I suspect that if you waited longer it would have installed fine.

If you instead run

pkg install -verbose ~/src/octaveforge/communications-1.0.10.tar.gz

you can follow the compilation of the Galois field code.

I'm marking this bug as "Need Info", but will probably close it as you seem to have your own solution

D.

David Bateman <dbateman>
Project Member
Tue 04 Jan 2011 05:19:27 PM UTC, comment #1:

Now it works: solution was to start octave with root privileges
like: sudo octave

Maybe the package should print something like: you must run the installation as root

Josef Vukovic <josef>
Tue 04 Jan 2011 05:05:05 PM UTC, original submission:

I downloaded "comunications-1.0.10.tar.gz from the octave forge
project to do some am modulation experiments, but when starting
octave and typing after the prompt:

octave:1> pkg install ~/src/octaveforge/communications-1.0.10.tar.gz

Octave hangs, nothing is displayed. Stoping it with ctrl-c I get
the messages:

^Cmake: *** wait: No child processes. Stop.
make: *** Waiting for unfinished jobs....
make: *** wait: No child processes. Stop.

Josef Vukovic <josef>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #22366:  patch.pkg added by dbateman (3KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by rik5 (Updated the item)
  • -unavailable- added by tweber (Posted a comment)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by dbateman (Posted a comment)
  • -unavailable- added by josef (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 13 Mar 2015 03:00:13 AM UTCmtmillerStatusPostponed=>Wont Fix
      Open/ClosedOpen=>Closed
    Sat 22 Feb 2014 10:51:06 PM UTCmtmillerCategoryLibraries=>Octave Function
      Severity3 - Normal=>1 - Wish
      Item GroupInstallation Failure=>Feature Request
      StatusNeed Info=>Postponed
      Release3.2.3=>dev
    Wed 28 Sep 2011 07:20:05 PM UTCrik5SummaryInstallation off package "communications" from octave forge fails.=>-default option for pkg command
    Thu 06 Jan 2011 10:59:08 PM UTCdbatemanAttached File-=>Added patch.pkg, #22366
    Tue 04 Jan 2011 09:06:33 PM UTCdbatemanStatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1