[133168] trunk/dports/sysutils
Rainer Müller
raimue at macports.org
Mon Mar 2 02:37:32 PST 2015
On 2015-03-02 10:40, Clemens Lang wrote:
> ----- On 2 Mar, 2015, at 08:19, Ryan Schmidt ryandesign at macports.org wrote:
>> I've had to do this kind of thing enough times myself (e.g. with MongoHub,
>> MyPaint-devel), and now I see others like you doing it, that it's probably time
>> for me to enhance the github portgroup to automate this.
>
> You'd have to parse the .gitmodules file to do this correctly. I'm not sure
> it's worth the effort (but it could nonetheless be done). Note that the .gitmodules
> could also contain references to projects hosted outside of Github, which would
> not offer automatically generated tarballs.
That's true. As far as I know, the tarball also does not contain the
commitish for the checkout of the submodule at all.
We cannot automate it completely, but we can reduce the manual work.
I would think of something like this (based on what I wrote for optool):
# name path repo commitish
github.submodules \
argparser ${name}/FSArgumentParser mysteriouspants/ArgumentParser 2802076
coreparse ${name}/FSArgumentParser/CoreParse beelsebob/CoreParse 1be510a
The name is only used as an identifier for the tags in master_sites and
checksums. Of course the repo could also be a URL pointing to other
hosts than github.
>> Still wish developers would provide proper release tarballs which would obviate
>> the need...
Preparing self-contained tarballs seems to get out of fashion. At least
the github practice guarantees all files are under version control.
> It's convenient for developers to just use the submodules. As long as we just
> fetch the tags, there's nothing they can do. Of course, they could use github's
> release feature, though.
>
> FWIW, the textmate2 Portfile has the same problem, and I've just used
>
> fetch.type git
> post-fetch {
> system -W ${worksrcpath} "${git.cmd} submodule update --init"
> }
>
> to deal with it (which the github PortGroup does not support either, as far as I
> can see).
The downside of fetch.type git is that it cannot be mirrored and
therefore might cause problems behind proxies. Downloads may take
longer on larger repos as clone gets the whole history. It also does
not support checksums (although git inherently does that).
Rainer
More information about the macports-dev
mailing list