summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2007-09-01 16:55:44 +0000
committerRichard Purdie <rpurdie@rpsys.net>2007-09-01 16:55:44 +0000
commit3f5c5adb8df219b69ad3a3788eee3a6384c249a0 (patch)
tree8eb45bb6d92ee130ccb61481476f243c2a94499c
parentcbd7193c0ca7157d04e0ad0ee9649998a9bb7527 (diff)
rootfs_{deb|ipk}.bbclass: Fix whitespace damage, remove bashisms, sync with poky
-rw-r--r--classes/rootfs_deb.bbclass38
-rw-r--r--classes/rootfs_ipk.bbclass41
2 files changed, 42 insertions, 37 deletions
diff --git a/classes/rootfs_deb.bbclass b/classes/rootfs_deb.bbclass
index 32b1c57f1a..35e29b3e45 100644
--- a/classes/rootfs_deb.bbclass
+++ b/classes/rootfs_deb.bbclass
@@ -3,10 +3,12 @@
#
do_rootfs[depends] += "dpkg-native:do_populate_staging apt-native:do_populate_staging"
+do_rootfs[recrdeptask] += "do_package_write"
fakeroot rootfs_deb_do_rootfs () {
set +e
- mkdir -p ${IMAGE_ROOTFS}/var/dpkg/{info,updates}
+ mkdir -p ${IMAGE_ROOTFS}/var/dpkg/info
+ mkdir -p ${IMAGE_ROOTFS}/var/dpkg/updates
rm -f ${STAGING_DIR}/etc/apt/sources.list.rev
rm -f ${STAGING_DIR}/etc/apt/preferences
@@ -53,26 +55,26 @@ fakeroot rootfs_deb_do_rootfs () {
_getflag () {
cat ${IMAGE_ROOTFS}/var/dpkg/status | sed -n -e "/^Package: $2\$/{n; s/Status: install ok .*/$1/; p}"
}
-
- if [ x${TARGET_OS} = "xlinux" ] || [ x${TARGET_OS} = "xlinux-gnueabi" ] ; then
- if [ ! -z "${LINGUAS_INSTALL}" ]; then
- apt-get install glibc-localedata-i18n --force-yes --allow-unauthenticated
- if [ $? -ne 0 ]; then
- exit $?
- fi
- for i in ${LINGUAS_INSTALL}; do
- apt-get install $i --force-yes --allow-unauthenticated
- if [ $? -ne 0 ]; then
- exit $?
- fi
- done
- fi
- fi
+
+ if [ x${TARGET_OS} = "xlinux" ] || [ x${TARGET_OS} = "xlinux-gnueabi" ] ; then
+ if [ ! -z "${LINGUAS_INSTALL}" ]; then
+ apt-get install glibc-localedata-i18n --force-yes --allow-unauthenticated
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
+ for i in ${LINGUAS_INSTALL}; do
+ apt-get install $i --force-yes --allow-unauthenticated
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
+ done
+ fi
+ fi
if [ ! -z "${PACKAGE_INSTALL}" ]; then
for i in ${PACKAGE_INSTALL}; do
apt-get install $i --force-yes --allow-unauthenticated
- if [ $? -eq 1 ]; then
+ if [ $? -ne 0 ]; then
exit 1
fi
find ${IMAGE_ROOTFS} -name \*.dpkg-new | for i in `cat`; do
@@ -132,7 +134,7 @@ rootfs_deb_log_check() {
echo -e "log_check: Matched keyword: [$keyword_die]\n"
echo "$lf_txt" | grep -v log_check | grep -C 5 -i "$keyword_die"
echo ""
- do_exit=1
+ do_exit=1
fi
done
test "$do_exit" = 1 && exit 1
diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass
index 9a58777ade..e445c0dd07 100644
--- a/classes/rootfs_ipk.bbclass
+++ b/classes/rootfs_ipk.bbclass
@@ -6,6 +6,7 @@
#
do_rootfs[depends] += "ipkg-native:do_populate_staging ipkg-utils-native:do_populate_staging"
+do_rootfs[recrdeptask] += "do_package_write"
IPKG_ARGS = "-f ${T}/ipkg.conf -o ${IMAGE_ROOTFS} ${@base_conditional("PACKAGE_INSTALL_NO_DEPS", "1", "-nodeps", "", d)}"
@@ -17,10 +18,10 @@ rootfs_ipk_do_indexes () {
ipkgarchs="${PACKAGE_ARCHS}"
- if [ -z "${DEPLOY_KEEP_PACKAGES}" ]; then
- touch ${DEPLOY_DIR_IPK}/Packages
- ipkg-make-index -r ${DEPLOY_DIR_IPK}/Packages -p ${DEPLOY_DIR_IPK}/Packages -l ${DEPLOY_DIR_IPK}/Packages.filelist -m ${DEPLOY_DIR_IPK}
- fi
+ if [ -z "${DEPLOY_KEEP_PACKAGES}" ]; then
+ touch ${DEPLOY_DIR_IPK}/Packages
+ ipkg-make-index -r ${DEPLOY_DIR_IPK}/Packages -p ${DEPLOY_DIR_IPK}/Packages -l ${DEPLOY_DIR_IPK}/Packages.filelist -m ${DEPLOY_DIR_IPK}
+ fi
for arch in $ipkgarchs; do
if [ -z "${DEPLOY_KEEP_PACKAGES}" ]; then
@@ -52,21 +53,19 @@ fakeroot rootfs_ipk_do_rootfs () {
fi
done
ipkg-cl ${IPKG_ARGS} update
-
- # Uclibc builds don't provide this stuff...
- #
- if [ x${TARGET_OS} = "xlinux" ] || [ x${TARGET_OS} = "xlinux-gnueabi" ] ; then
- if [ ! -z "${LINGUAS_INSTALL}" ]; then
- ipkg-cl ${IPKG_ARGS} install glibc-localedata-i18n
- for i in ${LINGUAS_INSTALL}; do
- ipkg-cl ${IPKG_ARGS} install $i
- done
- fi
- fi
- if [ ! -z "${PACKAGE_INSTALL}" ]; then
- ipkg-cl ${IPKG_ARGS} install ${PACKAGE_INSTALL}
- fi
-
+
+ # Uclibc builds don't provide this stuff...
+ if [ x${TARGET_OS} = "xlinux" ] || [ x${TARGET_OS} = "xlinux-gnueabi" ] ; then
+ if [ ! -z "${LINGUAS_INSTALL}" ]; then
+ ipkg-cl ${IPKG_ARGS} install glibc-localedata-i18n
+ for i in ${LINGUAS_INSTALL}; do
+ ipkg-cl ${IPKG_ARGS} install $i
+ done
+ fi
+ fi
+ if [ ! -z "${PACKAGE_INSTALL}" ]; then
+ ipkg-cl ${IPKG_ARGS} install ${PACKAGE_INSTALL}
+ fi
export D=${IMAGE_ROOTFS}
export OFFLINE_ROOT=${IMAGE_ROOTFS}
@@ -112,3 +111,7 @@ rootfs_ipk_log_check() {
test "$do_exit" = 1 && exit 1
true
}
+
+remove_packaging_data_files() {
+ rm -rf ${IMAGE_ROOTFS}/usr/lib/ipkg/
+}