tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Rewrite mk/checksum/checksum in awk



Hey all,

While working on an upgrade to www/grafana, I needed to use the new
go-modules.mk support.  This resulted in over 600 distfiles to verify,
and the current shell script cannot keep up, with a quadratic runtime
of over 8 minutes for 'bmake checksum'.

I took the opportunity to rewrite the script in awk:

  https://github.com/joyent/pkgsrc/commit/a040b8962acbab10bdb8bd94eb80129b5dc6279f

and now it takes less than 4 seconds.

I'm still working through testing this, aiming to support all of the
perculiar features of the existing script (who knew "IGNORE" was a
supported checksum?) and retain 100% compatibility, but figured I'd
throw it out to others for extra testing and review in the meantime.

Thanks,

-- 
Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com


Home | Main Index | Thread Index | Old Index