[Bug 234468] Disparity between GH_TUPLE grouping behaviour and documentation
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Dec 28 16:02:36 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234468
Bug ID: 234468
Summary: Disparity between GH_TUPLE grouping behaviour and
documentation
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: ports-bugs at FreeBSD.org
Reporter: ben.lavery at hashbang0.com
In Example 5.16 of the Porters Handbook (under section 5.4.3.1:
https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-distfiles.html#makefile-master_sites-github-multiple)
it says:
> Some redundant information is present with GH_TUPLE because grouping is not possible.
I think this can be interpreted to suggest that grouping does not happen when
specified as part of a GH_TUPLE. However, the grouping code is still run and
causes GH_TUPLE entries with the same group to be reduced to the last entry
defined.
I recently had a case where the www/gohugo project forked another to implement
a change. The Pull Request back to the original project was not accepted by
the time the gohugo team wanted to release (0.51) so both the original and
forked repositories are specified as dependancies (because the original is
looked for by other dependancies).
Until now, I had specified the [:group] part of the tuple to be the same as the
project name, this had never caused an issue for me because no two projects
were named the same, until now! I had:
```
# grep -n mapstructure Makefile
31:
bep:mapstructure:bb74f1d:mapstructure/src/github.com/bep/mapstructure \
63:
mitchellh:mapstructure:v1.0.0:mapstructure/src/github.com/mitchellh/mapstructure
\
```
But distinfo was being generated with the following:
```
# grep -n mapstructure distinfo
88:SHA256 (gohugo/mitchellh-mapstructure-v1.0.0_GH0.tar.gz) =
6eddc2ee4c69177e6b3a47e134277663f7e70b1f23b6f05908503db9d5ad5457
89:SIZE (gohugo/mitchellh-mapstructure-v1.0.0_GH0.tar.gz) = 18841
```
By swapping the lines around in Makefile I could see different results in
distinfo.
After much head scratching I realised the issue and starting grouping entries
like the following:
```
# grep -n mapstructure Makefile
31:
bep:mapstructure:bb74f1d:bep_mapstructure/src/github.com/bep/mapstructure \
63:
mitchellh:mapstructure:v1.0.0:mitchellh_mapstructure/src/github.com/mitchellh/mapstructure
\
```
See the use of account_project.
I believe that either the documentation requires some additional clarity around
grouping in GH_TUPLE, or Mk/bsd.sites.mk (lines 407-430, I think) needs to
ignore grouping entries in GH_TUPLE to better match what is said in the
documentation.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list