summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-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