KICKSTART_FILE ??= ""
KICKSTART_FILE_EXTRA ??= ""
WRL_INSTALLER_CONF ?= ""
-REPO_INCLUDE_PKG ??= ""
-REPO_EXCLUDE_PKG ?= ""
+
+# Extra packages that will be added in the rpm repo in anaconda installer ISO image
+REPO_EXTRA_PKG = "\
+ xfsprogs-* \
+ glibc-binary-localedata-* \
+"
build_iso_prepend() {
install -d ${ISODIR}
wrl_installer_copy_local_repos() {
deploy_dir_rpm=$1
+ target_build="$2"
+ target_image="$3"
+
+ target_image_input_pkglist=$(sed -n 's/^IMAGE_LIST="\(.*\)"/\1/p' ${target_build}/installersupport_${target_image})
+ if [ ! -f ${target_image_input_pkglist} ]; then
+ bberror "The target image pkglist '${target_image_input_pkglist}' doesn't exist!"
+ fi
+
+ target_image_output_pkglist="${IMGDEPLOYDIR}/${IMAGE_NAME}.${target_image}.pkglist"
+ target_image_output_pkglist_link="${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${target_image}.pkglist"
+
if [ -d "$deploy_dir_rpm" ]; then
echo "Copy rpms from target build to installer image."
done
cd ${deploy_dir_rpm}
- for pkg in `cat ${REPO_INCLUDE_PKG}`; do
- pkg_file=$(find . -type f -name ${pkg}.rpm)
+ set -x
+ # Add the packages in target image pkglist
+ cat ${target_image_input_pkglist} > ${target_image_output_pkglist}.tmp
+
+ # Add the extra packages required by anaconda
+ for pkgs in ${REPO_EXTRA_PKG}; do
+ pkg_files=$(find . -type f -name ${pkgs})
+ if [ -z "${pkg_files}" ]; then
+ bbwarn "Package ${pkgs} not found, please check if there is anything wrong or just remove it from the list."
+ else
+ for pkg_file in ${pkg_files}; do
+ basename ${pkg_file} >> ${target_image_output_pkglist}.tmp
+ done
+ fi
+ done
+
+ cat ${target_image_output_pkglist}.tmp|sort|uniq > ${target_image_output_pkglist}
+ ln -s ${IMAGE_NAME}.${target_image}.pkglist ${target_image_output_pkglist_link}
+ rm -f ${target_image_output_pkglist}.tmp
+
+ for pkg in $(cat ${target_image_output_pkglist}); do
+ pkg_file=$(find . -type f -name ${pkg})
if [ -z "${pkg_file}" ]; then
- bbwarn "Package ${pkg}.rpm not found, please check if there is anything wrong or just remove it from the list."
+ bbwarn "Package ${pkg} not found, please check if there is anything wrong or just remove it from the list."
else
cp --parents -vf ${pkg_file} ${IMAGE_ROOTFS}/Packages.$prj_name/
fi
done
cd -
- for pkg in ${REPO_EXCLUDE_PKG}; do
- rm -rf ${IMAGE_ROOTFS}/Packages.$prj_name/${pkg}
- done
-
createrepo_c --update -q ${IMAGE_ROOTFS}/Packages.$prj_name/
fi
}
# Copy local repos while the image is not initramfs
bpn=${BPN}
if [ "${bpn##*initramfs}" = "${bpn%%initramfs*}" ]; then
- wrl_installer_copy_local_repos $WORKDIR/oe-rootfs-repo/rpm
+ wrl_installer_copy_local_repos $WORKDIR/oe-rootfs-repo/rpm $target_build $target_image
fi
echo "$DISTRO::$prj_name::$DISTRO_NAME::$DISTRO_VERSION" >> ${IMAGE_ROOTFS}/.target_build_list
fi
raise bb.parse.SkipPackage("The count of INSTALLER_TARGET_BUILD and KICKSTART_FILE not match!")
for kickstart_file in kickstart_files.split():
if not os.path.exists(kickstart_file):
- raise bb.parse.SkipPackage("The kickstart file %s in KICKSTART_FILE doesn't exist!" % kickstart_file)
+ bb.warn("The kickstart file %s in KICKSTART_FILE doesn't exist!" % kickstart_file)
}