pkg install

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

pkg install

Thomas D. Dean-2
I have a local package with a packinfo directory containing

 > ls packinfo
COPYING  DESCRIPTION  INDEX

The tar.gz file also contains these files

octave:77> pkg install geographiclib-1.0.0.tar.gz
package is missing file: COPYING
error: called from
     install>verify_directory at line 335 column 7
     install at line 109 column 9
     pkg at line 394 column 9
octave:77> ls geographiclib-1.0.0/packinfo/
COPYING  DESCRIPTION  INDEX

What am I doing wrong???

Tom Dean

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: pkg install

marco atzeri-2
On 03/06/2017 07:55, Thomas D. Dean wrote:

> I have a local package with a packinfo directory containing
>
>> ls packinfo
> COPYING  DESCRIPTION  INDEX
>
> The tar.gz file also contains these files
>
> octave:77> pkg install geographiclib-1.0.0.tar.gz
> package is missing file: COPYING
> error: called from
>     install>verify_directory at line 335 column 7
>     install at line 109 column 9
>     pkg at line 394 column 9
> octave:77> ls geographiclib-1.0.0/packinfo/
> COPYING  DESCRIPTION  INDEX
>
> What am I doing wrong???
>
> Tom Dean
>

I am not aware that geographiclib is a octave package.

packinfo is not in the usual structure of a
octave source package:

$ tar -tf io-2.4.7.tar.gz
io-2.4.7/
io-2.4.7/COPYING
io-2.4.7/DESCRIPTION
io-2.4.7/INDEX
io-2.4.7/NEWS
io-2.4.7/doc/
io-2.4.7/doc/READ-ODS.html
io-2.4.7/doc/READ-XLS.html
io-2.4.7/inst/
io-2.4.7/inst/__exit_io__.m
io-2.4.7/inst/__init_io__.m




_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: pkg install

Thomas D. Dean-2
On 06/03/2017 12:09 AM, Marco Atzeri wrote:

> On 03/06/2017 07:55, Thomas D. Dean wrote:
>> I have a local package with a packinfo directory containing
>>
>>> ls packinfo
>> COPYING  DESCRIPTION  INDEX
>>
>> The tar.gz file also contains these files
>>
>> octave:77> pkg install geographiclib-1.0.0.tar.gz
>> package is missing file: COPYING
>> error: called from
>>     install>verify_directory at line 335 column 7
>>     install at line 109 column 9
>>     pkg at line 394 column 9
>> octave:77> ls geographiclib-1.0.0/packinfo/
>> COPYING  DESCRIPTION  INDEX
>>
>> What am I doing wrong???
>>
>> Tom Dean
>>
>
> I am not aware that geographiclib is a octave package.
>
> packinfo is not in the usual structure of a
> octave source package:
>
> $ tar -tf io-2.4.7.tar.gz
> io-2.4.7/
> io-2.4.7/COPYING
> io-2.4.7/DESCRIPTION
> io-2.4.7/INDEX
> io-2.4.7/NEWS
> io-2.4.7/doc/
> io-2.4.7/doc/READ-ODS.html
> io-2.4.7/doc/READ-XLS.html
> io-2.4.7/inst/
> io-2.4.7/inst/__exit_io__.m
> io-2.4.7/inst/__init_io__.m
>
>
>

This is a local package, not distributed.

Most of these files are optional.  I read the package part of the docs.

As I understand it, on 'pkg install', octave executes the file PKG_ADD,
if it exists.

In my case, copying from the geometry package and changing some names,
PKG_ADD calls __geometry_package_register__ in the .m file of the same name.

But, I changed to a structure similar to the above.  More problems,
which I addressed in an email with a different subject.

Thanks for the reply.

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: pkg install

Mike Miller-4
On Sat, Jun 03, 2017 at 09:28:10 -0700, Thomas D. Dean wrote:
> Most of these files are optional.  I read the package part of the docs.

