Releasing code as portgroup instead of in base/
ryandesign at macports.org
Mon Oct 13 15:19:52 PDT 2014
On Oct 13, 2014, at 5:00 PM, Daniel J. Luke wrote:
> On Oct 13, 2014, at 5:54 PM, Ryan Schmidt wrote:
>>> On Oct 10, 2014, at 9:05 AM, Daniel J. Luke wrote:
>>>> I disagree that we should move as many portgroups as possible into base. Moving the portgroups out of base and into the ports tree years ago has been of great benefit in encouraging the development of portgroups. No matter how agile the release process of base may become, nothing compares to being able to put a file in a directory and having it available to the entire MacPorts userbase in minutes.
>>> right - and I'm saying that that's actually a problem
>>> 'easy' injection of code into the tree without going through any kind of release process/review is something we should minimize.
>> Playing devil's advocate for a moment, are you suggesting that we institute a similar release process/review for portfile changes?
> we should continue improving base/ (non-root execution, sandboxing, trace mode, etc) so that 'rogue' portfiles cannot do damage (or can do limited damage) so that this isn't necessary (or is less necessary).
Sure, and we're already pretty good at that, and will continue to get better. But if Portfiles cannot do damage, then portgroups, which are merely code included by portfiles, cannot do damage either. There's no difference in the capabilities of code in a portgroup vs code in a portfile.
> It would actually be really nice if we kept metadata about individual portfile revisions that indicated if they had been reviewed / had passed some tests, etc. so that end-users could choose what level of validation/verification is appropriate for the environment that they're running in.
An interesting idea, but a significant departure from our current situation of only allowing the use of the latest version of a port.
I also see a problem if a port uses a portgroup, and wants to use two different ports, at different revisions, that expect different versions of the portgroup. Is this kind of problem the reason why you're against portgroups?
I do want there to be lots of metadata about ports on the new MacPorts web site, including information such as results of buildbot builds. If we get to the point of automating test runs that could be included as well. The web site could also make that information available to the command line MacPorts program in some way if we wanted to do that.
>> Because if so, that would be stifling, and if not, then I don't see it working very well, since it's previous been very convenient to be able to make changes in portgroups simultaneously with changes in ports. Losing that ability will make working with portgroup more difficult.
> it's not all or nothing, but I think we should generally push more code into base/ (especially after an portgroup has matured somewhat) rather than pushing for more and more code out of base/
Even for decade-old build systems like imake that are only used by a handful of ports? That would for me be the definition of special-case code that doesn't belong in base.
The other thing I really like about portgroups is that all code related to a particular thing is contained within a single file. When I want to investigate a feature in base, I have to first use grep to figure out what file(s) the code is in, and it's usually spread out all over the place. In the case of imake support, it's only in two files, portconfigure.tcl and portutil.tcl, but that first file is 800 lines long and, like most of base, hard to read, for someone otherwise only accustomed to reading portfiles. Having all the imake- (or whatever-) related code in a single short portgroup file is much easier to understand and change.
More information about the macports-dev