Opened 9 years ago

Last modified 9 years ago

#45353 new defect

base - git and mercurial fetching target directory

Reported by: anddam (Andrea D'Amore) Owned by: macports-dev@…
Priority: Normal Milestone:
Component: base Version: 2.3.1
Keywords: base Cc:
Port:

Description

Portfetch supports five types of VCS: bazaar, CVS, subversion, mercurial and git. Fetch procedures portfetch::gitfetch and portfetch::hgfetch clone the remote repository into a directory whose name depends on $worksrcpath

This means that if a portfile author sets worksrcdir to ${distname}/src/ because the repository contains its source files in a subdirectory called src/, then the repository itself gets cloned as ${distname}/src and the actual source files will be stored at ${distname}/src/src.

This isn't the expected behavior.

I'm patching portfetch::gitfetch and portfetch::hgfetch so they'll clone the repository to what would have been the default worksrcdir. This way setting worksrcdir to ${distname}/src correctly execute the phases in ${worksrcpath}.

This can potentially break ports with augmented phases that are already coping with the previous wrong behavior, I'll do a check in dports tree to see if there are any of those before committing. Meanwhile any comment is appreciated.

Attachments (1)

patch-src-port1_0-portfetch_tcl.diff (2.1 KB) - added by anddam (Andrea D'Amore) 9 years ago.

Download all attachments as: .zip

Change History (2)

Changed 9 years ago by anddam (Andrea D'Amore)

comment:1 Changed 9 years ago by larryv (Lawrence Velázquez)

Just a heads up that my implementation of #16373 will soon render this particular issue moot.

Note: See TracTickets for help on using tickets.