Yes, Marco's point was that the files must exist at the top-level of the
package, not in a packinfo directory. They get _moved_ to a packinfo
directory when the pkg is installed.

The bare minimum for a package that will install is:

    nothing/
    nothing/COPYING
    nothing/DESCRIPTION
    nothing/inst
    nothing/inst/something.m

The files COPYING and DESCRIPTION must exist. There are some required
fields in DESCRIPTION. There must be at least one file in the inst
directory. This package works for me.

--
mike

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: pkg install

Thomas D. Dean-2
On 06/03/2017 09:59 AM, Mike Miller wrote:

> On Sat, Jun 03, 2017 at 09:28:10 -0700, Thomas D. Dean wrote:
>> Most of these files are optional.  I read the package part of the docs.
>
> Yes, Marco's point was that the files must exist at the top-level of the
> package, not in a packinfo directory. They get _moved_ to a packinfo
> directory when the pkg is installed.
>
> The bare minimum for a package that will install is:
>
>      nothing/
>      nothing/COPYING
>      nothing/DESCRIPTION
>      nothing/inst
>      nothing/inst/something.m
>
> The files COPYING and DESCRIPTION must exist. There are some required
> fields in DESCRIPTION. There must be at least one file in the inst
> directory. This package works for me.
>

I tried that before and the package installs OK, loads Ok, but, the
functions in the package are not defined.


octave:18> pkg install -verbose geographiclib-1.0.0.tar.gz
mkdir (/tmp/oct-nGCXas)
untar (geographiclib-1.0.0.tar.gz, /tmp/oct-nGCXas)
octave:19> pkg list
Package Name       | Version | Installation directory
-------------------+---------+-----------------------
           control  |   3.0.0 | /home/tomdean/octave/control-3.0.0
    data-smoothing  |   1.3.0 | /home/tomdean/octave/data-smoothing-1.3.0
           general  |   2.0.0 | /home/tomdean/octave/general-2.0.0
     geographiclib  |   1.0.0 | /home/tomdean/octave/geographiclib-1.0.0
          geometry  |   3.0.0 | /home/tomdean/octave/geometry-3.0.0
             image  |   2.6.1 | /home/tomdean/octave/image-2.6.1
image-acquisition  |   0.2.2 | /home/tomdean/octave/image-acquisition-0.2.2
          interval  |   2.1.0 | /home/tomdean/octave/interval-2.1.0
                io  |   2.4.7 | /home/tomdean/octave/io-2.4.7
    linear-algebra  |   2.2.2 | /home/tomdean/octave/linear-algebra-2.2.2
           mapping  |   1.2.1 | /home/tomdean/octave/mapping-1.2.1
     miscellaneous  |   1.2.1 | /home/tomdean/octave/miscellaneous-1.2.1
               ocs  |   0.1.5 | /home/tomdean/octave/ocs-0.1.5
            odebvp  |   1.0.6 | /home/tomdean/octave/odebvp-1.0.6
            odepkg  |   0.8.5 | /home/tomdean/octave/odepkg-0.8.5
             optim  |   1.5.2 | /home/tomdean/octave/optim-1.5.2
        quaternion  |   2.4.0 | /home/tomdean/octave/quaternion-2.4.0
            signal  |   1.3.2 | /home/tomdean/octave/signal-1.3.2
           specfun  |   1.1.0 | /home/tomdean/octave/specfun-1.1.0
        statistics  |   1.3.0 | /home/tomdean/octave/statistics-1.3.0
            struct  |  1.0.14 | /home/tomdean/octave/struct-1.0.14
          symbolic  |   2.5.0 | /home/tomdean/octave/symbolic-2.5.0
           tomdean  |   1.0.0 | /home/tomdean/octave/tomdean-1.0.0
octave:20> pkg load geographiclib
octave:21> lat1 = -33.83; lon1 = 151.29;
octave:22> lat2 = -33.02; lon2 = -71.64;
octave:23> [s12e, azi1e] =   gedistance(lat1, lon1, lat2, lon2);
error: 'gedistance' undefined near line 1 column 17

