Opened 4 years ago
Last modified 21 months ago
#62260 new defect
github and bitbucket portgroups: Remove post-extract block
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | portgroup | Cc: | kencu (Ken), mascguy (Christopher Nielsen) |
Port: | github bitbucket |
Description
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 (7)
comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 4 years ago by ryandesign (Ryan Carsten 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 3 years ago by ryandesign (Ryan Carsten Schmidt)
comment:4 Changed 2 years ago by mascguy (Christopher Nielsen)
Keywords: | portgroup added |
---|
Add keyword portgroup, to pg-related tickets
comment:5 Changed 2 years ago by mascguy (Christopher Nielsen)
Cc: | mascguy added |
---|
comment:6 Changed 23 months ago by ryandesign (Ryan Carsten Schmidt)
Replying to ryandesign:
The entire post-extract block should be superfluous as of MacPorts 2.6.0 which creates a symlink of the expected name for you.
This change in base was reverted after MacPorts 2.8.
comment:7 Changed 21 months ago by ryandesign (Ryan Carsten Schmidt)
The github portgroup's post-extract block was removed in [c97c7bdae9e90d22924637f003eefb7b568ad25b/macports-ports]. The bitbucket portgroup's is still there.
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.