lvjr / texfindpkg

Query or install TeX packages and their dependencies
https://ctan.org/pkg/texfindpkg
5 stars 0 forks source link

Usage (or installation) problem #3

Closed quark67 closed 1 year ago

quark67 commented 1 year ago

The command texfindpkg query array.sty gives:

[tfp] you are using texlive
[tfp] finding dependencies for array.sty
[tfp] please install texlive package tools

kpsewhich array.sty gives:

/usr/local/texlive/2023/texmf-dist/tex/latex/tools/array.sty

So array.sty is installed.

And texfindpkg install array.sty gives:

[tfp] you are using texlive
[tfp] finding dependencies for array.sty
[tfp] installing package tools
Password:🔑

(Yes, the Mac Terminal really displays a key, not with a emoji but with a custom character, when it ask for a password).

I though that texfindpkg don't want to install a package already installed, but with the query action, it's seems that texfindpkg doesn't see that the array package is already installed.

What do you name "package tools" when you say "[tfp] installing package tools"?

If this can help: there is only the file texfindpkg.lua in the scripts folder (complete path: /usr/local/texlive/2023/texmf-dist/scripts/texfindpkg/texfindpkg.lua).

When I search for all files which contains the name "texfindpkg" on my computer, I obtain this result:

image

So there is a file named texfindpkg.json.gz (yes, .gz) in: /usr/local/texlive/2023/texmf-dist/tex/latex/texfindpkg/texfindpkg.json.gz (don't know if this file is expected in /tex/latex/texfindpkg rather than in /scripts/texfindpkg, as explained in issue https://github.com/lvjr/texfindpkg/issues/2, but definitively, the .gz seems to be an error).

I hope this can help you to debug your new package or the installation of your new package.

lvjr commented 1 year ago

Actually I suggested Karl Berry in a mail to put both files texfindpkg.json.gz and texfindpkg.lua in scripts folder, but it turned out that he didn't fully agree with me. Anyway, it is a minor problem so we could just ignore it for now.

lvjr commented 1 year ago

At this time, texfindpkg doesn't know whether or not a package is already installed. But at least the wording could be improved.

quark67 commented 1 year ago

What are the expected output of texfindpkg query array.sty and texfindpkg install array.sty when array.sty are already installed?

lvjr commented 1 year ago

In fact, array.sty is included in a TeX Live package named tools. So it may confuse you. That is why I said I need to change the wording in the output. Maybe adding a colon:

[tfp] please install package: tools
[tfp] installing package: tools

As was commented above, texfindpkg is not able to know whether array.sty is already installed at present.

quark67 commented 1 year ago

But why does you package ask me installing the "tool" package? Isn't it installed with TeX Live?

If I ask:

% texfindpkg query esvect.sty
[tfp] you are using texlive
[tfp] finding dependencies for esvect.sty
[tfp] please install texlive package esvect

But esvect.sty is installed:

% kpsewhich esvect.sty
/usr/local/texlive/2023/texmf-dist/tex/latex/esvect/esvect.sty

And it is not included in a package with another name.

And for tcolorbox, the package ask me to install a lot of package already installed:

% texfindpkg query tcolorbox.sty
[tfp] you are using texlive
[tfp] finding dependencies for tcolorbox.sty
[tfp] finding dependencies for environ.sty
[tfp] no dependency info for trimspaces.sty
[tfp] finding dependencies for pgf.sty
[tfp] finding dependencies for pgfrcs.sty
[tfp] no dependency info for everyshi.sty
[tfp] finding dependencies for tcolorboxlibraryskins.sty
[tfp] finding dependencies for tikz.sty
[tfp] finding dependencies for tikzfill.image.sty
[tfp] finding dependencies for tikzlibraryfill.image.sty
[tfp] finding dependencies for tcolorboxlibraryvignette.sty
[tfp] finding dependencies for tikzlibraryfadings.sty
[tfp] finding dependencies for tcolorboxlibraryraster.sty
[tfp] finding dependencies for tcolorboxlibrarylistings.sty
[tfp] finding dependencies for listings.sty
[tfp] finding dependencies for keyval.sty
[tfp] finding dependencies for pdftexcmds.sty
[tfp] no dependency info for infwarerr.sty
[tfp] finding dependencies for iftex.sty
[tfp] finding dependencies for shellesc.sty
[tfp] finding dependencies for tcolorboxlibrarylistingsutf8.sty
[tfp] finding dependencies for listingsutf8.sty
[tfp] finding dependencies for inputenc.sty
[tfp] finding dependencies for ucs.sty
[tfp] finding dependencies for ucshyper.sty
[tfp] finding dependencies for hyperref.sty
[tfp] finding dependencies for kvsetkeys.sty
[tfp] finding dependencies for pdfescape.sty
[tfp] no dependency info for ltxcmds.sty
[tfp] finding dependencies for letltxmacro.sty
[tfp] finding dependencies for kvoptions.sty
[tfp] no dependency info for ltxcmds.sty
[tfp] no dependency info for kvoptions-patch.sty
[tfp] finding dependencies for url.sty
[tfp] finding dependencies for bigintcalc.sty
[tfp] finding dependencies for atveryend.sty
[tfp] finding dependencies for nameref.sty
[tfp] finding dependencies for refcount.sty
[tfp] no dependency info for ltxcmds.sty
[tfp] no dependency info for infwarerr.sty
[tfp] no dependency info for ltxcmds.sty
[tfp] finding dependencies for backref.sty
[tfp] no dependency info for ltxcmds.sty
[tfp] finding dependencies for rerunfilecheck.sty
[tfp] no dependency info for infwarerr.sty
[tfp] finding dependencies for uniquecounter.sty
[tfp] finding dependencies for color.sty
[tfp] finding dependencies for graphicx.sty
[tfp] finding dependencies for trig.sty
[tfp] finding dependencies for stringenc.sty
[tfp] no dependency info for infwarerr.sty
[tfp] no dependency info for ltxcmds.sty
[tfp] finding dependencies for tcolorboxlibraryminted.sty
[tfp] finding dependencies for minted.sty
[tfp] finding dependencies for fvextra.sty
[tfp] finding dependencies for etoolbox.sty
[tfp] finding dependencies for fancyvrb.sty
[tfp] no dependency info for upquote.sty
[tfp] finding dependencies for textcomp.sty
[tfp] finding dependencies for lineno.sty
[tfp] finding dependencies for vplref.sty
[tfp] finding dependencies for varioref.sty
[tfp] finding dependencies for ednmath0.sty
[tfp] finding dependencies for edtable.sty
[tfp] finding dependencies for longtable.sty
[tfp] no dependency info for ltabptch.sty
[tfp] no dependency info for ltabptch.sty
[tfp] finding dependencies for calc.sty
[tfp] finding dependencies for ifplatform.sty
[tfp] finding dependencies for ifluatex.sty
[tfp] finding dependencies for catchfile.sty
[tfp] no dependency info for infwarerr.sty
[tfp] no dependency info for ltxcmds.sty
[tfp] no dependency info for etexcmds.sty
[tfp] finding dependencies for float.sty
[tfp] finding dependencies for newfloat.sty
[tfp] finding dependencies for tcolorboxlibrarytheorems.sty
[tfp] finding dependencies for amsmath.sty
[tfp] finding dependencies for amstext.sty
[tfp] no dependency info for amsgen.sty
[tfp] finding dependencies for amsopn.sty
[tfp] no dependency info for amsgen.sty
[tfp] finding dependencies for tcolorboxlibrarybreakable.sty
[tfp] finding dependencies for pdfcol.sty
[tfp] no dependency info for ltxcmds.sty
[tfp] no dependency info for infwarerr.sty
[tfp] finding dependencies for tcolorboxlibrarymagazine.sty
[tfp] finding dependencies for tcolorboxlibraryposter.sty
[tfp] finding dependencies for tcolorboxlibraryfitting.sty
[tfp] finding dependencies for tcolorboxlibraryhooks.sty
[tfp] finding dependencies for tcolorboxlibraryexternal.sty
[tfp] finding dependencies for incgraph.sty
[tfp] finding dependencies for pgfkeys.sty
[tfp] finding dependencies for pgffor.sty
[tfp] finding dependencies for pgfmath.sty
[tfp] finding dependencies for bookmark.sty
[tfp] finding dependencies for tcolorboxlibrarydocumentation.sty
[tfp] finding dependencies for makeidx.sty
[tfp] finding dependencies for marginnote.sty
[tfp] finding dependencies for tcolorboxlibrarymany.sty
[tfp] finding dependencies for tcolorboxlibrarymost.sty
[tfp] finding dependencies for tcolorboxlibraryall.sty
[tfp] please install texlive package tcolorbox environ pgf pgf pgf listings graphics pdftexcmds iftex tools listingsutf8 latex ucs ucs hyperref kvsetkeys pdfescape letltxmacro kvoptions url bigintcalc atveryend hyperref refcount hyperref rerunfilecheck uniquecounter graphics graphics graphics stringenc minted fvextra etoolbox fancyvrb latex lineno lineno tools lineno lineno tools tools ifplatform iftex catchfile float newfloat amsmath amsmath amsmath pdfcol incgraph pgf pgf pgf bookmark latex marginnote

Can you explain in a documentation what is the purpose of your package? At least, add a disclaimer in the package documentation saying that the package cannot say if a package is already installed.

lvjr commented 1 year ago

I think the title of this package is clear enough: "Install TeX packages and their dependencies". With query action, it is just "Query TeX packages and their dependencies".

lvjr commented 1 year ago

I am fixing this problem. With the latest code (not yet pushed to the repository) you get the following output:

% texfindpkg query tcolorbox.sty
[tfp] you are using texlive
[tfp] building dependency tree for tcolorbox.sty:
[tfp] ------------------------
[tfp] tcolorbox.sty (from tcolorbox)
[tfp] |- environ.sty (from environ)
[tfp]    |- trimspaces.sty (from trimspaces)
[tfp] |- pgf.sty (from pgf)
[tfp]    |- pgfrcs.sty (from pgf)
[tfp]       |- everyshi.sty (from everyshi)
[tfp] |- tcbskins.code.tex (from tcolorbox)
[tfp]    |- tikz.sty (from pgf)
[tfp]    |- tikzfill.image.sty (from tikzfill)
[tfp]       |- tikzlibraryfill.image.code.tex (from tikzfill)
[tfp] |- tcbvignette.code.tex (from tcolorbox)
[tfp]    |- tikzlibraryfadings.code.tex (from pgf)
[tfp] |- tcbraster.code.tex (from tcolorbox)
[tfp] |- tcblistings.code.tex (from tcolorbox)
[tfp]    |- listings.sty (from listings)
[tfp]       |- keyval.sty (from graphics)
[tfp]    |- pdftexcmds.sty (from pdftexcmds)
[tfp]       |- infwarerr.sty (from infwarerr)
[tfp]       |- iftex.sty (from iftex)
[tfp]    |- shellesc.sty (from tools)
[tfp] |- tcblistingsutf8.code.tex (from tcolorbox)
[tfp]    |- listingsutf8.sty (from listingsutf8)
[tfp]       |- inputenc.sty (from latex)
[tfp]          |- ucs.sty (from ucs)
[tfp]             |- ucshyper.sty (from ucs)
[tfp]                |- hyperref.sty (from hyperref)
[tfp]                   |- kvsetkeys.sty (from kvsetkeys)
[tfp]                   |- pdfescape.sty (from pdfescape)
[tfp]                      |- ltxcmds.sty (from ltxcmds)
[tfp]                   |- letltxmacro.sty (from letltxmacro)
[tfp]                   |- kvoptions.sty (from kvoptions)
[tfp]                      |- ltxcmds.sty (from ltxcmds)
[tfp]                      |- kvoptions-patch.sty (from kvoptions)
[tfp]                   |- url.sty (from url)
[tfp]                   |- bigintcalc.sty (from bigintcalc)
[tfp]                   |- atveryend.sty (from atveryend)
[tfp]                   |- nameref.sty (from hyperref)
[tfp]                      |- refcount.sty (from refcount)
[tfp]                         |- ltxcmds.sty (from ltxcmds)
[tfp]                         |- infwarerr.sty (from infwarerr)
[tfp]                      |- ltxcmds.sty (from ltxcmds)
[tfp]                   |- backref.sty (from hyperref)
[tfp]                      |- ltxcmds.sty (from ltxcmds)
[tfp]                      |- rerunfilecheck.sty (from rerunfilecheck)
[tfp]                         |- infwarerr.sty (from infwarerr)
[tfp]                         |- uniquecounter.sty (from uniquecounter)
[tfp]                   |- color.sty (from graphics)
[tfp]             |- graphicx.sty (from graphics)
[tfp]                |- trig.sty (from graphics)
[tfp]       |- stringenc.sty (from stringenc)
[tfp]          |- infwarerr.sty (from infwarerr)
[tfp]          |- ltxcmds.sty (from ltxcmds)
[tfp] |- tcbminted.code.tex (from tcolorbox)
[tfp]    |- minted.sty (from minted)
[tfp]       |- fvextra.sty (from fvextra)
[tfp]          |- etoolbox.sty (from etoolbox)
[tfp]          |- fancyvrb.sty (from fancyvrb)
[tfp]          |- upquote.sty (from upquote)
[tfp]          |- textcomp.sty (from latex)
[tfp]          |- lineno.sty (from lineno)
[tfp]             |- vplref.sty (from lineno)
[tfp]                |- varioref.sty (from tools)
[tfp]             |- ednmath0.sty (from lineno)
[tfp]             |- edtable.sty (from lineno)
[tfp]                |- longtable.sty (from tools)
[tfp]                |- ltabptch.sty (from ltabptch)
[tfp]             |- ltabptch.sty (from ltabptch)
[tfp]       |- calc.sty (from tools)
[tfp]       |- ifplatform.sty (from ifplatform)
[tfp]          |- ifluatex.sty (from iftex)
[tfp]       |- catchfile.sty (from catchfile)
[tfp]          |- infwarerr.sty (from infwarerr)
[tfp]          |- ltxcmds.sty (from ltxcmds)
[tfp]          |- etexcmds.sty (from etexcmds)
[tfp]       |- float.sty (from float)
[tfp]       |- newfloat.sty (from newfloat)
[tfp] |- tcbtheorems.code.tex (from tcolorbox)
[tfp]    |- amsmath.sty (from amsmath)
[tfp]       |- amstext.sty (from amsmath)
[tfp]          |- amsgen.sty (from amsmath)
[tfp]       |- amsopn.sty (from amsmath)
[tfp]          |- amsgen.sty (from amsmath)
[tfp] |- tcbbreakable.code.tex (from tcolorbox)
[tfp]    |- pdfcol.sty (from pdfcol)
[tfp]       |- ltxcmds.sty (from ltxcmds)
[tfp]       |- infwarerr.sty (from infwarerr)
[tfp] |- tcbmagazine.code.tex (from tcolorbox)
[tfp] |- tcbposter.code.tex (from tcolorbox)
[tfp]    |- tcbfitting.code.tex (from tcolorbox)
[tfp] |- tcbhooks.code.tex (from tcolorbox)
[tfp] |- tcbexternal.code.tex (from tcolorbox)
[tfp]    |- incgraph.sty (from incgraph)
[tfp]       |- pgfkeys.sty (from pgf)
[tfp]       |- pgffor.sty (from pgf)
[tfp]          |- pgfmath.sty (from pgf)
[tfp]       |- bookmark.sty (from bookmark)
[tfp] |- tcbdocumentation.code.tex (from tcolorbox)
[tfp]    |- makeidx.sty (from latex)
[tfp]    |- marginnote.sty (from marginnote)
[tfp] ------------------------
[tfp] texlive packages needed: tcolorbox environ trimspaces pgf everyshi tikzfill listings graphics pdftexcmds infwarerr iftex tools listingsutf8 latex ucs hyperref kvsetkeys pdfescape ltxcmds letltxmacro kvoptions url bigintcalc atveryend refcount rerunfilecheck uniquecounter stringenc minted fvextra etoolbox fancyvrb upquote lineno ltabptch ifplatform catchfile etexcmds float newfloat amsmath pdfcol incgraph bookmark marginnote
[tfp] texlive package not yet installed: ltabptch

Now TeXFindPkg can exclude packages already installed at the end.

lvjr commented 1 year ago

I have uploaded version 2023E to CTAN.