Hello,
I've been working on displaying the pkg-message information on
FreshPorts. [1] Part of this involves parsing the file via ucl_tool
(textproc/libucl) - along the way I have been finding broken pkg-message
files and fixing them.
I have created a task[2] for myself to add a sanity check to FreshPorts
so committers get instant notification. [3]
It might also be useful to have a pre-commit hook cover this.
I could use help correctly the broken entries in the ports tree. I do
not have time to fix them myself.
I can provide starting points:
* use this search term on your search engine: site:freshports.org
"WARNING: The FreshPorts parser failed. ucl_tool failed. Please report this"
* write a small shell script to find broken UCL
I think the former is a short list, but will not find everything.
The shell script is sort of like this:
find /usr/ports -name pkg-message -exec another-script
Where that other script does this:
/usr/local/bin/ucl_tool --in FILE --format json
If [ $? <> 0] ;then
#this one needs fixing
fi
That should find most, but you also want to look for pkg-message.in
I started this search through the cache:
[aws-1-nginx01 dan ~] % sudo grep -rl 'The FreshPorts parser failed'
~freshports/cache/ports/*
devel/kf5-solid
devel/kyua
games/shockolate
net/endlessh
net/py-wsdd
The output has been modified to show just the category/port name.
[1] -
https://news.freshports.org/2021/10/14/pkg-message-ucl-type-gives-_pkgmessage_ucl-found-a-type-is-it-not-prepared-for-array/
[2] - https://github.com/FreshPorts/freshports/issues/345
[3] -
https://docs.freebsd.org/en/books/porters-handbook/keeping-up/#freshports
--
Dan Langille - d...@langille.org
https://langille.org/-