gnu-octave/statistics-resampling

Wrong url reference to latest release

pr0m1th3as opened this issue · 9 comments

In Octave 7.2

>> pkg install -forge statistics-resampling
error: unpack: unarchiving program exited with status: 2
gzip: stdin has more than one entry--rest ignored
tar: Child returned status 2
tar: Error is not recoverable: exiting now
error: called from
    unpack at line 283 column 5
    untar at line 48 column 5
    install at line 99 column 9
    pkg at line 612 column 9

I looked into it a bit and apparently, the url reference in packages/packages/statistics-resampling.yaml for the latest release is

versions:
- id: "5.5.4"
  date: "2024-01-08"
  sha256: "09b92b306cb2d801ec12d7f0015228d4bb31e55047c5824b9b32f5e2fb4df4d4"
  url: "https://github.com/gnu-octave/statistics-resampling/archive/refs/tags/v5.5.4.zip"
  depends:
  - "octave (>= 4.4.0)"
  - "pkg"

whereas your tar.gz and zip files are named
https://github.com/gnu-octave/statistics-resampling/archive/refs/tags/5.5.4.tar.gz
https://github.com/gnu-octave/statistics-resampling/archive/refs/tags/5.5.4.zip
without the v ! Please, make a PR to packages to fix this.

acp29 commented

hi @pr0m1th3as, I couldn't reproduce that error, it installed fine for me with the -forge argument. In any case, I created a PR (gnu-octave/packages#388). Is this what you meant?

Yes, this should fix the issue.

acp29 commented

ok, I've merged it. I'll close this issue for now but please let me know if the problem persists

I just tested it with -forge option and it still produces an error

>> pkg install -forge statistics-resampling
error: pkg: could not download file /tmp/statistics-resampling-5.5.5-qF0MOL.tar.gz from URL https://packages.octave.org/download/statistics-resampling-5.5.5.tar.gz
error: called from
    pkg at line 542 column 13

if i put the url link instead, it works

>> pkg install "https://github.com/gnu-octave/statistics-resampling/archive/refs/tags/5.5.5.zip"
>> pkg list
Package Name           | Version | Installation directory
-----------------------+---------+-----------------------
              control  |   4.0.0 | /home/promitheas/.local/share/octave/api-v57/packages/control-4.0.0
                   io  |   2.6.4 | /home/promitheas/.local/share/octave/api-v57/packages/io-2.6.4
       pkg-octave-doc  |   0.5.1 | .../promitheas/.local/share/octave/api-v57/packages/pkg-octave-doc-0.5.1
               signal  |   1.4.5 | /home/promitheas/.local/share/octave/api-v57/packages/signal-1.4.5
           statistics  |   1.6.1 | /home/promitheas/.local/share/octave/api-v57/packages/statistics-1.6.1
statistics-resampling  |   5.5.5 | .../.local/share/octave/api-v57/packages/statistics-resampling-5.5.5

Closing and re-opening Octave again produced this

>> pkg install -forge statistics-resampling
error: unpack: unarchiving program exited with status: 2
gzip: stdin has more than one entry--rest ignored
tar: Child returned status 2
tar: Error is not recoverable: exiting now
error: called from
    unpack at line 283 column 5
    untar at line 48 column 5
    install at line 99 column 9
    pkg at line 612 column 9

I am not sure why this is happening

acp29 commented

@pr0m1th3as that is strange. I closed and reopened octave and it works fine for me:

>> ver
----------------------------------------------------------------------
GNU Octave Version: 8.4.0 (hg id: 78c13a2594f3)
GNU Octave License: GNU General Public License
Operating System: Darwin 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:54:10 PST 2023; root:xnu-10002.61.3~2/RELEASE_X86_64 x86_64
----------------------------------------------------------------------
Package Name    | Version | Installation directory
----------------+---------+-----------------------
         coder  |   1.8.4 | /Users/andrewcpenn/.local/share/octave/api-v58/packages/coder-1.8.4
 generate_html  |   0.3.3 | /Users/andrewcpenn/.local/share/octave/api-v58/packages/generate_html-0.3.3
            io  |   2.6.4 | /Users/andrewcpenn/.local/share/octave/api-v58/packages/io-2.6.4
      parallel  |   4.0.2 | /Users/andrewcpenn/.local/share/octave/api-v58/packages/parallel-4.0.2
