Bug 204905

Summary: Moved Mk/bsd.sites.mk up before USES clauses take effect
Product: Ports & Packages Reporter: Yuri Victorovich <yuri>
Component: Ports FrameworkAssignee: Port Management Team <portmgr>
Status: Closed Not Accepted    
Severity: Affects Only Me CC: ports-bugs
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 204577    
Attachments:
Description Flags
patch none

Description Yuri Victorovich freebsd_committer freebsd_triage 2015-11-30 07:24:30 UTC
Created attachment 163674 [details]
patch

This patch moves 'include "${PORTSDIR}/Mk/bsd.sites.mk"' up before USES clauses are included. bsd.sites.mk is related to fetch stage, and most USES clauses are related to the build stage. So it is natural to have bsd.sites.mk preceding USES. This also allows USES clauses to have access to distfile list, which is currently impossible.

This is particularly needed for the new USES=nodejs that I am working on, which works during the fetch stage and needs to have access to and manipulate with DISTFILES produced by bsd.sites.mk.
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2015-12-11 10:45:15 UTC
I've built 1800+ packages with this patch, it doesn't seem to affect anything. Not it is expected to.
Comment 2 Antoine Brodin freebsd_committer freebsd_triage 2015-12-20 18:08:21 UTC
This breaks ports that add stuff to PATCH_SITES/MASTER_SITES after including <bsd.port.pre.mk>  (yes there are some).

You shouldn't need to do this to manipulate DISTFILES.
Comment 3 Yuri Victorovich freebsd_committer freebsd_triage 2016-05-07 18:52:55 UTC
This isn't necessary for USES=nodejs any more.