summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2014-08-31 04:47:11 +0200
committerAndreas Oberritter <obi@opendreambox.org>2015-02-23 17:15:52 +0100
commite6c8cb24da0d9763f2d42f9a5dd85ffafea8f186 (patch)
tree07eb7abe38ed87ed545edc5643ca63afa68e4f1c
parentd3ea4ad20d7c5292125662a4ebded0154de45949 (diff)
downloadopenembedded-core-contrib-e6c8cb24da0d9763f2d42f9a5dd85ffafea8f186.tar.gz
openembedded-core-contrib-e6c8cb24da0d9763f2d42f9a5dd85ffafea8f186.tar.bz2
openembedded-core-contrib-e6c8cb24da0d9763f2d42f9a5dd85ffafea8f186.zip
package_deb.bbclass: Use apt-ftparchive for deb packages
Backported from c9899a7605f15f7f1ae30c4624d53c7da825b00a and a3965b76ed4361455c89c982761263be03e1a8e5. Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
-rw-r--r--meta/classes/package_deb.bbclass17
1 files changed, 16 insertions, 1 deletions
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 9aaa4ad64f..80d860b686 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -31,14 +31,29 @@ package_update_index_deb () {
fi
done
+ mkdir -p ${APTCONF_TARGET}/apt
+ mkdir -p ${APTCONF_TARGET}/apt/lists/partial/
+ mkdir -p ${APTCONF_TARGET}/apt/apt.conf.d/
+ mkdir -p ${APTCONF_TARGET}/apt/preferences.d/
+ > ${APTCONF_TARGET}/apt/sources.list
+ > ${APTCONF_TARGET}/apt/preferences
+
+ sed -e "s:#APTCONF#:${APTCONF_TARGET}/apt:g" \
+ < "${STAGING_ETCDIR_NATIVE}/apt/apt.conf.sample" \
+ > "${APTCONF_TARGET}/apt/apt.conf"
+
+ export APT_CONFIG="${APTCONF_TARGET}/apt/apt.conf"
+
found=0
for arch in $debarchs; do
if [ ! -d ${DEPLOY_DIR_DEB}/$arch ]; then
continue;
fi
cd ${DEPLOY_DIR_DEB}/$arch
- dpkg-scanpackages . | gzip > Packages.gz
+ PSEUDO_UNLOAD=1 apt-ftparchive packages . > Packages
+ gzip -fc Packages > Packages.gz
echo "Label: $arch" > Release
+ PSEUDO_UNLOAD=1 apt-ftparchive release . >> Release
found=1
done
if [ "$found" != "1" ]; then