Opened 10 years ago

Closed 5 days ago

#45353 closed defect (duplicate)

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: 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) 10 years ago.

Download all attachments as: .zip

Change History (3)

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

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

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

comment:2 Changed 5 days ago by ryandesign (Ryan Carsten Schmidt)

Keywords: base removed
Resolution: duplicate
Status: newclosed
Summary: base - git and mercurial fetching target directorygit and mercurial fetching target directory

Duplicate of #29093.

Note: See TracTickets for help on using tickets.