octave:23> ls geographiclib-1.0.0/geographiclib
Contents.m          gedistance.m          geoid_height.m  polarst_fwd.m
cassini_fwd.m       gedoc.m               geoid_load.m    polarst_inv.m
cassini_inv.m       geocent_fwd.m         gereckon.m      private
defaultellipsoid.m  geocent_inv.m         gnomonic_fwd.m  projdoc.m
doc-cache           geodarea.m            gnomonic_inv.m  tranmerc_fwd.m
ecc2flat.m          geoddistance.m        loccart_fwd.m   tranmerc_inv.m
eqdazim_fwd.m       geoddoc.m             loccart_inv.m   utmups_fwd.m
eqdazim_inv.m       geodreckon.m          mgrs_fwd.m      utmups_inv.m
flat2ecc.m          geographiclib_test.m  mgrs_inv.m
octave:24> ls geographiclib-1.0.0/geographiclib/gedistance.m
geographiclib-1.0.0/geographiclib/gedistance.m

octave:23> ls geographiclib-1.0.0/geographiclib
Contents.m          gedistance.m          geoid_height.m  polarst_fwd.m
cassini_fwd.m       gedoc.m               geoid_load.m    polarst_inv.m
cassini_inv.m       geocent_fwd.m         gereckon.m      private
defaultellipsoid.m  geocent_inv.m         gnomonic_fwd.m  projdoc.m
doc-cache           geodarea.m            gnomonic_inv.m  tranmerc_fwd.m
ecc2flat.m          geoddistance.m        loccart_fwd.m   tranmerc_inv.m
eqdazim_fwd.m       geoddoc.m             loccart_inv.m   utmups_fwd.m
eqdazim_inv.m       geodreckon.m          mgrs_fwd.m      utmups_inv.m
flat2ecc.m          geographiclib_test.m  mgrs_inv.m
octave:24> ls geographiclib-1.0.0/geographiclib/gedistance.m
geographiclib-1.0.0/geographiclib/gedistance.m

octave:25> ls geographiclib-1.0.0
geographiclib  geographiclib-legacy  packinfo
octave:26> ls geographiclib-1.0.0/packinfo/
COPYING  DESCRIPTION  INDEX
octave:27> system('head  geographiclib-1.0.0/packinfo/INDEX')
geographiclib >> GeographicLib from GeographLib Matlab files
GeographicLib
   ans = 0
octave:28> system('head -5 geographiclib-1.0.0/packinfo/INDEX')
geographiclib >> GeographicLib from GeographLib Matlab files
GeographicLib
   ans = 0

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: pkg install

Olaf Till-2
In reply to this post by Mike Miller-4
On Sat, Jun 03, 2017 at 09:59:14AM -0700, Mike Miller wrote:
> There must be at least one file in the inst
> directory.

Are you sure? Having no inst directory at all (but having a src
directory) seems to work anyway.

Olaf

--
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: pkg install

Thomas D. Dean-2
I have created a very simple package that demonstrates my problem.

 > ls -R my-package|cat
my-package:
  COPYING
  DESCRIPTION
  inst

my-package/inst:
  funcs1
  funcs2

my-package/inst/funcs1:
  func1_do1.m
  func1_do2.m
  func1_do3.m

my-package/inst/funcs2:
  func2_do1.m
  func2_do2.m
  func2_do3.m

 > cat inst/funcs2/func2_do2.m
function [] = func2_do2()
   printf("This is the do2 file\n")
endfunction

## all of the funcx_dox.m files are the same except for the name and
## do1, do2, do3.

 > cat my-package/DESCRIPTION
name: my-package
Version: 1.0.0
Date: 2017-06-03
Title: My Very Own Package
Author: Old Me
Maintainer: Current Me
License: GPLv3+
Description: A package for my octave functions.
Categories: FUNCTIONS

 > cat my-package/COPYING
This is liscened GLL

 > pwd
~/work/my-package
 > cd ..
 > tar -cvzf my-package.tar.gz my-package