pkg-octave-doc  |   0.5.0 | /Users/andrewcpenn/.local/share/octave/api-v58/packages/pkg-octave-doc-0.5.0
    statistics  |   1.6.0 | /opt/local/share/octave/packages/statistics-1.6.0
        struct  |  1.0.18 | /Users/andrewcpenn/.local/share/octave/api-v58/packages/struct-1.0.18
>> pkg install -forge statistics-resampling
ld: warning: duplicate -bundle_loader option, '/opt/local/bin/octave-8.4.0' ignored
ld: warning: duplicate -bundle_loader option, '/opt/local/bin/octave-8.4.0' ignored
ld: warning: duplicate -bundle_loader option, '/opt/local/bin/octave-8.4.0' ignored
ld: warning: duplicate -bundle_loader option, '/opt/local/bin/octave-8.4.0' ignored
>> ver
----------------------------------------------------------------------
GNU Octave Version: 8.4.0 (hg id: 78c13a2594f3)
GNU Octave License: GNU General Public License
Operating System: Darwin 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:54:10 PST 2023; root:xnu-10002.61.3~2/RELEASE_X86_64 x86_64
----------------------------------------------------------------------
Package Name           | Version | Installation directory
-----------------------+---------+-----------------------
                coder  |   1.8.4 | /Users/andrewcpenn/.local/share/octave/api-v58/packages/coder-1.8.4
        generate_html  |   0.3.3 | /Users/andrewcpenn/.local/share/octave/api-v58/packages/generate_html-0.3.3
                   io  |   2.6.4 | /Users/andrewcpenn/.local/share/octave/api-v58/packages/io-2.6.4
             parallel  |   4.0.2 | /Users/andrewcpenn/.local/share/octave/api-v58/packages/parallel-4.0.2
       pkg-octave-doc  |   0.5.0 | /Users/andrewcpenn/.local/share/octave/api-v58/packages/pkg-octave-doc-0.5.0
           statistics  |   1.6.0 | /opt/local/share/octave/packages/statistics-1.6.0
statistics-resampling  |   5.5.5 | /Users/andrewcpenn/.local/share/octave/api-v58/packages/statistics-resampling-5.5.5
               struct  |  1.0.18 | /Users/andrewcpenn/.local/share/octave/api-v58/packages/struct-1.0.18  

I'm running Octave 8.4 on MacOS. What OS are you running it on? Is it only recently you tried installing the package this way? I recently switched to linking to .zip instead of .tar.gz compressed archives of the package. Do you get the same issue using either of the following commands?

pkg install "https://github.com/gnu-octave/statistics-resampling/archive/refs/tags/5.5.5.tar.gz
pkg install "https://github.com/gnu-octave/statistics-resampling/archive/refs/tags/5.5.5.zip

P.S. I've got the ld warnings when compiling c++ code since updating my macos version from Catalina to Sonoma so I don't think those are unique or significant here (unless someone knows something I don't)

Thanks for your patience in trying to resolving this

I have only tested it on Octave 7.2 on Ubuntu 20.04. It was the first time I tested it with -forge option. Using the URL works just fine. I don't know why this is happening. Perhaps, we could open an issue at discord to make this a bit more visible to other devs, who might have an idea why this occurs and what the problem might be

acp29 commented

@pr0m1th3as I think I have resolved this now (https://octave.discourse.group/t/error-installing-a-package-via-the-pkg-install-forge/5201/7). Could you please confirm? I'll then close this issue

I 've tested this on Octave 7.2 as well. Tested earlier on Octave 8.2 as mentioned at Discourse. You can close this issue!