This file is indexed.

/usr/bin/pkgos-fetch-fake-repo is in openstack-pkg-tools 54.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
# This script prepares a /etc/pkgos/fake-${TARGET_DISTRO}-mirror folder
# with Packages.gz and Sources.gz files so that we can later on use
# the madison-lite script when using pkgos-parse-requirements.
# Indeed, using rmadison for this task is a way too slow, considering the
# average amount of dependency in a typical OpenStack component.

set -e

if ! [ -r /etc/pkgos/pkgos.conf ] ; then
	echo "Could not read /etc/pkgos/pkgos.conf"
	exit 1
else
	. /etc/pkgos/pkgos.conf
fi

# Create the folder and remove the Packages.gz / Sources.gz
DEST_DIST_DIR=/etc/pkgos/fake-${TARGET_DISTRO}-mirror/dists/${TARGET_DISTRO}/main
for i in binary-all binary-amd64 source ; do
	if ! [ -d ${DEST_DIST_DIR}/$i ] ; then
		mkdir -p ${DEST_DIST_DIR}/$i
	fi
	if [ "$i" = "source" ] ; then
		GZFILE=Sources.gz
	else
		GZFILE=Packages.gz
	fi
	rm -f ${DEST_DIST_DIR}/$i/$GZFILE
	wget ${CLOSEST_DEBIAN_MIRROR}/dists/${TARGET_DISTRO}/main/$i/$GZFILE -O ${DEST_DIST_DIR}/$i/$GZFILE
done