2015-03-25 22:10 GMT+01:00 Robert Luberda <[email protected]>:

Hi, Robert,

> Agustin Martin pisze:
>>
>> The warning appears because of a race condition between old and new dicts.
>> Dicts using old dictionaries-common-dev contained /var/lib/ dir in the
>> package, dicts using new d-c-d don't. Since new dict no longer ships
>> /var/lib subdir but creates it from autobuildhash dpkg complains when
>> unpacking unless dicts using old schema are present.
>
> This is just how dpkg works, and there is no race condition there.

This is what I meant, indeed misusing the term 'race condition'.

> BTW. While writing the above I realized that proper work around is
> creating preinst script in ibritish/iamerican packages - I will do it in
> next upload.

Unless I am missing something I do not think this is needed. What
would you put there? Removing /var/lib/{a,i}spell/contents?

I have to think about this more carefully, but at a first glance I'd
think that this might not work, since you cannot control the ordering
of packages unpacking.

>>>   2. Moving to prerm the stuff currently added into postrm - otherwise
>>> when only the first point is implemented, dpkg will still show the
>>> warnings during removal of the last installed ispell dictionary.
>>
>> This would require all aspell and ispell dicts using autobuildhash to ship
>> modified prerm. Do not think it worths.
>
> The postrm stuff is added by dictionaries-common-dev, I guess prerm
> could also be done this way. There would be no need to force rebuild all
> the packages at once; sooner or later the packages will get rebuilt by
> their maintainers anyway.

Note that this 'sooner or later' might be a really slow process. That
is why I generally try to avoid changes requiring action from dict
maintainers.

>>> Most probably the prerm script could remove the files from
>>> /var/lib/ispell not only when "$1" = "remove", but also when "$1" =
>>> "upgrade" - this would ensure some flexibility, for example if at some
>>> point in the future somebody for some reason would like to switch from
>>> /var/lib/ispell to another directory.
>>
>> In case this is ever needed it can be implemented in autobuildhash script.
>> No need to add new stuff to already existing dict packages.
>
>
> Ok, I have one more argument for removing the generated hashes in `prerm
> upgrade': when ispell/aspell is upgraded together with the dictionaries,
> and the new version of ispell/aspell is incompatible with previous
> dictionaries for any reason (and for example crashes), `prerm upgrade'
> will reduce the time the incompatible hashes exist in the system, which
> in turn might save people's time needed to report/investigate issues :)

I think you will just change the error message from something like
'illegal hash format' to something like 'unavailable dict'. In a
really big upgrade (e.g. wheezy-jessie) this is the less important
problem you will find. Even if you rebuild hashes from preinst in
those cases, there is no warranty about normal unpack ordering
anywhere else than in configuration stage, so you cannot make sure
that rebuild is done at the right time.

By the way, when hash and compat placeholders were once shipped with
ispell or aspell dictionary packages, dict was not available from dict
unpacking to configuration. No bug reports were filed about this.

I think going the preinst way is too much work for very small (or
none) gain. I still think is simpler to just ship /var/lib/{a,i}spell
in dictionaries-common with a bogus README file. Even this change will
not go into jessie, so its utility is limited, but in the future might
save some (harmless) warnings.

Thanks very much for your feedback

Regards,

-- 
Agustin


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to