Opened 2 years ago

Closed 2 years ago

#64223 closed defect (invalid)

portgroup github: unexpected tarball_from behavior

Reported by: jasonliu-- (Jason Liu) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc:
Port: pg-github-1.0

Description

I'm working on a new portfile, and I need to use the github.tarball_from option to retrieve the full tarball that includes all of the submodules. Here's what I have in my file:

PortGroup           github 1.0

github.setup        mumble-voip mumble 1.3.4
github.tarball_from releases

However, when I specify github.tarball_from releases in my portfile, MacPorts doesn't appear to be fetching the correct tarball. In theory, according to the PortGroup file, github.tarball_from releases should trigger the following URL to be set:

switch ${args} {
    ...
    releases {
        github.master_sites ${github.homepage}/releases/download/${git.branch}
    }
    ...
}

If you go to the releases page of the port that I'm working on, the URL on the file that I want fetched appears to be correct, i.e. the link for the file listed as "mumble-1.3.4.tar.gz" corresponds to: https://github.com/mumble-voip/mumble/releases/download/1.3.4/mumble-1.3.4.tar.gz. This file should be approximately 8.59 MB in size. However, the file that the MacPorts build system actually fetches corresponds to the Source code (tar.gz) file, which is only around 4.9 MB in size. Perhaps something is wrong with the handle_tarball_from proc?

Change History (4)

comment:1 Changed 2 years ago by jmroot (Joshua Root)

Can't reproduce.

% sudo port -v checksum
--->  Fetching distfiles for mumble
--->  mumble-1.3.4.tar.gz does not exist in /opt/local/var/macports/distfiles/mumble
--->  Attempting to fetch mumble-1.3.4.tar.gz from https://distfiles.macports.org/mumble
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
--->  Attempting to fetch mumble-1.3.4.tar.gz from https://github.com/mumble-voip/mumble/releases/download/1.3.4
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   654  100   654    0     0    485      0  0:00:01  0:00:01 --:--:--   485
100 8391k  100 8391k    0     0  1770k      0  0:00:04  0:00:04 --:--:-- 3513k
--->  Verifying checksums for mumble
--->  Checksumming mumble-1.3.4.tar.gz
Error: No checksum set for mumble-1.3.4.tar.gz
The correct checksum line may be:
checksums           rmd160  746994643c9b1177cf635be377ffc2ec1cdc0931 \
                    sha256  615f4ebfc3385d945163f369efd3e910c8b6d0f025797a7eed541515fccb6093
% ls -l /opt/local/var/macports/distfiles/mumble/mumble-1.3.4.tar.gz
-rw-r--r--  1 macports  admin  8592741 16 Dec 07:20 /opt/local/var/macports/distfiles/mumble/mumble-1.3.4.tar.gz

comment:2 Changed 2 years ago by jasonliu-- (Jason Liu)

Is something wrong with the MacPorts on my machine, then? Has anyone else every complained about such a thing happening (i.e. MacPorts trying to fetch distfiles from the wrong location)?

comment:3 Changed 2 years ago by jasonliu-- (Jason Liu)

Wait a minute, you know what? I'm an idiot. I forgot to delete the previously downloaded distfile from /opt/local/var/macports/distfiles after I added the github.tarball_from releases line, so MacPorts thought that it had already downloaded the distfile (which was the "Source code (tar.gz)" file, from before I added the tarball_from line). Deleting the old distfile forced MacPorts to download the tarball again, which this time was the one I was expecting.

You can close this ticket with a resolution of "problem with keyboard-to-chair interface".

comment:4 Changed 2 years ago by jmroot (Joshua Root)

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.