Artificial intelligent assistant

Temporarily override system package I am working with a system that requires a high level of accuracy for times/timezones. Looking at the `tzdata` package sometimes it gets updated a number of days after the IANA update their database file. Checking out the source of `tzdata`, downloading and extracting the database from the IANA and repackaging is straight forward enough. However I only want to override the package for as long as there has not been an official update. As soon as there is an official update to `tzdata` from the repositories I would want it to revert to that. How best to achieve this?

You need to use a version number which sorts before whatever version number the packaged release will end up using. The canonical way of doing this for a local release is to use a ~ suffix, since that sorts before anything (and is thus considered older): so for 2017a, you'd use version number 2017a~-0.1 (-0.1 because it's an unofficial package of a new release). This sorts after the current release:


$ dpkg --compare-versions 2016j-0ubuntu0.16.04 lt 2017a~-0.1
$ echo $?
0


so it will be picked as an upgrade candidate, and it sorts before the next release:


$ dpkg --compare-versions 2017a~-0.1 lt 2017a-0ubuntu0.16.04
$ echo $?
0


so the next official release will replace it.

This scheme works regardless of the source of the next `tzdata` update (Debian or Ubuntu).

The Debian Policy section on versions has all the details.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy b7b8919b2db920f7432e0f819faaa6cd