|Summary:||Making CKSUMFILES more flexible by allowing USES clauses to add files there|
|Product:||Ports & Packages||Reporter:||Yuri Victorovich <yuri>|
|Component:||Ports Framework||Assignee:||Port Management Team <portmgr>|
|Status:||Closed Feedback Timeout|
|Severity:||Affects Only Me||CC:||ports-bugs|
|Bug Depends on:|
Description Yuri Victorovich 2015-11-30 07:05:19 UTC
Created attachment 163673 [details] patch The patch makes it possible for certain USES clauses to control (add to) what distfiles are included in distinfo. This is needed to support more complex USES=nodejs fetch stage that will be made dependent on this bug.
Comment 1 Mathieu Arnold 2015-11-30 10:24:28 UTC
CKSUMFILES is an internal variables, you can't use it directly, you should use DISTFILES or PATCHFILES.
Comment 2 Yuri Victorovich 2015-11-30 10:46:39 UTC
DISTFILES is usually sufficient. But I have 2 sets of distfiles: originally downloaded (DISTFILES1), and generated by fetch (DISTFILES2). distinfo should have DISTFILES1 and DISTFILES2, but MASTER_BACKUP_SITE should only have DISTFILES2. This is why I prefer to keep the distinction between CKSUMFILES and DISTFILES. There should also be BACKUP_FILES variable. Usually they are all the same, but not in my case. NodeJS downloads things in the process, that's why it calls for a very complex fetch stage with its own ins and outs, all of which are distfiles. The result overall looks like download, with custom process running inside.
Comment 3 Mathieu Arnold 2015-11-30 13:25:04 UTC
All this seems like over-engineering. Would it not be simpler to replicate what npm does instead of trying to coerce it and the ports framework to work together ?
Comment 4 Yuri Victorovich 2015-11-30 20:44:12 UTC
npm first pre-builds locally, then places the result into another, separate hosting location, and then during port build they just download and unpack it. There are many NodeJS projects, you can't make everybody do this manually. And the way I suggested with USES=nodejs circumvents the problem, and builds it all in a close to normal way. Please note that the fetch is really a fancy fetch, it doesn't compile anything. This makes it a bit difficult to implement USES=nodejs, but easy to make many ports based on it.