start command line octave

octave:1> pwd
ans = /home/tomdean/work
octave:2> pkg install -verbose my-package.tar.gz
mkdir (/tmp/oct-XNt88x)
untar (my-package.tar.gz, /tmp/oct-XNt88x)
warning: doc_cache_create: unusable help text found in file 'func1_do1'
warning: doc_cache_create: unusable help text found in file 'func1_do2'
warning: doc_cache_create: unusable help text found in file 'func1_do3'
warning: doc_cache_create: unusable help text found in file 'func2_do1'
warning: doc_cache_create: unusable help text found in file 'func2_do2'
warning: doc_cache_create: unusable help text found in file 'func2_do3'
octave:3> pkg list
Package Name       | Version | Installation directory
-------------------+---------+-----------------------
           control  |   3.0.0 | /home/tomdean/octave/control-3.0.0
    data-smoothing  |   1.3.0 | /home/tomdean/octave/data-smoothing-1.3.0
           general  |   2.0.0 | /home/tomdean/octave/general-2.0.0
          geometry  |   3.0.0 | /home/tomdean/octave/geometry-3.0.0
             image  |   2.6.1 | /home/tomdean/octave/image-2.6.1
image-acquisition  |   0.2.2 | /home/tomdean/octave/image-acquisition-0.2.2
          interval  |   2.1.0 | /home/tomdean/octave/interval-2.1.0
                io  |   2.4.7 | /home/tomdean/octave/io-2.4.7
    linear-algebra  |   2.2.2 | /home/tomdean/octave/linear-algebra-2.2.2
           mapping  |   1.2.1 | /home/tomdean/octave/mapping-1.2.1
     miscellaneous  |   1.2.1 | /home/tomdean/octave/miscellaneous-1.2.1
        my-package  |   1.0.0 | /home/tomdean/octave/my-package-1.0.0
               ocs  |   0.1.5 | /home/tomdean/octave/ocs-0.1.5
            odebvp  |   1.0.6 | /home/tomdean/octave/odebvp-1.0.6
            odepkg  |   0.8.5 | /home/tomdean/octave/odepkg-0.8.5
             optim  |   1.5.2 | /home/tomdean/octave/optim-1.5.2
        quaternion  |   2.4.0 | /home/tomdean/octave/quaternion-2.4.0
            signal  |   1.3.2 | /home/tomdean/octave/signal-1.3.2
           specfun  |   1.1.0 | /home/tomdean/octave/specfun-1.1.0
        statistics  |   1.3.0 | /home/tomdean/octave/statistics-1.3.0
            struct  |  1.0.14 | /home/tomdean/octave/struct-1.0.14
          symbolic  |   2.5.0 | /home/tomdean/octave/symbolic-2.5.0
           tomdean  |   1.0.0 | /home/tomdean/octave/tomdean-1.0.0
octave:4> pkg load my-package
octave:5> func2_do2
error: 'func2_do2' undefined near line 1 column 1

How do I get pkg install to recognize it needs another layer added to
the path?



_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: pkg install

Thomas D. Dean-2
On 06/03/2017 12:57 PM, Thomas D. Dean wrote:
> I have created a very simple package that demonstrates my problem.
>

<snip>

Sorry to answer my own post.

Again, copying from the geometry package - thanks Juan Pablo Carbajal.

I inserted a file into the inst directory containing code to invoke
addpath.  This file named __<package_name>_package_register__ contains
two lines,
## PKG_ADD ...
## PKG_DEL ...

which become the PKG_ADD/DEL files in the unpacked directory.

Again, thanks Juan Pablo Carbajal.



_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: pkg install

Carlo de Falco-2
In reply to this post by marco atzeri-2

> On 3 Jun 2017, at 09:09, Marco Atzeri <[hidden email]> wrote:
>
> packinfo is not in the usual structure of a
> octave source package:

packinfo is automatically generated by the installation process it is not in the sources.
c.



_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Loading...