Opened 22 months ago

Last modified 3 months ago

#62260 new defect

github and bitbucket portgroups: Remove post-extract block

Reported by: ryandesign (Ryan Schmidt) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: portgroup Cc: kencu (Ken), mascguy (Christopher Nielsen)
Port: github bitbucket


The github 1.0 portgroup's post-extract block exists so that automatically-generated "tarball"-type distfiles, which have enclosing directory names that contain the commit hash, can be automatically renamed to the name that the port expects ($distname).

This code was never properly guarded against other download types. It should never have taken effect for "download" or "release"-type distfiles, but does, which causes problems in some cases; see comments on [5c5ec4019e9dafb7d80a068a00b5a9b7e4585f0e/macports-ports].

The entire post-extract block should be superfluous as of MacPorts 2.6.0 which creates a symlink of the expected name for you. I am testing the deletion of this block in my local ports tree and will commit it if no problems are found after awhile.

The bitbucket 1.0 portgroup, having been based on the github 1.0. portgroup, has this block too.

The gitlab 1.0 portgroup, having been based on these portgroups, has this block too, but there it is already commented out.

Change History (5)

comment:1 Changed 22 months ago by ryandesign (Ryan Schmidt)

optool is an example of a port that will fail to extract if this change is made. optool uses a post-extract block to move things around inside worksrcdir. The problem seems to be that MacPorts base does not create the worksrcdir symlink until after the extract phase is done, but optool and other such ports need the symlink to exist before their post-extract phases run. Maybe MacPorts base can be improved to create the symlink earlier.

comment:2 Changed 22 months ago by ryandesign (Ryan Schmidt)

Hm no, MacPorts creates the symlink right after extraction, but only if the port only extracts one directory. optool extracts three directories, from three different distfiles. optool is far from the only port to do that sort of thing, so we have to continue to accommodate it. So I think we can't remove the portgroup's post-extract after all. But we can and should make sure that it only takes effect for tarball and archive types, and if we can fix #58647 then it would only be needed for tarball type.

comment:3 Changed 8 months ago by ryandesign (Ryan Schmidt)

In 6306106231c1c0eb278d9431ee9bbeb1d9f620a1/macports-ports (master):

github-1.0.tcl: Only rename dir for tarball type

See: #62260

comment:4 Changed 3 months ago by mascguy (Christopher Nielsen)

Keywords: portgroup added

Add keyword portgroup, to pg-related tickets

comment:5 Changed 3 months ago by mascguy (Christopher Nielsen)

Cc: mascguy added
Note: See TracTickets for help on using tickets.