2
# This script prepares a /etc/pkgos/fake-${TARGET_DISTRO}-mirror folder
3
# with Packages.gz and Sources.gz files so that we can later on use
4
# the madison-lite script when using pkgos-parse-requirements.
5
# Indeed, using rmadison for this task is a way too slow, considering the
6
# average amount of dependency in a typical OpenStack component.
10
if ! [ -r /etc/pkgos/pkgos.conf ] ; then
11
echo "Could not read /etc/pkgos/pkgos.conf"
14
. /etc/pkgos/pkgos.conf
17
# Create the folder and remove the Packages.gz / Sources.gz
18
DEST_DIST_DIR=/etc/pkgos/fake-${TARGET_DISTRO}-mirror/dists/${TARGET_DISTRO}/main
19
for i in binary-all binary-amd64 source ; do
20
if ! [ -d ${DEST_DIST_DIR}/$i ] ; then
21
mkdir -p ${DEST_DIST_DIR}/$i
23
if [ "$i" = "source" ] ; then
28
rm -f ${DEST_DIST_DIR}/$i/$GZFILE
29
wget ${CLOSEST_DEBIAN_MIRROR}/dists/${TARGET_DISTRO}/main/$i/$GZFILE -O ${DEST_DIST_DIR}/$i/$GZFILE