# texlive-full always recompiles



## Alain De Vos (Oct 13, 2021)

Even when i just compiled print/texlive-ful (i.e.texlive-full-20150521) with poudriere it always recompiles ...
Reason : Deleting texlive-full-20150521.pkg: new dependency: print/texlive-texmf-source


----------



## zirias@ (Oct 14, 2021)

I assume that's a bug in Mk/bsd.tex.mk:

```
_USE_TEX_SOURCE_DEP=    ${LOCALBASE}/${TEXMFDISTDIR}/source/.keep_me
_USE_TEX_SOURCE_PORT=   print/${_USE_TEX_SOURCE_PKGNAME}
_USE_TEX_SOURCE_PKGNAME=texlive-texmf-source
```

This is only used when you set the `SOURCE` option of print/texlive-full. Do you have a file /usr/local/share/texmf-dist/source/.keep_me on your system when print/texlive-texmf-source is actually installed? I _assume_ this file doesn't exist and therefore the run-dependency is missing on the built package of print/texlive-full. Poudriere compares that to the run-dependency defined for the port and finds a difference...


----------



## zirias@ (Oct 14, 2021)

Could you try applying this patch to your ports tree (`patch -Np1`) and see if the problem goes away?

```
diff --git a/Mk/bsd.tex.mk b/Mk/bsd.tex.mk
index dfb36193656b..5b23df83df3b 100644
--- a/Mk/bsd.tex.mk
+++ b/Mk/bsd.tex.mk
@@ -85,7 +85,7 @@ _USE_TEX_BASE_PKGNAME=        texlive-base
 _USE_TEX_GBKLATEX_DEP= gbklatex
 _USE_TEX_GBKLATEX_PORT=        ${_USE_TEX_BASE_PORT}
 _USE_TEX_GBKLATEX_PKGNAME=${_USE_TEX_BASE_PKGNAME}
-_USE_TEX_SOURCE_DEP=   ${LOCALBASE}/${TEXMFDISTDIR}/source/.keep_me
+_USE_TEX_SOURCE_DEP=   ${_USE_TEX_SOURCE_PKGNAME}>=20150523
 _USE_TEX_SOURCE_PORT=  print/${_USE_TEX_SOURCE_PKGNAME}
 _USE_TEX_SOURCE_PKGNAME=texlive-texmf-source
 _USE_TEX_DOCS_DEP=     ${LOCALBASE}/${TEXMFDISTDIR}/doc/texlive/texlive-en/README
```

(edit: made the patch simpler, I see no reason for this weird magic adding the package version right now...)


----------



## Alain De Vos (Oct 14, 2021)

Sorry Zirias I'm not the patch specialst
Two which directory do i specifly go ?
Which file do i safe as what ?
What is the exact command i should execute ?
What if i do a git pull --rebase ?


----------



## zirias@ (Oct 14, 2021)

Easiest method: Go to the root of your ports tree, type `patch -Np1`, hit enter, copy&paste the patch from above, hit Ctrl+D.

You could also change the line in Mk/bsd.tex.mk manually (as indicated by the `+` and `-` signs in the patch).



Alain De Vos said:


> What if i do a git pull --rebase ?


Either you commit the change locally, then the `pull --rebase` should always rebase it on whatever comes from upstream, or you `git stash` it before pulling and restore it with `git stash pop` afterwards. The latter can be automated, see for example https://cscheng.info/2017/01/26/git-tip-autostash-with-git-pull-rebase.html (and be sure to understand the consequences).


----------



## Alain De Vos (Oct 14, 2021)

I performed the diff manually. Now the port does not longer recompile.


----------



## zirias@ (Oct 14, 2021)

There's the long-standing PR 226983 about this issue, I added the patch there and linked this forum thread.


----------



## zirias@ (Oct 14, 2021)

Hehe, I analyzed it a bit further and I'm amazed to find the bug was actually introduced in August 2014. See my comment on the PR .

Seems very few people use the `SOURCE` option of that port, otherwise there would be no way this could be unfixed for THAT long.


----------

