summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-07-12 21:37:57 +0200
committerDaniel Baumann <daniel@debian.org>2010-07-12 21:37:57 +0200
commit5a879f3a52450e61050530e033c2ae281529a59f (patch)
treea50f6230479a05e4d42fa72d9c5f36d614d3b5b6
parentdcf08485f6d9027ce7b06d780b5ab6e9d5cde99c (diff)
downloadvyos-live-build-5a879f3a52450e61050530e033c2ae281529a59f.tar.gz
vyos-live-build-5a879f3a52450e61050530e033c2ae281529a59f.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