IMAGE_PKGTYPE ?= "deb"
# Map TARGET_ARCH to Debian's ideas about architectures
-DPKG_ARCH ?= "${TARGET_ARCH}"
+DPKG_ARCH ?= "${TARGET_ARCH}"
DPKG_ARCH_x86 ?= "i386"
DPKG_ARCH_i486 ?= "i386"
DPKG_ARCH_i586 ?= "i386"
do_package_write_deb[dirs] = "${D}"
addtask package_write_deb before do_package_write after do_package
+do_package_update_index_deb[lockfiles] = "${DEPLOY_DIR_DEB}.lock"
+do_package_update_index_deb[nostamp] = "1"
+do_package_update_index_deb[recrdeptask] += "do_package_write_deb"
+do_package_update_index_deb[depends] += "dpkg-native:do_populate_sysroot"
+
+do_package_update_index_deb () {
+ set -x
+
+ if [ ! -z "${DEPLOY_KEEP_PACKAGES}" ]; then
+ return
+ fi
+
+ cd "${DEPLOY_DIR_DEB}"
+ for arch in ${PACKAGE_ARCHS}; do
+ if [ -e "$arch" ] ; then
+ dpkg-scanpackages "$arch" | gzip > "$arch/Packages.gz"
+ fi
+ if [ -e "${BUILD_ARCH}-$arch-sdk" ] ; then
+ dpkg-scanpackages "${BUILD_ARCH}-$arch-sdk" | gzip > "${BUILD_ARCH}-$arch-sdk/Packages.gz"
+ fi
+ if [ -e "${SDK_SYS}-sdk-$arch" ] ; then
+ dpkg-scanpackages "${SDK_SYS}-sdk-$arch" | gzip > "${SDK_SYS}-sdk-$arch/Packages.gz"
+ fi
+ done
+ cd -
+}
+
+addtask package_update_index_deb before do_rootfs
continue;
fi
cd ${DEPLOY_DIR_DEB}/$arch
- rm -f Packages.gz Packages Packages.bz2
-
- # apt-native ignores Packages.bz2 unless /bin/bzip2 exists
- # on the build host, so stick with gzip
- dpkg-scanpackages . | gzip > Packages.gz
echo "Label: $arch" > Release
cat "${STAGING_ETCDIR_NATIVE}/apt/apt.conf.sample" \
| sed -e 's#Architecture ".*";#Architecture "${DPKG_ARCH}";#' \
- | sed -e 's#status ".*";#status "${IMAGE_ROOTFS}/var/lib/dpkg/status";#' \
+ | sed -e 's#status ".*";#status "${IMAGE_ROOTFS}/var/lib/dpkg/status";#' \
| sed -e 's#DPkg::Options {".*"};#DPkg::Options {"--root=${IMAGE_ROOTFS}";"--admindir=${IMAGE_ROOTFS}/var/lib/dpkg";"--force-all";"--no-debsig"};#' \
> "${STAGING_ETCDIR_NATIVE}/apt/apt-rootfs.conf"
${ROOTFS_POSTPROCESS_COMMAND}
- log_check rootfs
+ log_check rootfs
}
rootfs_deb_log_check() {
lf_txt="`cat $lf_path`"
for keyword_die in "E:"
- do
+ do
if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") >/dev/null 2>&1
then
echo "log_check: There were error messages in the logfile"
do_exit=1
fi
done
- test "$do_exit" = 1 && exit 1
+ test "$do_exit" = 1 && exit 1
true
}