snapcraft: unminimize iso-codes package

When building the snap in a clean environment, we start with a minimised core image. This image excludes translation
files, which are needed for the "languagelists" step. The following error will show up when building:

    Building languagelists
    do not know native name for oc
    Failed to run 'override-build': Exit code was 1.

This is due to translation files being excluded by default in /etc/dpkg/dpkg.cfg.d/excludes on minimised systems:

    # Drop all translations
    path-exclude=/usr/share/locale/*/LC_MESSAGES/*.mo

We now comment this line and reinstall the "iso-codes" package.
This commit is contained in:
Foster "Forst" Snowhill 2020-06-21 21:51:35 +02:00
parent 5de9df3e7d
commit 304719eb4d
No known key found for this signature in database
GPG Key ID: 24DA9246BD1BC600
1 changed files with 4 additions and 0 deletions

View File

@ -131,6 +131,10 @@ parts:
build-packages:
- localechooser-data
override-build: |
grep '^path-exclude=.*LC_MESSAGES.*' /etc/dpkg/dpkg.cfg.d/excludes && {
sed -i 's/^path-exclude.*LC_MESSAGES.*/#\0/g' /etc/dpkg/dpkg.cfg.d/excludes
apt-get -y install --reinstall iso-codes
} || true
$SNAPCRAFT_PROJECT_DIR/scripts/make-language-lists $SNAPCRAFT_PROJECT_DIR/po > $SNAPCRAFT_PART_INSTALL/languagelist
stage:
- languagelist