[OSM-dev] Osmupdate 0.4.5 fails (osmctools)

mmd mmd.osm at gmail.com
Tue Feb 23 07:42:35 UTC 2021

On 2/22/21 8:59 PM, Stephan Knauss wrote:
> On 21.02.2021 23:38, Stephan Knauss wrote:
>> I have the suspicion that osmupdate requires the now missing "comment"
>> at the beginning of the state.txt file:
> I propose this patch. The original version checked for a known first
> character to identify a valid file. As the new known first character is
> a "s", checking for this restores the original functionality.
> Yes, the file could be corrupted in a different way. But this was also
> the case in the initial version. And other parts of the code do probably
> make similar assumptions.
> 722c722
> <   if(result[0]=='#') {  // full status information
> ---
>>   if(result[0]=='s') {  // full status information
> 828c828
> <   if(timestamp_contents[0]=='#') {  // full status information
> ---
>>   if(timestamp_contents[0]=='s') {  // full status information

I doubt this will work. The new state.txt format only applies to
minutely diffs. If you happen to process hourly or daily diffs which are
still being generated using the old format, this will obviously no
longer work. When catching up, osmupdate would choose the most suitable
format (out of minutely, hourly and daily) to reduce the number of
downloads, so this is a real issue.

Best is to get rid of this format guessing special logic altogether.
It's too fragile as it relies on undocumented stuff.


More information about the dev mailing list