[Bug 235275] Multiply bundled GH_TUPLE repositories result in broken links
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Nov 18 00:34:04 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235275
Dmitri Goutnik <dmgk at freebsd.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dmgk at freebsd.org
--- Comment #9 from Dmitri Goutnik <dmgk at freebsd.org> ---
(In reply to Mathieu Arnold from comment #6)
This situation with duplicates often happens with Go ports [1], [2] due to the
way Go dependencies work. E.g.
fsnotify:fsnotify:v1.4.7:fsnotify_fsnotify/vendor/github.com/fsnotify/fsnotify
\
fsnotify:fsnotify:v1.4.7:fsnotify_fsnotify_1/vendor/gopkg.in/fsnotify.v1 \
fsnotify:fsnotify:v1.4.7:fsnotify_fsnotify_2/vendor/gopkg.in/fsnotify/fsnotify.v1
\
are 3 different packages as far as Go is concerned, but we get duplicates
because we have to map them to Github mirrors.
Looking at bsd.sites.mk code [3], it's not entirely clear why it does ${MV}
first and then ${LN}:
post-extract-gh-${_group}:
@${RMDIR} ${WRKSRC}/${GH_SUBDIR_${_group}} 2>/dev/null || :
@${MKDIR} ${WRKSRC}/${GH_SUBDIR_${_group}:H} 2>/dev/null || :
@${MV} ${WRKSRC_${_group}} ${WRKSRC}/${GH_SUBDIR_${_group}}
@${LN} -s ${WRKSRC:T}/${GH_SUBDIR_${_group}} ${WRKSRC_${_group}}
After the move, there's nothing to link to anymore and two remaining fsnotify
tuples from the example above get broken GH_SUBDIR symlink.
Would changing ${MV}/${LN} to just symlinking tuple's WRKSRC to GH_SUBDIR break
anything? E.g.
post-extract-gh-${_group}:
@${RMDIR} ${WRKSRC}/${GH_SUBDIR_${_group}} 2>/dev/null || :
@${MKDIR} ${WRKSRC}/${GH_SUBDIR_${_group}:H} 2>/dev/null || :
@${LN} -s ${WRKSRC_${_group}} ${WRKSRC}/${GH_SUBDIR_${_group}}
It does seem to work in my (limited) testing and fixes broken symlink problem.
[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241637
[2] https://bugs.freebsd.org/bugzilla/attachment.cgi?id=209217&action=diff
[3] https://svnweb.freebsd.org/ports/head/Mk/bsd.sites.mk?annotate=511849#l496
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the freebsd-ports-bugs
mailing list