mirror of
https://git.yoctoproject.org/poky
synced 2026-06-03 13:49:49 +00:00
classes/image: implement generic locale package installation
Let each package-specific rootfs implementation provide basic functions to query the existence of a package and install a list of packages and then have a generic install function so this logic is in one place. Note: unlike previous versions of this code in OE-Core this uses the IMAGE_LINGUAS variable and not IMAGE_LOCALES - note that IMAGE_LINGUAS was what was used in OE-Classic and it is already used in OE-Core in order to install locale-base-*. This will mean that if IMAGE_LINGUAS is left at the default you will now get more packages installed. If you don't want these language support packages then you should set IMAGE_LINGUAS explicitly. This restores locale installation to the same state as OE-Classic, only we now support all the packaging backends. (From OE-Core rev: c0fc36f8629a6abb9a7b542df8a2857526547a31) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
8a77467fe8
commit
38c2f66ea7
@@ -16,7 +16,7 @@ IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} --force-overwrite"
|
||||
|
||||
OPKG_PREPROCESS_COMMANDS = "package_update_index_ipk; package_generate_ipkg_conf"
|
||||
|
||||
OPKG_POSTPROCESS_COMMANDS = "ipk_insert_feed_uris"
|
||||
OPKG_POSTPROCESS_COMMANDS = "ipk_insert_feed_uris; rootfs_install_all_locales; "
|
||||
|
||||
opkglibdir = "${localstatedir}/lib/opkg"
|
||||
|
||||
@@ -148,26 +148,14 @@ list_package_recommends() {
|
||||
opkg-cl ${IPKG_ARGS} info $1 | grep ^Recommends | sed -e 's/^Recommends: //' -e 's/,//g' -e 's:([=<>]* [0-9a-zA-Z.~\-]*)::g'
|
||||
}
|
||||
|
||||
install_all_locales() {
|
||||
rootfs_check_package_exists() {
|
||||
if [ `opkg-cl ${IPKG_ARGS} info $1 | wc -l` -gt 2 ]; then
|
||||
echo $1
|
||||
fi
|
||||
}
|
||||
|
||||
PACKAGES_TO_INSTALL=""
|
||||
|
||||
INSTALLED_PACKAGES=`list_installed_packages | egrep -v -- "(-locale-|-dev$|-doc$|^kernel|^glibc|^ttf|^task|^perl|^python)"`
|
||||
|
||||
for pkg in $INSTALLED_PACKAGES
|
||||
do
|
||||
for lang in ${IMAGE_LOCALES}
|
||||
do
|
||||
if [ `opkg-cl ${IPKG_ARGS} info $pkg-locale-$lang | wc -l` -gt 2 ]
|
||||
then
|
||||
PACKAGES_TO_INSTALL="$PACKAGES_TO_INSTALL $pkg-locale-$lang"
|
||||
fi
|
||||
done
|
||||
done
|
||||
if [ "$PACKAGES_TO_INSTALL" != "" ]
|
||||
then
|
||||
opkg-cl ${IPKG_ARGS} install $PACKAGES_TO_INSTALL
|
||||
fi
|
||||
rootfs_install_packages() {
|
||||
opkg-cl ${IPKG_ARGS} install $PACKAGES_TO_INSTALL
|
||||
}
|
||||
|
||||
ipk_insert_feed_uris () {
|
||||
|
||||
Reference in New Issue
Block a user