From 85e27da51a24b2d55495ff512548eedec35ddaf4 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 29 Nov 2006 10:53:23 +0000 Subject: rootfs_deb.bbclass: Reverse sources.list file to correct repository priorities. Add Release file to sources giving a Label. Update preferences file to use source labels instead of paths git-svn-id: https://svn.o-hand.com/repos/poky/trunk@976 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- meta/classes/rootfs_deb.bbclass | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'meta') diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass index 87a2bd6424..461b8bc939 100644 --- a/meta/classes/rootfs_deb.bbclass +++ b/meta/classes/rootfs_deb.bbclass @@ -5,7 +5,7 @@ fakeroot rootfs_deb_do_rootfs () { set +e mkdir -p ${IMAGE_ROOTFS}/var/dpkg/{info,updates} - rm -f ${STAGING_DIR}/etc/apt/sources.list + rm -f ${STAGING_DIR}/etc/apt/sources.list.rev rm -f ${STAGING_DIR}/etc/apt/preferences > ${IMAGE_ROOTFS}/var/dpkg/status > ${IMAGE_ROOTFS}/var/dpkg/available @@ -21,14 +21,18 @@ fakeroot rootfs_deb_do_rootfs () { rm -f Packages.gz Packages Packages.bz2 # fi apt-ftparchive packages . | bzip2 > Packages.bz2 + echo "Label: $arch" > Release - echo "deb file:${DEPLOY_DIR_DEB}/$arch/ ./" >> ${STAGING_DIR}/etc/apt/sources.list + echo "deb file:${DEPLOY_DIR_DEB}/$arch/ ./" >> ${STAGING_DIR}/etc/apt/sources.list.rev (echo "Package: *" - echo "Pin origin ${DEPLOY_DIR_DEB}/$arch" - echo "Pin-Priority: $((800 + $priority))") >> ${STAGING_DIR}/etc/apt/preferences + echo "Pin: release l=$arch" + echo "Pin-Priority: $((800 + $priority))" + echo) >> ${STAGING_DIR}/etc/apt/preferences priority=$(expr $priority + 5) done + tac ${STAGING_DIR}/etc/apt/sources.list.rev > ${STAGING_DIR}/etc/apt/sources.list + cat "${STAGING_DIR}/etc/apt/apt.conf.sample" \ | sed -e 's#Architecture ".*";#Architecture "${TARGET_ARCH}";#' \ > "${STAGING_DIR}/etc/apt/apt-rootfs.conf" -- cgit v1.2.3