UB-Mannheim / ocr-fileformat

Validate and transform various OCR file formats (hOCR, ALTO, PAGE, FineReader)
https://digi.bib.uni-mannheim.de/ocr-fileformat/
MIT License
176 stars 23 forks source link

Add update mechanism #119

Open zuphilip opened 4 years ago

zuphilip commented 4 years ago

Commit https://github.com/OCR-D/format-converters/commit/5b9568fd2b6dbfe891ef81826b7fffea7d21d814 was missing in our installation (fixed now). I noticed that just running make all or make install does not update any of the existing cloned code from external git repositories. I think we should start using git submodules to get explicit dependencies.

Originally posted by @stweil in https://github.com/UB-Mannheim/ocr-fileformat/pull/106#issuecomment-570098548

zuphilip commented 4 years ago

I am not sure that we need git submodules with which a lot of people also struggle to use. Moreover, this would only bee a partial update mechanism because we also directly install from a release (e.g. JPageConverter) or download from a website (e.g. Saxon).

Thus, I think we need a proper update mechanism in the Makefile. This then should check first for new code of ocr-fileformat and taking into account that there are git-installations as well as installations for the latest release. Afterwards possible updated packages from the vendor should be loaded. This maybe can been done with make realclean and then make install again. Maybe there are smarter ways to do it as well w/o downloading potentially the same files again.

kba commented 4 years ago

Thus, I think we need a proper update mechanism in the Makefile.

Easiest solution: clone the repository depth-1 to a tempdirectory, uninstall, reinstall. It's less efficient, but the cleanest.

bertsky commented 1 year ago

I am not sure that we need git submodules with which a lot of people also struggle to use. Moreover, this would only bee a partial update mechanism because we also directly install from a release (e.g. JPageConverter) or download from a website (e.g. Saxon).

Yes, but both can be managed via make. And that's exactly what since has been done.

Thus, I think we need a proper update mechanism in the Makefile. This then should check first for new code of ocr-fileformat and taking into account that there are git-installations as well as installations for the latest release. Afterwards possible updated packages from the vendor should be loaded. This maybe can been done with make realclean and then make install again. Maybe there are smarter ways to do it as well w/o downloading potentially the same files again.

The process for updating is now as simple as:

git pull
make install # will also git submodule update

Can be closed IIUC.