Skip to content

Change dependencies version

Matthieu Gautier edited this page Jun 24, 2019 · 1 revision

Changing a dependency version need (most of the time) three changes.

The declared version.

In the base_deps_versions dictionary in https://github.com/kiwix/kiwix-build/blob/master/kiwixbuild/versions.py

This version number is used to create the source and build directory.

The archive to download.

Changing a version number is not enough, you have to change the archive that will be used for the dependency. This is specific to each dependency and it is in each specific dependency file (ie, https://github.com/kiwix/kiwix-build/blob/master/kiwixbuild/dependencies/android_sdk.py for the android sdk). The archive specification is declared this way :

class Source(ReleaseDownload):
        archive = Remotefile('tools_r25.2.3-linux.zip',
                             '1b35bcb94e9a686dff6460c8bca903aa0281c6696001067f34ec00093145b560',
                             'https://dl.google.com/android/repository/tools_r25.2.3-linux.zip')
  • The first argument is the name of the archive.
  • The second argument is the sha256sum of the archive.
  • The optional third argument is the url of the archive. If this is not specified, it will download the archive from http://download.kiwix.org/dev/ (using the archive name).

Update the base_deps_meta_version

Base dependencies are cached. And so they are not rebuild by the CI every time. To invalidate the cache, kiwix-build use the variable base_deps_meta_version (in https://github.com/kiwix/kiwix-build/blob/master/kiwixbuild/versions.py) . If you want to rebuild everything with the new version of the dependency (and you want), you also need to update the base_deps_meta_version.