summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2013-08-13 10:50:55 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-22 18:30:00 +0100
commitdc5f6c3898555b59f16bf809ae4c5418656e6ac9 (patch)
tree727e25880a7e2233ec4b06b0490426e6fca3d4ad /meta/classes
parent7ba54b91f8c18910569e97a857d77745ff7a2157 (diff)
downloadpoky-dc5f6c3898555b59f16bf809ae4c5418656e6ac9.tar.gz
package_deb.bbclass: Use the WORKDIR not SYSROOT for temp files
Previous debian APT configuration was using the sysroot directory. This not only polluted the sysroot, but violates the expectation that the sysroot is not modified by the rootfs installation. (From OE-Core rev: 2db14eaa0fcc080bc20fa9da985ffc05c3b21e2a) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/package_deb.bbclass17
1 files changed, 10 insertions, 7 deletions
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 663f6461c8..4980555764 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -10,6 +10,8 @@ DPKG_ARCH ?= "${TARGET_ARCH}"
10 10
11PKGWRITEDIRDEB = "${WORKDIR}/deploy-debs" 11PKGWRITEDIRDEB = "${WORKDIR}/deploy-debs"
12 12
13APTCONF_TARGET = "${WORKDIR}"
14
13# 15#
14# Update the Packages index files in ${DEPLOY_DIR_DEB} 16# Update the Packages index files in ${DEPLOY_DIR_DEB}
15# 17#
@@ -63,8 +65,9 @@ package_install_internal_deb () {
63 local package_linguas="${INSTALL_PACKAGES_LINGUAS_DEB}" 65 local package_linguas="${INSTALL_PACKAGES_LINGUAS_DEB}"
64 local task="${INSTALL_TASK_DEB}" 66 local task="${INSTALL_TASK_DEB}"
65 67
66 rm -f ${STAGING_ETCDIR_NATIVE}/apt/sources.list.rev 68 mkdir -p ${APTCONF_TARGET}/apt
67 rm -f ${STAGING_ETCDIR_NATIVE}/apt/preferences 69 rm -f ${APTCONF_TARGET}/apt/sources.list.rev
70 rm -f ${APTCONF_TARGET}/apt/preferences
68 71
69 priority=1 72 priority=1
70 for arch in $archs; do 73 for arch in $archs; do
@@ -72,15 +75,15 @@ package_install_internal_deb () {
72 continue; 75 continue;
73 fi 76 fi
74 77
75 echo "deb file:${DEPLOY_DIR_DEB}/$arch/ ./" >> ${STAGING_ETCDIR_NATIVE}/apt/sources.list.rev 78 echo "deb file:${DEPLOY_DIR_DEB}/$arch/ ./" >> ${APTCONF_TARGET}/apt/sources.list.rev
76 (echo "Package: *" 79 (echo "Package: *"
77 echo "Pin: release l=$arch" 80 echo "Pin: release l=$arch"
78 echo "Pin-Priority: $(expr 800 + $priority)" 81 echo "Pin-Priority: $(expr 800 + $priority)"
79 echo) >> ${STAGING_ETCDIR_NATIVE}/apt/preferences 82 echo) >> ${APTCONF_TARGET}/apt/preferences
80 priority=$(expr $priority + 5) 83 priority=$(expr $priority + 5)
81 done 84 done
82 85
83 tac ${STAGING_ETCDIR_NATIVE}/apt/sources.list.rev > ${STAGING_ETCDIR_NATIVE}/apt/sources.list 86 tac ${APTCONF_TARGET}/apt/sources.list.rev > ${APTCONF_TARGET}/apt/sources.list
84 87
85 # The params in deb package control don't allow character `_', so 88 # The params in deb package control don't allow character `_', so
86 # change the arch's `_' to `-' in it. 89 # change the arch's `_' to `-' in it.
@@ -88,9 +91,9 @@ package_install_internal_deb () {
88 cat "${STAGING_ETCDIR_NATIVE}/apt/apt.conf.sample" \ 91 cat "${STAGING_ETCDIR_NATIVE}/apt/apt.conf.sample" \
89 | sed -e "s#Architecture \".*\";#Architecture \"${dpkg_arch}\";#" \ 92 | sed -e "s#Architecture \".*\";#Architecture \"${dpkg_arch}\";#" \
90 | sed -e "s:#ROOTFS#:${target_rootfs}:g" \ 93 | sed -e "s:#ROOTFS#:${target_rootfs}:g" \
91 > "${STAGING_ETCDIR_NATIVE}/apt/apt-${task}.conf" 94 > "${APTCONF_TARGET}/apt/apt.conf"
92 95
93 export APT_CONFIG="${STAGING_ETCDIR_NATIVE}/apt/apt-${task}.conf" 96 export APT_CONFIG="${APTCONF_TARGET}/apt/apt.conf"
94 97
95 mkdir -p ${target_rootfs}/var/lib/dpkg/info 98 mkdir -p ${target_rootfs}/var/lib/dpkg/info
96 mkdir -p ${target_rootfs}/var/lib/dpkg/updates 99 mkdir -p ${target_rootfs}/var/lib/dpkg/updates