summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-07-12 21:37:57 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:17:14 +0100
commit0a13b4f8b3585c1fb28d0c0acfa4a1c90016ca56 (patch)
treea50f6230479a05e4d42fa72d9c5f36d614d3b5b6
parent5bff9ec10ed265ea58f93ff134518e7a664fc1e5 (diff)
downloadvyos-live-build-0a13b4f8b3585c1fb28d0c0acfa4a1c90016ca56.tar.gz
vyos-live-build-0a13b4f8b3585c1fb28d0c0acfa4a1c90016ca56.zip
Updating binary_local-packageslists to treat non-main packages correctly.
-rwxr-xr-xhelpers/binary_local-packageslists28
1 files changed, 23 insertions, 5 deletions
diff --git a/helpers/binary_local-packageslists b/helpers/binary_local-packageslists
index 26fc0bb63..c5381f4dc 100755
--- a/helpers/binary_local-packageslists
+++ b/helpers/binary_local-packageslists
@@ -67,6 +67,7 @@ then
for FILE in chroot/binary.deb/archives/*.deb
do
SOURCE="$(dpkg -f ${FILE} Source | awk '{ print $1 }')"
+ SECTION="$(dpkg -f ${FILE} Section | awk '{ print $1 }')"
if [ -z "${SOURCE}" ]
then
@@ -83,17 +84,34 @@ then
;;
esac
+ if echo "${SECTION}" | grep -qs contrib
+ then
+ SECTION="contrib"
+ elif echo "${SECTION}" | grep -qs non-free
+ then
+ SECTION="non-free"
+ else
+ SECTION="main"
+ fi
+
# Install directory
- mkdir -p binary/pool/main/"${LETTER}"/"${SOURCE}"
+ mkdir -p binary/pool/${SECTION}/"${LETTER}"/"${SOURCE}"
# Move files
- mv "${FILE}" binary/pool/main/"${LETTER}"/"${SOURCE}"
+ mv "${FILE}" binary/pool/${SECTION}/"${LETTER}"/"${SOURCE}"
done
cd binary
- mkdir -p dists/${LH_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}
- apt-ftparchive packages pool/main > dists/${LH_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Packages
- gzip -9 -c dists/${LH_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Packages > dists/${LH_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Packages.gz
+
+ for SECTION in pool/*
+ do
+ SECTION="$(basename ${SECTION})"
+
+ mkdir -p dists/${LH_DISTRIBUTION}/${SECTION}/binary-${LH_ARCHITECTURE}
+ apt-ftparchive packages pool/${SECTION} > dists/${LH_DISTRIBUTION}/${SECTION}/binary-${LH_ARCHITECTURE}/Packages
+ gzip -9 -c dists/${LH_DISTRIBUTION}/${SECTION}/binary-${LH_ARCHITECTURE}/Packages > dists/${LH_DISTRIBUTION}/${SECTION}/binary-${LH_ARCHITECTURE}/Packages.gz
+ done
+
cd "${OLDPWD}"
rm -rf chroot/binary.deb