diff options
Diffstat (limited to 'meta/classes/image.bbclass')
| -rw-r--r-- | meta/classes/image.bbclass | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 865d430121..275b28f4ac 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass | |||
| @@ -255,6 +255,43 @@ multilib_sanity_check() { | |||
| 255 | echo $@ | python ${MULTILIB_CHECK_FILE} | 255 | echo $@ | python ${MULTILIB_CHECK_FILE} |
| 256 | } | 256 | } |
| 257 | 257 | ||
| 258 | get_split_linguas() { | ||
| 259 | for translation in ${IMAGE_LINGUAS}; do | ||
| 260 | translation_split=$(echo ${translation} | awk -F '-' '{print $1}') | ||
| 261 | echo ${translation} | ||
| 262 | echo ${translation_split} | ||
| 263 | done | sort | uniq | ||
| 264 | } | ||
| 265 | |||
| 266 | rootfs_install_all_locales() { | ||
| 267 | # Generate list of installed packages for which additional locale packages might be available | ||
| 268 | INSTALLED_PACKAGES=`list_installed_packages | egrep -v -- "(-locale-|^locale-base-|-dev$|-doc$|^kernel|^glibc|^ttf|^task|^perl|^python)"` | ||
| 269 | |||
| 270 | # Generate a list of locale packages that exist | ||
| 271 | SPLIT_LINGUAS=`get_split_linguas` | ||
| 272 | PACKAGES_TO_INSTALL="" | ||
| 273 | for lang in $SPLIT_LINGUAS; do | ||
| 274 | for pkg in $INSTALLED_PACKAGES; do | ||
| 275 | existing_pkg=`rootfs_check_package_exists $pkg-locale-$lang` | ||
| 276 | if [ "$existing_pkg" != "" ]; then | ||
| 277 | PACKAGES_TO_INSTALL="$PACKAGES_TO_INSTALL $existing_pkg" | ||
| 278 | fi | ||
| 279 | done | ||
| 280 | done | ||
| 281 | |||
| 282 | # Install the packages, if any | ||
| 283 | if [ "$PACKAGES_TO_INSTALL" != "" ]; then | ||
| 284 | rootfs_install_packages $PACKAGES_TO_INSTALL | ||
| 285 | fi | ||
| 286 | |||
| 287 | # Workaround for broken shell function dependencies | ||
| 288 | if false ; then | ||
| 289 | get_split_linguas | ||
| 290 | list_installed_packages | ||
| 291 | rootfs_check_package_exists | ||
| 292 | fi | ||
| 293 | } | ||
| 294 | |||
| 258 | # set '*' as the root password so the images | 295 | # set '*' as the root password so the images |
| 259 | # can decide if they want it or not | 296 | # can decide if they want it or not |
| 260 | zap_root_password () { | 297 | zap_root_password () { |
