bugGNU Octave - Bugs: bug #57545, [octave forge] downloading...

 
 

bug #57545: [octave forge] downloading packages with wget results in incorrect package filenames

Submitter:  marco atzeri <matzeri>
Submitted:  Mon 06 Jan 2020 06:27:41 PM UTC
   
 
Category:  Octave Forge website Severity:  1 - Wish
Priority:  3 - Low Item Group:  Incorrect Result
Status:  Works For Me Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * other Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 08 Jan 2020 02:00:26 AM UTC, comment #3: 

Great, closing item as "Works For Me".

Kai Torben Ohlhus <siko1056>
Group Member
Tue 07 Jan 2020 07:25:48 PM UTC, comment #2: 

Thanks Kai for the hint

wget --content-disposition

works as expected. I can work to adjust our build tool to use it

marco atzeri <matzeri>
Tue 07 Jan 2020 03:13:01 AM UTC, comment #1: 

This seems to be a general limitation of SourceForge.  In Octave's `pkg` tool the `url` for the download and the "expected filename" `local_file`) has to be generated using two private functions `get_forge_download()` and `get_forge_pkg()` to finally call something like:


[files, succ] = urlwrite (url, local_file);


https://hg.savannah.gnu.org/hgweb/octave/file/248b7b8f5a65/scripts/pkg/pkg.m#l409

Either you mimic Octave's pkg behavior, or I recently read about `--content-disposition` at https://stackoverflow.com/a/27816321/3778706


wget --content-disposition https://octave.sourceforge.io/download.php?package=arduino-0.4.0.tar.gz


If you are fine with this workaround, this item can be closed.

Kai Torben Ohlhus <siko1056>
Group Member
Mon 06 Jan 2020 06:27:41 PM UTC, original submission:  

The links provided for downloading the packages are producing
files with incorrect name when downloaded with wget.
I am using wget as it is standard tool belonging to the cygwin package build architecture.

Example:
$ wget https://octave.sourceforge.io/download.php?package=arduino-0.4.0.tar.gz
...
Saving to: ‘download.php@package=arduino-0.4.0.tar.gz’

download.php@packag 100%[===================>] 435.80K  71.7KB/s    in 6.1s

2020-01-06 19:13:12 (71.7 KB/s) - ‘download.php@package=arduino-0.4.0.tar.gz’ saved [446261/446261]

I would expect a file called just arduino-0.4.0.tar.gz

marco atzeri <matzeri>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by matzeri (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-01-08 siko1056 Open/ClosedOpen Closed
    2020-01-07 siko1056 Severity3 - Normal 1 - Wish
        Priority5 - Normal 3 - Low
        StatusNone Works For Me
        Summarydownloading packages with wget results in incorrect package filenames [octave forge] downloading packages with wget results in incorrect package filenames

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code