Opened 15 years ago
Last modified 22 months ago
#29093 assigned defect
changing $worksrcdir break the build when using git.fetch or hg.fetch
| Reported by: | ci42 | Owned by: | raimue (Rainer Müller) |
|---|---|---|---|
| Priority: | Normal | Milestone: | MacPorts Future |
| Component: | base | Version: | 1.9.2 |
| Keywords: | haspatch | Cc: | raimue (Rainer Müller), tvb377@…, cooljeanius (Eric Gallager), anddam (Andrea D'Amore) |
| Port: |
Description
git/hg fetch the source code directly into $worksrcpath. If your port need to change the $worksrcdir (e.g. the source to be built is in a subdirectory) the build fails because $worksrcpath is defined as $workpath/$worksrcdir and the source is now in the wrong directory. See the attached portfile for an example that demostrates this behavior.
The suggested patch uses $workpath/$distname as the location for git/hg fetch.
Attachments (4)
Change History (20)
Changed 15 years ago by ci42
comment:1 follow-up: 2 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Note that you don't need to change worksrcdir in your portfile. You could instead change configure.dir and/or build.dir, for example.
comment:2 Changed 15 years ago by ci42
Replying to ryandesign@…:
Note that you don't need to change worksrcdir in your portfile. You could instead change configure.dir and/or build.dir, for example.
I know, and for this portfile this is already fixed (see #28799). I used this as an example because I encountered this bug while developing the portfile. The problem is there anyway.
comment:3 Changed 15 years ago by raimue (Rainer Müller)
| Keywords: | haspatch added |
|---|---|
| Milestone: | → MacPorts 2.0.0 |
comment:4 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
| Cc: | ryandesign@… added |
|---|
I don't think there's any need to wait until 2.0.0; I don't think changing this should break any existing ports. At the same time, we can fix fetch.type svn to have the same behavior; it's always bugged me that it behaved differently.
comment:5 Changed 15 years ago by raimue (Rainer Müller)
| Cc: | raimue@… added |
|---|
I thought we do not want to do any 1.x release anymore? Other changes on trunk are currently targeting 2.0.
comment:7 follow-ups: 8 9 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
| Cc: | ryandesign@… removed |
|---|---|
| Owner: | changed from macports-tickets@… to ryandesign@… |
| Status: | new → assigned |
This needs to be fixed differently. hgfetch and gitfetch need to be rewritten to use command_exec (like bzrfetch, cvzfetch and svnfetch do) instead of system.
comment:8 Changed 15 years ago by ci42
Replying to ryandesign@…:
This needs to be fixed differently.
hgfetchandgitfetchneed to be rewritten to usecommand_exec(likebzrfetch,cvzfetchandsvnfetchdo) instead ofsystem.
Please have a look at the new patch. It uses the 'command_exec' for git.fetch and fetches the source to '$workpath/$distname' like the first patch. Feedback and suggestions are welcome.
comment:9 Changed 15 years ago by ci42
Replying to ryandesign@…:
This needs to be fixed differently.
hgfetchandgitfetchneed to be rewritten to usecommand_exec(likebzrfetch,cvzfetchandsvnfetchdo) instead ofsystem.
Please have a look at the latest patch. 'command_exec' is used for both git.fetch and hg.fetch. The source will also be fetched to '$workpath/$distname' like the first patch does. Feedback and suggestions are welcome.
Changed 15 years ago by ci42
| Attachment: | portfetch.tcl.3.diff added |
|---|
use command_exec for git.fetch and hg.fetch
comment:12 Changed 8 years ago by neverpanic (Clemens Lang)
| Milestone: | MacPorts Future → MacPorts 2.5.0 |
|---|---|
| Owner: | changed from ryandesign to raimue |
Let's check whether this is still a problem. If so, we'll consider it for 2.5.0 – maybe this is fixed with the VCS fetch caching changes.
comment:13 Changed 8 years ago by neverpanic (Clemens Lang)
| Milestone: | MacPorts 2.5.0 → MacPorts 2.6.0 |
|---|
comment:14 Changed 6 years ago by jmroot (Joshua Root)
| Milestone: | MacPorts 2.6.0 → MacPorts 2.7.0 |
|---|
Ticket retargeted after milestone closed
comment:15 Changed 5 years ago by jmroot (Joshua Root)
| Milestone: | MacPorts 2.7.0 → MacPorts Future |
|---|
Ticket retargeted after milestone closed
comment:16 Changed 22 months ago by ryandesign (Ryan Carsten Schmidt)
| Cc: | anddam added |
|---|
Has duplicate #45353.

use this to reproduce the bug