13

Many package managers allow users to prevent certain packages from being updated. Often this is called 'pinning'. A pinned package is protected from automatic updates. This is useful, for example, if a bug in a package is problematic on a particular system and is modified or down-graded locally until fixed upstream. Since the package may get other updates before the fix, preventing updates protects the pinned version until a newer version with the relevant fix becomes available.

tlmgr supports something called 'pinning' but it pins a package to a repository rather than protecting it from updates per se.

As things currently stand, texdef.pl requires patching to work with current perl. There is no evidence whatsoever that this is likely to be fixed in the foreseeable future. Hence, I need a patched version indefinitely.

[Details and patch: How can I avoid this regex error when attempting to use texdef?]

However, every time I update TeX Live, my patched version is overwritten by the original, even though the original version has not changed in anyway. That is, it isn't that the distributed version has been updated, but not, sadly, with the fixes I need. It hasn't changed at all. But tlmgr insists on replacing my working version with TeX Live's broken one, even though that version is buggy and older.

There are various things I could do about this. For example, I could change the permissions so that it required root privileges to overwrite the patched version. This would work, but I suspect that it would cause tlmgr to exit with a four-letter complaint about the state of its world.

If the file were a .sty or similar, I could install the patched version in TEXMFLOCAL or TEXMFHOME. Unfortunately, it's a script, sym-linked from the binaries directory, so kpsewhich isn't being used to access it and I can't work around it that way.

There are various other tricks I could use involving shell aliases and so on, but this is quite involved and relatively fragile. Moreover, the number of users experiencing this problem is going to increase as more users get current versions of perl. So it would be nice if there was a more 'official' and robust solution.

Is it possible to 'pin' a package or file using tlmgr so that it is not overwritten on update? Ideally, something which prints a reminder to the console that it is being skipped, but that's icing and I'm mostly concerned here with cake.

If not, what is the best approach to this? It is getting really annoying having to keep patching the bloody file when the damned thing is identical to the buggy version I fixed last time I updated ... and the time before ... and the time before that ....

I suppose I could make a local one-package repository for it. However, that seems a very awkward way to achieve what is surely a pretty straightforward goal.

  • Good question, but the actual solution would be to fix texdef.pl in upstream. – Henri Menke Aug 29 '17 at 0:47
  • 1
    Why not just write the CTAN maintainers an email and ask them to just place the fix? We cannot just keep broken software on CTAN and try to monkey-patch the way packages are distributed. – Henri Menke Aug 29 '17 at 5:27
  • 1
    I think it is now updated – norbert Oct 3 '17 at 7:22
  • 1
    @cfr it is now here, should bin in tltesting starting with tomorrow. The key is named update-exclude and is a comma-separated string of package names, similar to the update --exclude cmf line switch. Hope that helps. – norbert Oct 8 '17 at 14:28
  • 1
    It is still in tlcritical, but push out should happen soon. – norbert Nov 13 '17 at 1:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.