Bug 222163

Summary: 'make makepatch' does not explicitly extract the source tarball.
Product: Ports & Packages Reporter: Ed Schouten <ed>
Component: Ports FrameworkAssignee: Port Management Team <portmgr>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: adamw, arrowd, ports-bugs
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Ed Schouten freebsd_committer freebsd_triage 2017-09-09 06:33:46 UTC
Quick bug report before I'm on vacation, to make sure this won't get lost...

This morning I was slightly amazed that 'make makepatch' threw away all of my patches for a port. It turns out that if you run 'make clean' and thus no longer have a build directory for a port, it does nothing more than throwing away all of your patches.

I suspect that the 'makepatch' target should depend on 'patch', somewhere in Mk/.
Comment 1 Antoine Brodin freebsd_committer freebsd_triage 2017-09-09 06:44:07 UTC
Depending on patch is wrong since patch does a lot (shebanfix and post-patch for instance)
Comment 2 Mathieu Arnold freebsd_committer freebsd_triage 2017-09-09 08:27:57 UTC
There is no possible "good" way to have makepatch depend on anything.

While it needs to happen after do-patch, and for example, dos2unix, the post-patch and shebangfix should not run.
Comment 3 Ed Schouten freebsd_committer freebsd_triage 2017-09-09 18:13:54 UTC
If depending on some target is out of the question, maybe we should simply patch up 'makepatch' to explicitly bail out when WRKDIR does not exist?
Comment 4 Adam Weinberger freebsd_committer freebsd_triage 2017-09-09 18:46:17 UTC
The bail condition should probably be a lack of *.orig.
Comment 5 Gleb Popov freebsd_committer freebsd_triage 2019-10-27 10:50:23 UTC
I was unable to reproduce this with

make clean && make makepatch

on a port with patches in files/

Can we close this now?
Comment 6 Gleb Popov freebsd_committer freebsd_triage 2020-01-03 14:06:25 UTC
Taking the responsibility to close this.